Class GenericShapeWrapper<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

      • GenericShapeWrapper

        protected GenericShapeWrapper​(T s)
        Constructor of the GenericShapeWrapper 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.
      • asShapeData

        @Deprecated
        public T asShapeData()
        Deprecated.
        Gets the ShapeData object contained.
        Returns:
        the shape.
      • getC

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

        public void setC​(int c)
        Sets the channel.
        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.
        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.
        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.
        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.
        Parameters:
        t - the time-point. Pass -1 to remove t value, i.e. shape applies to all time-points of the image.
      • setCZT

        public void setCZT​(int c,
                           int z,
                           int t)
        Sets the channel, z-section and time-point at once.
        Parameters:
        c - the channel. Pass -1 to remove z value, i.e. shape applies to all channels of the image.
        z - the z-section. Pass -1 to remove z value, i.e. shape applies to all z-sections of the image.
        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.
        Returns:
        The font size (in typography points)
      • setFontSize

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

        public java.awt.Color getStroke()
        Gets the ShapeData stroke color.
        Returns:
        The stroke color
      • setStroke

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

        public java.awt.Color getFill()
        Gets ShapeData fill color.
        Returns:
        The fill color
      • setFill

        public void setFill​(java.awt.Color fillColour)
        Sets the ShapeData fill color.
        Parameters:
        fillColour - The fill color
      • getText

        public abstract java.lang.String getText()
        Gets the text on the ShapeData.
        Returns:
        the text
      • setText

        public abstract void setText​(java.lang.String text)
        Sets the text on the ShapeData.
        Parameters:
        text - the text
      • toAWTShape

        public abstract java.awt.Shape toAWTShape()
        Converts the shape to an Shape.
        Returns:
        The converted AWT Shape.
      • 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.
        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
      • setTransform

        public void setTransform​(java.awt.geom.AffineTransform transform)
        Sets the transform from a AffineTransform.
        Parameters:
        transform - A Java AffineTransform.
      • toAWTTransform

        public java.awt.geom.AffineTransform toAWTTransform()
        Converts AffineTransform to AffineTransform.
        Returns:
        The converted affine transform.
      • createTransformedAWTShape

        public java.awt.Shape createTransformedAWTShape()
        Returns a new Shape defined by the geometry of the specified Shape after it has been transformed by the transform.
        Returns:
        A new transformed Shape.
      • toImageJ

        public Roi toImageJ()
        Converts shape to ImageJ ROI.
        Returns:
        An ImageJ ROI.