Class ROIWrapper


  • public class ROIWrapper
    extends GenericObjectWrapper<ROIData>
    Class containing a ROIData

    Implements function using the ROIData contained

    • Constructor Detail

      • ROIWrapper

        public ROIWrapper()
        Constructor of the ROIWrapper class.
      • ROIWrapper

        public ROIWrapper​(List<GenericShapeWrapper<?>> shapes)
        Constructor of the ROIWrapper class.
        Parameters:
        shapes - List of shapes to add to the ROIData.
      • ROIWrapper

        public ROIWrapper​(ROIData data)
        Constructor of the ROIWrapper class.
        Parameters:
        data - ROIData to be contained.
    • Method Detail

      • fromImageJ

        public static List<ROIWrapper> fromImageJ​(List<Roi> ijRois,
                                                  String property)
        Converts an ImageJ list of ROIs to a list of OMERO ROIs
        Parameters:
        ijRois - A list of ImageJ ROIs.
        property - The property where 4D ROI ID is stored, defaults to "ROI".
        Returns:
        The converted list of OMERO ROIs.
      • toImageJ

        public static List<Roi> toImageJ​(List<ROIWrapper> rois)
        Converts an OMERO list of ROIs to a list of ImageJ ROIs
        Parameters:
        rois - A list of OMERO ROIs.
        Returns:
        The converted list of ImageJ ROIs.
      • setData

        public void setData​(ROIData data)
        Changes the wrapped data.
        Parameters:
        data - The ROI data.
      • addShapes

        public void addShapes​(List<? extends GenericShapeWrapper<?>> shapes)
        Adds ShapeData objects from a list of GenericShapeWrapper to the ROIData
        Parameters:
        shapes - List of GenericShapeWrapper.
      • addShape

        public void addShape​(GenericShapeWrapper<?> shape)
        Adds a ShapeData from a GenericShapeWrapper to the ROIData
        Parameters:
        shape - GenericShapeWrapper to add.
      • getShapes

        public ShapeList getShapes()
        Returns the list of shapes contained in the ROIData
        Returns:
        list of shape contained in the ROIData.
      • setImage

        public void setImage​(ImageWrapper image)
        Sets the image linked to the ROI.
        Parameters:
        image - Image linked to the ROIData.
      • asROIData

        public ROIData asROIData()
        Returns the ROIData contained.
        Returns:
        the ROIData contained.
      • deleteShape

        public void deleteShape​(ShapeData shape)
        Deletes a ShapeData from the ROIData.
        Parameters:
        shape - ShapeData to delete.
      • deleteShape

        public void deleteShape​(int pos)
                         throws IndexOutOfBoundsException
        Deletes a ShapeData from the ROIData.
        Parameters:
        pos - Position of the ShapeData in the ShapeData list from the ROIData.
        Throws:
        IndexOutOfBoundsException - If pos is out of the ShapeData list bounds.
      • getBounds

        public PixelsWrapper.Bounds getBounds()
        Returns the 5D bounds containing the ROI.
        Returns:
        The 5D bounds.
      • toImageJ

        public List<Roi> toImageJ()
        Convert ROI to ImageJ list of ROIs.
        Returns:
        A list of ROIs.