napari_spatialdata.Interactive#
- class napari_spatialdata.Interactive(sdata, headless=False)#
Interactive visualization of spatial data.
- Parameters:
- sdata
SpatialData
|list
[SpatialData
] SpatialData object.
- headless
bool
(default:False
) Run napari in headless mode, default False.
- sdata
- Returns:
None
Methods table#
|
Add an element of a spatial data object being visualized with interactive to the viewer. |
|
Add text annotations to a polygon layer. |
|
Get a layer by name. |
|
Run the napari application. |
Take a screenshot of the viewer in its current state. |
|
|
Switch to a coordinate system present in the spatialdata object(s). |
Methods#
add_element#
- Interactive.add_element(element, element_coordinate_system, view_element_system=False)#
Add an element of a spatial data object being visualized with interactive to the viewer.
- Parameters:
- element
str
The name of the element in the spatial data object to add as napari layer.
- element_coordinate_system
str
The coordinate system in which the layer should be visualized.
- view_element_system
bool
(default:False
) Whether to switch to element_coordinate_system or to switch back to current active coordinate system after adding an element as layer.
- element
- Return type:
None
add_text_to_polygons#
- Interactive.add_text_to_polygons(layer_name, text_annotations)#
Add text annotations to a polygon layer.
- Return type:
None
get_layer#
run#
- Interactive.run()#
Run the napari application.
- Return type:
None
screenshot#
switch_coordinate_system#
- Interactive.switch_coordinate_system(coordinate_system)#
Switch to a coordinate system present in the spatialdata object(s).
- Return type:
None