Class ViewJComponentSingleRegistration

  • All Implemented Interfaces:
    PaintGrowListener, ScreenCoordinateListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

    public class ViewJComponentSingleRegistration
    extends ViewJComponentEditImage
    Extended version of ViewJComponentEditImage, used ONLY within the ViewJFrameRegistrationTool This class is tailored to support Reference and Adjusted markers for use with Least Squares and Thin Plate Splines registration operations.
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • centerPtLocation

        private int centerPtLocation
        location of the center pt VOI (for registration rotation).
      • isReference

        private boolean isReference
        if the image is in a registration window, is the image the reference (and not the adjusted).
      • ptCoord

        private float[] ptCoord
        Temporary buffer used when extracting points from a VOI. Save reallocating memory often.
      • xCoords

        private int[] xCoords
        Buffers used to save the X coordinates for the points that make up a VOI.
      • yCoords

        private int[] yCoords
        Buffers used to save the Y coordinates for the points that make up a VOI.
    • Constructor Detail

      • ViewJComponentSingleRegistration

        public ViewJComponentSingleRegistration​(ViewJFrameBase _frame,
                                                ModelImage _imageA,
                                                ModelLUT _LUTa,
                                                float[] imgBufferA,
                                                int[] pixelBuffer,
                                                float zoom,
                                                int[] extents,
                                                boolean logMagDisplay,
                                                int _orientation,
                                                boolean isReference)
        Constructor: ImageA and ImageB are expected to be of the same dimensionality !!
        Parameters:
        _frame - frame where image(s) will be displayed
        _imageA - Model of the image that will be displayed
        _LUTa - LUT used to display imageA
        imgBufferA - storage buffer used to display image A
        pixelBuffer - storage buffer used to build a displayable image
        zoom - initial magnification of image
        extents - initial display dimensions of the image
        logMagDisplay - display log magnitude of image
        _orientation - orientation of the image
        isReference - DOCUMENT ME!
    • Method Detail

      • getCenterPtLocation

        public int getCenterPtLocation()
        Gets the center point of rotation.
        Returns:
        int
      • getNumPoints

        public int getNumPoints()
        Finds the number of points in the active VOI contour.
        Overrides:
        getNumPoints in class ViewJComponentEditImage
        Returns:
        the number of points in the selected VOI
      • getPointVOI

        public VOI getPointVOI()
        All VOIPoints are stored in one VOI contained in this class. This function returns that VOI.
        Returns:
        VOI for the VOIPoints in this class.
      • setPointVOI

        public void setPointVOI​(VOI newVOI)
        All VOIPoints are stored in one VOI contained in this class. This function sets that VOI used when the user copies VOIPoints from the reference to the adjustable image or vice versa.
        Parameters:
        newVOI - new set of VOIPoints.
      • getXCoords

        public int[] getXCoords()
        Returns an array containing the list of X coordinates for the VOIPoints.
        Returns:
        int[] list of x coordinates
      • getYCoords

        public int[] getYCoords()
        Returns an array containing the list of Y coordinates for the VOIPoints.
        Returns:
        int[] list of y coordinates
      • setRotate

        public void setRotate​(TransMatrix kMat)
        Sets the TransMatrix for the set of VOIPoints contained in this class.
        Parameters:
        kMat - new TransMatrix
      • isReference

        public boolean isReference()
        Returns true if this is the reference image.
        Returns:
        true if this is the reference image.
      • resetAdjustableVOIs

        public void resetAdjustableVOIs​(double[][] pointSetA,
                                        double[][] pointSetB)
        Resets all of the VOIPoint's by moving them from pointSet A to point set B.
        Parameters:
        pointSetA - current VOIPoints locations
        pointSetB - locations to where the VOIPoints should be moved
      • setCenterPtLocation

        public void setCenterPtLocation​(int centerPtLoc)
        Sets the center point of rotation to this location.
        Parameters:
        centerPtLoc - int