copyShapes() method is not found
 Posted: Thu Jan 24, 2019 12:28 pm
Posted: Thu Jan 24, 2019 12:28 pmLooking at this page (https://docs.openmicroscopy.org/latest/ ... #read-data), I'm following the example in Retrieve ROIs linked to an Image in MATLAB.
In my practice, roi is an omero.gateway.model.ROIData object and it does not have a method called copyShapes(): https://javadoc.scijava.org/OMERO/omero ... IData.html
I could not find it in the index either: https://javadoc.scijava.org/OMERO/index-all.html
MATLAB code
I guess that the code example is obsolete and requires renewal.
			- Code: Select all
- ROIFacility roifac = gateway.getFacility(ROIFacility.class);
 //Retrieve the roi linked to an image
 List<ROIResult> roiresults = roifac.loadROIs(ctx, image.getId());
 ROIResult r = roiresults.iterator().next();
 if (r == null) return;
 Collection<ROIData> rois = r.getROIs();
 List<Shape> list;
 Iterator<Roi> j = rois.iterator();
 while (j.hasNext()) {
 roi = j.next();
 list = roi.copyShapes();
 // Do something
 }
In my practice, roi is an omero.gateway.model.ROIData object and it does not have a method called copyShapes(): https://javadoc.scijava.org/OMERO/omero ... IData.html
I could not find it in the index either: https://javadoc.scijava.org/OMERO/index-all.html
MATLAB code
- Code: Select all
- roifac = getGatewayFacility(gateway,'ROIFacility'); %see https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=8615&p=20473#p20473
 //Retrieve the roi linked to an image
 roiresults = roifac.loadROIs(ctx, image.getId());
 r = roiresults.iterator().next();
 if isempty(r)
 return;
 end
 rois = r.getROIs();
 j = rois.iterator();
 while (j.hasNext()) {
 roi = j.next();
 list = roi.copyShapes(); %TODO
 // Do something
 }
I guess that the code example is obsolete and requires renewal.