Class ROIWrapper

    • Field Detail

      • ANNOTATION_LINK

        public static final java.lang.String ANNOTATION_LINK
        Annotation link name for this type of object
        See Also:
        Constant Field Values
    • Constructor Detail

      • ROIWrapper

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

        public ROIWrapper​(java.lang.Iterable<? extends Shape> shapes)
        Constructor of the ROIWrapper class.
        Parameters:
        shapes - List of shapes to add to the ROIData.
      • ROIWrapper

        public ROIWrapper​(ROIData roi)
        Constructor of the ROIWrapper class.
        Parameters:
        roi - The ROIData to wrap.
    • Method Detail

      • fromImageJ

        public static java.util.List<ROI> fromImageJ​(java.util.Collection<? extends Roi> ijRois)
        Converts a collection of ImageJ ROIs to a list of OMERO ROIs
        Parameters:
        ijRois - A collection of ImageJ ROIs.
        Returns:
        The converted list of OMERO ROIs.
      • fromImageJ

        public static java.util.List<ROI> fromImageJ​(java.util.Collection<? extends Roi> ijRois,
                                                     java.lang.String property)
        Converts a collection of ImageJ ROIs to a list of OMERO ROIs
        Parameters:
        ijRois - A collection of ImageJ ROIs.
        property - The property used to store the 4D ROI local index/label. Defaults to "ROI" if null or empty.
        Returns:
        The converted list of OMERO ROIs.
      • getName

        public java.lang.String getName()
        Gets the ROI name.
        Specified by:
        getName in interface ROI
        Returns:
        The ROI name (can be null).
      • setName

        public void setName​(java.lang.String name)
        Sets the ROI name.
        Specified by:
        setName in interface ROI
        Parameters:
        name - The ROI name.
      • addShape

        public void addShape​(Shape shape)
        Adds a Shape to the ROI.
        Specified by:
        addShape in interface ROI
        Parameters:
        shape - Shape to add.
      • getShapes

        public java.util.List<Shape> getShapes()
        Returns the list of shapes contained in the ROI.
        Specified by:
        getShapes in interface ROI
        Returns:
        See above.
      • setImage

        public void setImage​(Image image)
        Sets the image linked to the ROI.
        Specified by:
        setImage in interface ROI
        Parameters:
        image - Image linked to the ROI.
      • deleteShape

        public void deleteShape​(ShapeData shape)
        Deletes a ShapeData from the ROI.
        Specified by:
        deleteShape in interface ROI
        Parameters:
        shape - ShapeData to delete.
      • deleteShape

        public void deleteShape​(int pos)
        Deletes a shape from the ROI.
        Specified by:
        deleteShape in interface ROI
        Parameters:
        pos - Position of the ShapeData in the ShapeData list from the ROI.
        Throws:
        java.lang.IndexOutOfBoundsException - If pos is out of the ShapeData list bounds.
      • annotationLinkType

        protected java.lang.String annotationLinkType()
        Returns the type of annotation link for this object.
        Specified by:
        annotationLinkType in class AnnotatableWrapper<ROIData>
        Returns:
        See above.