Class ViewJComponentDTIImage

  • 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 ViewJComponentDTIImage
    extends ViewJComponentEditImage
    ViewJComponent DTI Image
    Author:
    pandyan References: Developed in concert with Sinisa Pajevic from the NIH/CIT/DCB/MSCL group, Lin-Ching Chang D.Sc., Carlo Pierpaoli MD Ph.D., and Lindsay Walker MS from the the NIH/NICHD/LIMB/STBB group and Olga Vovk from the NIH/CIT/DCB/ISL/BIRSS group: Mathematical and Statistical Computing Laboratory (MSCL) Biomedical Imaging Research Services Section (BIRSS) Imaging Sciences Laboratory (ISL) Division of Cumputational Bioscience (DCB) Center for Informational Technology (CIT) Section on Tissue Biophysics and Biomimetics (STBB) Laboratory of Integrative and Medical Biophysics (LIMB) National Institute of Child Health & Humann Development National Institutes of Health Publication Reference: S. Pajevic and C. Pierpaoli, "Color Schemes to Represent the Orientation of Anisotropic Tissues from Diffusion Tensor Data: Application to White Matter Fiber Tract Mapping in the Human Brain," Magnetic Resonance in Medicine, vol. 42, no. 3, pp. 526-540, 1999
    See Also:
    Serialized Form
    • Field Detail

      • type

        private java.lang.String type
        type of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM *
      • pS

        private float pS
        sat vs theta *
      • pC

        private float pC
        color range *
      • pB

        private float pB
        blue saturation *
      • pG

        private float pG
        green adj *
      • gamma

        private float gamma
        gamma correction *
      • twoPi

        private float twoPi
        two pi *
      • piDivTwo

        private float piDivTwo
        pi div two *
      • blueShiftColors

        private float[] blueShiftColors
        arry of r,g,b after blue shift *
      • redShiftColors

        private float[] redShiftColors
        array of r,g,b values after red shifting *
      • greenAdjColors

        private float[] greenAdjColors
        arry of r,g,b after green adj *
      • anisotropyMax

        private float anisotropyMax
        anisotropy max *
      • anisotropyMin

        private float anisotropyMin
        anisotropy min *
      • anisotropyBuffer

        private float[] anisotropyBuffer
        anisotropy file data buffer *
      • clippedBuffer

        private float[] clippedBuffer
        anisotropy file data buffer *
      • stevensBeta

        private float stevensBeta
        Stevens Beta *
      • adjustExp

        private float adjustExp
        adjust exp *
      • isMultiply

        private boolean isMultiply
        boolean for truncate/multiply *
      • truncMultColors

        private float[] truncMultColors
        arry of r,g,b after scaling/truncating *
    • Constructor Detail

      • ViewJComponentDTIImage

        public ViewJComponentDTIImage​(ViewJFrameBase _frame,
                                      ModelImage _imageA,
                                      ModelLUT _LUTa,
                                      float[] imgBufferA,
                                      int[] pixelBuffer,
                                      float zoom,
                                      int[] extents,
                                      boolean logMagDisplay,
                                      int _orientation,
                                      float[] anisotropyBuffer)
        constructor
        Parameters:
        _frame -
        _imageA -
        _LUTa -
        imgBufferA -
        pixelBuffer -
        zoom -
        extents -
        logMagDisplay -
        _orientation -
    • Method Detail

      • show

        public boolean show​(int tSlice,
                            int zSlice,
                            boolean forceShow,
                            java.lang.String type,
                            float pS,
                            float pB,
                            float pC,
                            float pG,
                            float gamma,
                            float anisotropyMin,
                            float anisotropyMax,
                            float stevensBeta,
                            float adjustExp,
                            boolean isMultiply)
        For generating the display of 1 or 2 images.
        Parameters:
        tSlice - t (time) slice to show
        zSlice - z slice to show
        forceShow - forces this method to import image and recalculate java image
        Returns:
        boolean to indicate if the show was successful
      • show

        public boolean show​(int tSlice,
                            int zSlice,
                            ModelLUT _LUTa,
                            ModelLUT _LUTb,
                            boolean forceShow,
                            int interpMode)
        Shows the image and the VOI(s).
        Overrides:
        show in class ViewJComponentEditImage
        Parameters:
        tSlice - t (time) slice to show
        zSlice - z slice to show
        _LUTa - LUTa - to change to new LUT for imageA else null
        _LUTb - LUTb - to change to new LUT for imageB else null
        forceShow - forces this method to import image and recalculate java image
        interpMode - image interpolation method (Nearest or Smooth)
        Returns:
        boolean to indicate if the show was successful
      • absoluteValue

        public void absoluteValue​(int zSlice,
                                  float[] buff)
        absolute value
        Parameters:
        zSlice -
        buff -
      • noSymm

        public void noSymm​(int zSlice,
                           float[] buff)
        no symmetry
        Parameters:
        zSlice -
        buff -
      • rotationalSymm

        public void rotationalSymm​(int zSlice,
                                   float[] buff)
        rotationsl symmetry
        Parameters:
        zSlice -
        buff -
      • mirrorSymm

        public void mirrorSymm​(int zSlice,
                               float[] buff)
        mirror symmetry
        Parameters:
        zSlice -
        buff -
      • clipAnisotropyBuffer

        public void clipAnisotropyBuffer()
        clipAnisotropyBuffer
      • truncateRGB

        public float[] truncateRGB​(float r1,
                                   float g1,
                                   float b1,
                                   float scale)
        truncat RGB based on heuristic parameters
        Parameters:
        r1 -
        g1 -
        b1 -
        scale -
        Returns:
      • shiftBlue

        public float[] shiftBlue​(float r1,
                                 float g1,
                                 float b1)
        blue shift
        Parameters:
        r1 -
        g1 -
        b1 -
        Returns:
      • shiftRed

        public float[] shiftRed​(float r1,
                                float g1,
                                float b1)
        red shift
        Parameters:
        r1 -
        g1 -
        b1 -
        Returns:
      • adjustGreen

        public float[] adjustGreen​(float r1,
                                   float g1,
                                   float b1)
        adjust green intensity
        Parameters:
        r1 -
        g1 -
        b1 -
        Returns:
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent mouseEvent)
        mouse clicked
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Overrides:
        mouseClicked in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggers function; contains click count
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent mouseEvent)
        mouse dragged
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggered function
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent mouseEvent)
        mouse entered
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
        Overrides:
        mouseEntered in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent mouseEvent)
        mouse exited
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
        Overrides:
        mouseExited in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggered function
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent mouseEvent)
        mouse moved
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggered the function
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent mouseEvent)
        mouse pressed
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggered function
      • mousePressedPaint

        protected void mousePressedPaint​(java.awt.event.MouseEvent mouseEvent)
        mouse pressed paint
        Overrides:
        mousePressedPaint in class ViewJComponentEditImage
        Parameters:
        mouseEvent - the mouseEvent that triggered this function call.
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent mouseEvent)
        mouse released
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class ViewJComponentEditImage
        Parameters:
        mouseEvent - event that triggered function
      • mouseWheelMoved

        public void mouseWheelMoved​(java.awt.event.MouseWheelEvent mouseWheelEvent)
        mouse wheel moved
        Specified by:
        mouseWheelMoved in interface java.awt.event.MouseWheelListener
        Overrides:
        mouseWheelMoved in class ViewJComponentEditImage
        Parameters:
        mouseWheelEvent - DOCUMENT ME!