BiAPoL / biapol-utilities

Collection of utility functions from the Bio-image Analysis Technology Development group at the DFG Cluster of Excellence "Physics of Life", TU Dresden, Dresden, Germany
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Feature request: Create feature maps from regionprops #17

Open jo-mueller opened 2 years ago

jo-mueller commented 2 years ago

Following up on #16: It would be nice (especially for visualization in napari) if there were a function, that converts label images to feature maps based on a given lookup table.

Use case: A user has a labelled image label_image_x and is interested in the distribution of cell volume in the image. The labels in label_image_x could then be overwritten with the respective property (e.g. shape, size, etc).

haesleinhuepf commented 2 years ago

Hi @jo-mueller ,

great idea! There exists a napari-plugin for doing this (at least visually) by @jluethi: https://github.com/jluethi/napari-feature-visualization

Furthermore, for creating parametric images from label images and measurement-vectors, we also have that in clesperanto demo notebook and in the napari-pyclesperanto-assistant GUI:

image image

And I agree, we should also have this for scikit-image. 👍

jluethi commented 2 years ago

@jo-mueller I had the exact same idea back in May or so! I developed this prototype and have been meaning to polish it further & publish it. Are you interested to collaborate working on this? https://github.com/jluethi/napari-feature-visualization

Also, thanks @haesleinhuepf for tagging me here!

jo-mueller commented 2 years ago

Hey @jluethi, I just cloned your plugin and it looks pretty cool, I would love to collaborate on this :)

I would have probably followed the same approach as you to use dataframes for the handling, but the trick of creating feature maps by simply re-arranging the colormaps of the input image is pretty clever! What are features you would like to add in future versions? Maybe we could just zoom briefly and chat a bit about it? Let me know :)

haesleinhuepf commented 2 years ago

Hey @jluethi and @jo-mueller ,

also check out the work of Gonzalo @goanpeca in napari core. Maybe, you can jump on his train :-)

jluethi commented 2 years ago

@jo-mueller Sorry for the delayed response. Sounds like a great idea!

Regarding what I'd like to add:

If you're interested @jo-mueller, send me a quick email to joel.luethi@outlook.com, so we can coordinate for a zoom call :)

goanpeca commented 2 years ago

We will be implementing this in the course of the following weeks, so something to keep an eye on. Will ping with updates as they come

jluethi commented 2 years ago

@goanpeca That's awesome to hear, looking forward to hearing more from you!

haesleinhuepf commented 2 years ago

Hi all,

I just implemented the parametric image generator in napari-skimage-regionprops because multiple colleagues were now asking for it. It's optionally GPU-accelerated because we noted this function can be quite slow in this discussion. @goanpeca: if you make similar functionality part of napari-core, I'd be happy to remove it from that plugin again.

Best, Robert