Open scottberry opened 7 years ago
To summarize: We currently apply morphological opening to segmented objects before finding their contour. This is necessary to remove thin protrusions, which would result in invalid polygons. We must ensure, however, that we don't loose any objects or significantly alter the shape of the objects, which is particularly problematic for small objects.
A side note: The effect is not as dramatic as it seems based on the above screenshot, because we also simplify the polygons for visualization (they are stored at original resolution) to reduce the amount of data that needs to be transferred and rendered client side. This could be further fine tuned for particular object types, but we should track that in a separate issue.
To see the actual segmentation result (reconstructed from the stored polygons), you can download the label image via tmclient
using the download_segmentation_image()
method. Be careful with download_segmentation_image_file()
, because in your case you have probably more than 2^16 objects per image, which would exceed the bit depth of the PNG file.
I tried to segment the FISH spots and save as polygons but it didn’t work very well:
Copy of email correspondence with @hackermd :
I get the impression that even at maximum zoom, I am not seeing the actual segmentation layer in the viewer (the segmentations look much cleaner in the debug plots, after setting IMAGE_RESIZE_FACTOR=1).
Are the polygons used for the viewer only? Or are these actually used to compute the feature values?
Many of them are discarded during object saving, … but I guess this could also be avoided if a higher resolution is used?
This may also be the cause for the other issue that you reported (loss of nuclei after separate_clumps).
If I omit “represent as polygons”, can I still download the segmentation images?