Skip to content
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

Support import of ROIs by Roi Name for dataset/project & screen/plate levels #81

Open
JensWendt opened this issue Jan 6, 2023 · 2 comments

Comments

@JensWendt
Copy link

Hello,

for images it is possible to add table data for ROIs by a s type column Roi Name, without knowledge of the Roi ID.
I would very much like to be able to do this on a dataset/project and screen/plate level as well.
Background:

  • HCS with multiple 384-well plates
  • Cellprofiler (CP) pipeline with Cellpose segmentation ; spits out multiple measurements for each object;
    objects in CP get named 1,2,3,... for each image
  • import of the ROIs via Fiji OMERO-batch plugin into OMERO
    results in the shapes named like their original objects 1,2,3,...
  • temporary workaround: name the ROIs according to their Shape comment (the one visible in OMERO.iViewer) with Python script

Goal

populate Metadata of whole projects/datasets/screens/plates with the slightly adapted .csv output from CP, utilizing CP-object name = Roi Name

@will-moore
Copy link
Member

Hi @JensWendt - Is the Roi Name guaranteed to be unique across the whole project/dataset or screen/plate?

You can see what was needed at #62 for supporting "ROI IDs per Dataset".
For look-up by ROI Name, you'd need to create rois_by_name dicts and update the logic for when get_roi_id_by_name() is called to not be restricted to Image as target_class.

Happy to help with more pointers if you want to give it a try?

@JensWendt
Copy link
Author

Hi @will-moore ,

Most likely the Roi Name will only be unique in the image generally speaking.
For the purpose I have in mind the ROIs will be named 1,2,...,325,326,etc consecutively in each image in the overarching object (dataset, screen, ...). E.g. Img1 has ROIs 1-567, Img2 has ROIs 1-1034 and Img3 has ROIs 1-54.

I read through #62 but could not quite figure out what I was supposed to see :/
Can we not implement the same logic we use for images in Projects with multiple datasets:

    def get_image_id_by_name(self, iname, dname=None):
        return self.images_by_name[dname][iname].id.val

and adapt this to something like, e.g. for the DatasetWrapper class?

    def get_roi_id_by_name(self, roiName, imageName=None):
        return self.rois_by_name[imageName][roiName].id.val

I would only give this a try, if you cannot fit this into your own schedule (for which I would have the fullest understanding), because it would take me significantly longer than you to understand your 2k+ lines of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants