Support import of ROIs by Roi Name for dataset/project & screen/plate levels
Opened this issue · 2 comments
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
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?
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.