alan-turing-institute / pixelflow

BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Output segmented images of each label using regionprops.intensity_image #13

Closed evangeline-corcoran closed 1 year ago

evangeline-corcoran commented 1 year ago

Add functionality to retrieve segmented images of each label generated by regionprops.intensity_image for both 2D and 3D images and output as numpy arrays (https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.regionprops)

IFenton commented 1 year ago

Working on this in IFenton-13-SegmentedImage

IFenton commented 1 year ago

At the moment, it is possible to get these from pixelflow by just adding 'image_intensity' to the list of features. However, it then makes for an untidy dataframe, as it prints the full numpy array of the segmented image in each row.

My suggestion would be to have these images as a separate object within the pixelflow result (e.g. .image rather than .features). @evangeline-corcoran does this sound like a good solution to you? Would it also be useful to have an option to include them in the dataframe with the other features?

evangeline-corcoran commented 1 year ago

For me it would be most useful to have them as a separate object as you suggest, and I can't really think of a situation where you would want the image numpy array included in the dataframe