Closed BioinfoTongLI closed 3 months ago
Thanks for opening this issue! We should probably make the illumination correction task more flexible to allow a user to specify which ROI table is used for correction. Currently, it hard-codes the FOV_ROI_table, which we typically generate in our converters. Hard-coding this does not seem like the best approach.
Some context on why this happens:
We often store many field of views in the same Zarr. We still want to apply illumination correction per field of view though. Thus, we use the FOV_ROI_tables generated by our converter.
Our images also often have a well_ROI_table
for the whole fused well. But it would be a bad idea to apply illumination correction on that one.
We started to become more flexible in the Import OME-Zarr task. We don't assume you necessarily have wells or that you fuse multiple FOVs into a single image. Thus, we name the ROI tables image_ROI_table
for the whole OME-Zarr image
(& optionally grid_ROI_table: if one had fused e.g. 3x3 FOVs with regular intervals, we can generate the equivalent of our FOV_ROI_table).
Long story short: The illumination correction task should probably support differently named ROI tables as well. I'll create a quick PR that would address this
@BioinfoTongLI In the current main, the Illumination correction task now exposes an input_ROI_table
option. You can set that one to image_ROI_table
in your case and then it should work without renaming them :)
@BioinfoTongLI This is now available in the 0.14.3 release of fractal-tasks-core :)
Hi there!
Great tool! Many thanks for building it!
I've imported my
bioformats2raw
converted ome-ngff usingfrom fractal_tasks_core.tasks.import_ome_zarr import import_ome_zarr
and I also addedadd_image_ROI_table=True
using the import, sinceillumination_correction
requires it.However, it seems that there's a mismatch of folder name. The newly created one is called
image_ROI_table
https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/main/fractal_tasks_core/tasks/import_ome_zarr.py#L88 And the expected one is calledFOV_ROI_table
https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/main/fractal_tasks_core/tasks/illumination_correction.py#L201 Is that just an overlook? I can create a PR if so.