Closed ArneDefauw closed 5 months ago
@berombau @julienmortier It is now also possible to view intensity values or other properties (sdata.table.obs) calculated for certain masks added to sdata.table via e.g:
#optional
sdata = sp.im.align_labels_layers(
sdata,
labels_layer_1="masks_nuclear",
labels_layer_2="masks_whole",
output_labels_layer="masks_nuclear_aligned",
output_shapes_layer=None,
overwrite=True,
chunks=256,
depth=100,
)
sdata = sp.tb.allocate_intensity(
sdata, img_layer="raw_image", labels_layer="masks_whole", chunks=100
)
#optional
sdata = sp.tb.allocate_intensity(
sdata, img_layer="raw_image", labels_layer="masks_nuclear_aligned", chunks=100, append=True
)
sdata=sp.tb.add_regionprop_features( sdata, labels_layer="masks_whole" )
#optional
sdata=sp.tb.add_regionprop_features( sdata, labels_layer="masks_nuclear_aligned" )
and then in napari:
When there is a new release for spatialdata for multiple tables, we will need to do some code changes
This pull request https://github.com/saeyslab/napari-sparrow/pull/178 fixes issue where we could not visualize instances from
sdata.table
associated with elements fromsdata.labels
via napari-spatialdata plugin. @Lucas-Macielsee below for example: