-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Establish ROIs for organoids #45
Comments
Thanks for the overview, but I think there's room for some more practical comments about the requirements ;)
With this answer, I think covering use case 1 shouldn't be hard, if we assume no bounding-box overlaps. As for use case 2, my understanding is that its implementation is on hold until we implement some stitching - is it correct? |
Agreed. We'll hit use case 3 very fast though, as soon as we enable that. But let's start with 1
Both are valid options. But from a user-flow, I like the second option better. If we can have a helper function for that and have a flag for cellpose & napari workflows, that makes for a very easy flow. The flag could also be a named string for the name of the ROIs, if it's empty, they aren't being saved.
Sounds good for a first implementation! And yes, very hard to guarantee or even know beforehand.
Actually, it runs fine with our current tiling approach for organoids. i.e. even though tiling based on Yokogawa metadata isn't super accurate, it's actually often good enough for organoid-level measurements and organoid ROIs. We just save images based on their metadata coordinates and that is a (very rough) version of placing things correctly. |
In #132 (comment) we have a basic plan of how to proceed to create bounding boxes. Let's keep this issue to discuss the specific organoids use cases. |
Most of this is addressed by #306 - to be released as |
Cases 1-3 should be now supported, as part of the cellpose task. Work on the napari-workflows task has not started yet. @jluethi Is something still missing from this "overview" issue? If not, let's close it and open more specific ones. |
That's great, thanks @tcompa ! I think we cover the main part of this issue. The two major things that remain to enable the full scientific use are: Thus, I'm closing this overview issue, let's continue the work on those other two issues (not the current top priority though) |
There are 4 cases for how organoids can map to FOVs and how there ROIs can relate to each other. Here is an overview of the 4. Fractal should cover cases # 1 - # 3, # 4 is out of scope.
1) No ROI overlap, no FOVs crossing
The simplest case. ROIs are all within the FOVs. Potentially, there may be some FOVs that do not contain ROIs. Easy to handle: Some task segments the organoids and we create new bounding-box ROIs based on those segmentations. When processing those ROIs, no special care needs to be taken and just looping over ROIs will make the processing more efficient as the non-organoid regions are not being processed.
(Will cover most use-cases of @MaksHess and many people in the Pelkmans lab)
2: No ROI overlap, but ROIs cross FOVs
Slightly more complex case where the ROIs cross boundaries of the field of views. As long as we cover the stitching of ROIs (i.e. we were in modality 1 or modality 2 [when precision is not critical] of this overview: #11), we can process them like in Case # 1.
3: ROI overlap, but not organoid overlap
This is the trickiest case we will need to handle. Realistically, we will be using bounding-box ROIs for a while (separate discussion whether eventually more complex ROIs could be defined, but that would index-based processing with dask (see: #27) make even more complex). Thus, a bounding-box can overlap while the object within will not overlap. This is quite likely to happen for some use cases in the Liberali lab when organoids grow densely.
How do we tackle this? Let's look into masked arrays in dask: https://docs.dask.org/en/stable/generated/dask.array.ma.masked_where.html Maybe one would specify the label image & the label value (e.g. path to label image, integer value of relevant label) as additional data for the ROI and, if a ROI contains
mask_label_img
andmask_label_value
, it uses such masking before reading and writing data to/from a ROI?4: Organoid overlap
This is out of scope. It could happen when the MIP is processed of organoids that are close in 3D. In that case, our segmentation networks would also assign an MIP pixel to one organoid only. Thus, if a user wants to process this in more detail, organoid segmentation should be done in 3D.
Other cases of where a 3D voxel should actually belong to multiple objects are out of scope for Fractal
The text was updated successfully, but these errors were encountered: