public class ROIHandler extends Object
| Constructor and Description | 
|---|
| ROIHandler() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | openROIs(IMetadata retrieve,
        ij.ImagePlus[] images)Look for ROIs in the given OMEXMLMetadata; if any are present, apply
 them to the given images and display them in the ROI manager. | 
| static void | openROIs(IMetadata retrieve,
        ij.ImagePlus[] images,
        boolean isOMERO)Opens the rois and converts them into ImageJ Rois. | 
| static void | openROIs(IMetadata retrieve,
        ij.ImagePlus[] images,
        boolean isOMERO,
        String roisMode)Opens the rois and converts them into ImageJ Rois. | 
| private static int[][] | parsePoints(String points)Parse (x, y) coordinates from a String returned by
 MetadataRetrieve.getPolygonpoints(...) or
 MetadataRetrieve.getPolylinepoints(...) | 
| static ij.gui.Roi[] | readFromOverlays()Returns rois if any from the overlay. | 
| static ij.gui.Roi[] | readFromRoiManager()Returns the rois if any stored in the ROI manager. | 
| static void | saveROIs(MetadataStore store)Save ROIs in the ROI manager to the given MetadataStore. | 
| private static void | storeLine(ij.gui.Line roi,
         MetadataStore store,
         int roiNum,
         int shape,
         int c,
         int z,
         int t)Stores the Line ROI into the specified metadata store. | 
| private static void | storeOval(ij.gui.OvalRoi roi,
         MetadataStore store,
         int roiNum,
         int shape,
         int c,
         int z,
         int t)Stores the Oval ROI into the specified metadata store. | 
| private static void | storePoint(ij.gui.PointRoi roi,
          MetadataStore store,
          int roiNum,
          int shape,
          int c,
          int z,
          int t)Stores the Point ROI into the specified metadata store. | 
| private static void | storePolygon(ij.gui.PolygonRoi roi,
            MetadataStore store,
            int roiNum,
            int shape,
            int c,
            int z,
            int t)Stores the Polygon ROI into the specified metadata store. | 
| private static void | storeRectangle(ij.gui.Roi roi,
              MetadataStore store,
              int roiNum,
              int shape,
              int c,
              int z,
              int t)Stores the Rectangle ROI into the specified metadata store. | 
| private static void | storeText(ij.gui.TextRoi roi,
         MetadataStore store,
         int roiNum,
         int shape,
         int c,
         int z,
         int t)Stores the text ROI into the metadata stored. | 
| private static ome.xml.model.primitives.Color | toOMExmlColor(Color color)Converts the Java Color into an OME-XML Color. | 
| private static ome.xml.model.primitives.NonNegativeInteger | unwrap(int r)Wraps the specified integer into a Non negative integer. | 
public static void openROIs(IMetadata retrieve, ij.ImagePlus[] images)
public static void openROIs(IMetadata retrieve, ij.ImagePlus[] images, boolean isOMERO)
retrieve - The OMEXML store.images - The imageJ object.isOMERO - true if data stored in OMERO,
        false otherwise.public static void openROIs(IMetadata retrieve, ij.ImagePlus[] images, boolean isOMERO, String roisMode)
retrieve - The OMEXML store.images - The imageJ object.isOMERO - true if data stored in OMERO,
        false otherwise.roisMode - Determines whether to import Rois to overlay or RoiManagerpublic static ij.gui.Roi[] readFromRoiManager()
public static ij.gui.Roi[] readFromOverlays()
public static void saveROIs(MetadataStore store)
store - Where to store the rois.private static ome.xml.model.primitives.NonNegativeInteger unwrap(int r)
r - The value to wrap.private static void storeText(ij.gui.TextRoi roi,
                              MetadataStore store,
                              int roiNum,
                              int shape,
                              int c,
                              int z,
                              int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static void storePoint(ij.gui.PointRoi roi,
                               MetadataStore store,
                               int roiNum,
                               int shape,
                               int c,
                               int z,
                               int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static void storeLine(ij.gui.Line roi,
                              MetadataStore store,
                              int roiNum,
                              int shape,
                              int c,
                              int z,
                              int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static void storeRectangle(ij.gui.Roi roi,
                                   MetadataStore store,
                                   int roiNum,
                                   int shape,
                                   int c,
                                   int z,
                                   int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static void storePolygon(ij.gui.PolygonRoi roi,
                                 MetadataStore store,
                                 int roiNum,
                                 int shape,
                                 int c,
                                 int z,
                                 int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static void storeOval(ij.gui.OvalRoi roi,
                              MetadataStore store,
                              int roiNum,
                              int shape,
                              int c,
                              int z,
                              int t)
roi - The roi to convert.store - The store to handle.roiNum - The roi numbershape - The index of the shape.c - The selected channel.z - The selected slice.t - The selected timepoint.private static int[][] parsePoints(String points)
private static ome.xml.model.primitives.Color toOMExmlColor(Color color)
color - The color to convertCopyright © 2017 Open Microscopy Environment