Class ROIHandler

java.lang.Object
loci.plugins.util.ROIHandler

public class ROIHandler extends Object
Utility class for managing regions of interest within ImageJ. Capable of constructing ROIs within ImageJ's ROI manager matching those specified in an OME metadata store, and vice versa.
  • Constructor Details

    • ROIHandler

      public ROIHandler()
  • Method Details

    • openROIs

      public static void openROIs(loci.formats.meta.IMetadata retrieve, 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.
    • openROIs

      public static void openROIs(loci.formats.meta.IMetadata retrieve, ImagePlus[] images, boolean isOMERO)
      Opens the rois and converts them into ImageJ Rois.
      Parameters:
      retrieve - The OMEXML store.
      images - The imageJ object.
      isOMERO - true if data stored in OMERO, false otherwise.
    • openROIs

      public static void openROIs(loci.formats.meta.IMetadata retrieve, ImagePlus[] images, boolean isOMERO, String roisMode)
      Opens the rois and converts them into ImageJ Rois.
      Parameters:
      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 RoiManager
    • readFromRoiManager

      public static Roi[] readFromRoiManager()
      Returns the rois if any stored in the ROI manager.
      Returns:
      See above.
    • readFromOverlays

      public static Roi[] readFromOverlays()
      Returns rois if any from the overlay.
      Returns:
      See above
    • saveROIs

      public static void saveROIs(loci.formats.meta.MetadataStore store)
      Save ROIs in the ROI manager to the given MetadataStore.
      Parameters:
      store - Where to store the rois.