Class ShapeWrapper<T extends ShapeData>

    • 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

      • ShapeWrapper

        protected ShapeWrapper​(T s)
        Constructor of the ShapeWrapper class using a ShapeData.
        Parameters:
        s - The shape.
    • Method Detail

      • copyFromIJRoi

        protected void copyFromIJRoi​(Roi ijRoi)
        Copies details from an ImageJ ROI (position, stroke color, stroke width).
        Parameters:
        ijRoi - An ImageJ Roi.
      • copyToIJRoi

        protected void copyToIJRoi​(Roi ijRoi)
        Copies details to an ImageJ ROI (name, position, stroke color, fill color, stroke width).
        Parameters:
        ijRoi - An ImageJ Roi.
      • getC

        public int getC()
        Gets the channel.
        Specified by:
        getC in interface Shape
        Returns:
        the channel. -1 if the shape applies to all channels of the image.
      • setC

        public void setC​(int c)
        Sets the channel.
        Specified by:
        setC in interface Shape
        Parameters:
        c - the channel. Pass -1 to remove z value, i.e. shape applies to all channels of the image.
      • getZ

        public int getZ()
        Gets the z-section.
        Specified by:
        getZ in interface Shape
        Returns:
        the z-section. -1 if the shape applies to all z-sections of the image.
      • setZ

        public void setZ​(int z)
        Sets the z-section.
        Specified by:
        setZ in interface Shape
        Parameters:
        z - the z-section. Pass -1 to remove z value, i.e. shape applies to all z-sections of the image.
      • getT

        public int getT()
        Sets the time-point.
        Specified by:
        getT in interface Shape
        Returns:
        the time-point. -1 if the shape applies to all time-points of the image.
      • setT

        public void setT​(int t)
        Sets the time-point.
        Specified by:
        setT in interface Shape
        Parameters:
        t - the time-point. Pass -1 to remove t value, i.e. shape applies to all time-points of the image.
      • getFontSize

        public double getFontSize()
        Gets ShapeData font size.
        Specified by:
        getFontSize in interface Shape
        Returns:
        The font size (in typography points)
      • setFontSize

        public void setFontSize​(double value)
        Sets ShapeData font size.
        Specified by:
        setFontSize in interface Shape
        Parameters:
        value - The font size (in typography points)
      • getStroke

        public java.awt.Color getStroke()
        Gets the ShapeData stroke color.
        Specified by:
        getStroke in interface Shape
        Returns:
        The stroke color
      • setStroke

        public void setStroke​(java.awt.Color strokeColour)
        Sets ShapeData stroke color.
        Specified by:
        setStroke in interface Shape
        Parameters:
        strokeColour - The stroke color
      • getFill

        public java.awt.Color getFill()
        Gets ShapeData fill color.
        Specified by:
        getFill in interface Shape
        Returns:
        The fill color
      • setFill

        public void setFill​(java.awt.Color fillColour)
        Sets the ShapeData fill color.
        Specified by:
        setFill in interface Shape
        Parameters:
        fillColour - The fill color
      • setTransform

        public void setTransform​(double a00,
                                 double a10,
                                 double a01,
                                 double a11,
                                 double a02,
                                 double a12)
        Sets the transform to the matrix specified by the 6 double precision values.
        Specified by:
        setTransform in interface Shape
        Parameters:
        a00 - the X coordinate scaling element of the 3x3 matrix
        a10 - the Y coordinate shearing element of the 3x3 matrix
        a01 - the X coordinate shearing element of the 3x3 matrix
        a11 - the Y coordinate scaling element of the 3x3 matrix
        a02 - the X coordinate translation element of the 3x3 matrix
        a12 - the Y coordinate translation element of the 3x3 matrix
      • toAWTTransform

        public java.awt.geom.AffineTransform toAWTTransform()
        Converts AffineTransform to AffineTransform.
        Specified by:
        toAWTTransform in interface Shape
        Returns:
        The converted affine transform.
      • toImageJ

        public Roi toImageJ()
        Converts shape to ImageJ ROI.
        Specified by:
        toImageJ in interface Shape
        Returns:
        An ImageJ ROI.