[ome-devel] parse ROIs in Reader class

Melissa Linkert melissa at glencoesoftware.com
Sun Jun 29 18:25:21 BST 2014


Hi Christoph,

> >I am currently trying to read segmentations from the cellh5
> >format. The image data in there is 5D.
> >
> >My aim is to populate the ROI manager of ImageJ with the correct
> >segmentation per channel, time and z-slice.
> >
> >Here's a minimal example for just one artificial ROI, that should
> >create a PolyLine for T == 5, C==2, and Z == 1 and - importantly -
> >only display the ROI, when I navigate to the according C, Z, T
> >position in the hyperstack viewer. However, the ROI is displayed
> >on all slices. I tried checking "Associate Show all ROIs with
> >slices" without success.
>
> I saw that the RoiHandler.openRois in bio-formats-tools is not
> forwarding this information (i.e. C, Z, T) to the RoiManager.

Thank you for the bug report and investigation.

You're absolutely right that the ROIHandler class leaves quite a bit to
be desired when populating ImageJ's RoiManager.  There is now a ticket
for this problem on our issue tracking system:

https://trac.openmicroscopy.org.uk/ome/ticket/12425

You have been CC'd, and will be automatically notified of any changes.
If you prefer not to be notified, just let me know.

Regards,
-Melissa

On Thu, Jun 26, 2014 at 12:24:57PM +0200, Christoph Sommer wrote:
> Hi all,
> 
> I saw that the RoiHandler.openRois in bio-formats-tools is not
> forwarding this information (i.e. C, Z, T) to the RoiManager.
> 
> Cheers,
> Christoph
> >Hi all,
> >
> >I am currently trying to read segmentations from the cellh5
> >format. The image data in there is 5D.
> >
> >My aim is to populate the ROI manager of ImageJ with the correct
> >segmentation per channel, time and z-slice.
> >
> >Here's a minimal example for just one artificial ROI, that should
> >create a PolyLine for T == 5, C==2, and Z == 1 and - importantly -
> >only display the ROI, when I navigate to the according C, Z, T
> >position in the hyperstack viewer. However, the ROI is displayed
> >on all slices. I tried checking "Associate Show all ROIs with
> >slices" without success.
> >
> >>int roiIndex = 0;
> >>int shapeIndex = 0;
> >>String polylineID = MetadataTools.createLSID("Shape", roiIndex,
> >>shapeIndex);
> >>store.setPolygonID(polylineID, roiIndex, shapeIndex);
> >>store.setPolygonPoints("10,10 200,10 200,300 10,200", roiIndex,
> >>shapeIndex);
> >>String roiID = MetadataTools.createLSID("ROI", roiIndex, shapeIndex);
> >>store.setPolygonTheT(new NonNegativeInteger(5), roiIndex, shapeIndex);
> >>store.setPolygonTheC(new NonNegativeInteger(2), roiIndex, shapeIndex);
> >>store.setPolygonTheZ(new NonNegativeInteger(1), roiIndex, shapeIndex);
> >>store.setPolygonLocked(true, roiIndex, shapeIndex);
> >>store.setROIID(roiID, roiIndex);
> >>store.setImageROIRef(roiID, 0, roiIndex);
> >
> >Unfortunately, when I open it in Fiji as hyperstack, the ROI is
> >not aware of its C,Z,T. If I set it manually using "Properties..."
> >from the ROI Manager it works...
> >
> >Cheers,
> >Christoph
> >
> >
> >
> >_______________________________________________
> >ome-devel mailing list
> >ome-devel at lists.openmicroscopy.org.uk
> >http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
> 
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


More information about the ome-devel mailing list