jluethi / fractal-helper-tasks

Collection of Fractal helper tasks
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Make `convert_2D_segmentation_to_3D` copy feature tables #9

Open jluethi opened 2 months ago

jluethi commented 2 months ago

TBD details @silvbarb Want to elaborate a bit?

silvbarb commented 2 months ago

Yes!

If the original data lives in (z,y,x) dimensions, and a z-projection is used for object measurements (example: 2D segmentation of organoids + basic 2D feature extraction), it would be nice to have such measurements copied to the 3D OME-Zarr as well, and not only to have them in the _mip.zarr

This would require the option to copy over from 2D to 3D specific ROI_table(s), which maybe could be specified by the user? I doubt for instance that the FOV or well_ROI_table it's something the user would want to lift over, but maybe the label_ROI_table, as well as the measurements tables could be interesting to have.

jluethi commented 2 months ago

This would require the option to copy over from 2D to 3D specific ROI_table(s), which maybe could be specified by the user? I doubt for instance that the FOV or well_ROI_table it's something the user would want to lift over, but maybe the label_ROI_table, as well as the measurements tables could be interesting to have.

Fully agreed! You can already copy over label_ROI_table, as those are important to e.g. make 3D measurement per object from 2D. You can specify which ROI tables you want to copy over by using the ROI_tables_to_copy parameter of the task.

I see 2 ways to proceed:

  1. We add a second parameter: Other tables to copy
  2. We make the copying of tables smarter, now that our tables are typed. If it's a ROI table, we modify the Z dimension of the ROI as we currently do. If it's any other kind of table, we just copy over the table. The parameter could then be named just tables_to_copy.

I'd default to option 2