Class ViewJComponentTriSliceImage

java.lang.Object
gov.nih.mipav.view.renderer.J3D.ViewJComponentTriSliceImage

public class ViewJComponentTriSliceImage extends Object
Image plane displayed in the surface renderer. The image plane is initialized with one of the following orientations: FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL. ViewJComponentTriSliceImage contains oriented 2D slices of the ModelImage data, reconfigured to the axial, sagittal, and coronal coordinates. It passes the oriented 2D ModelImage slice buffer to the SurfaceRender object where it is used as a Texture2D object on a texture-mapped polygon.
Version:
0.1 Nov 18, 1997
Author:
Matthew J. McAuliffe, Ph.D. (primary)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float
    AlphaBlending values for compositing two images.
    Frame where the component image is displayed.
    private ModelImage
    Model for image A.
    private ModelImage
    Model for active image.
    private ModelImage
    Model for image A.
    BufferedImage to hold the slice image.
    private int[]
    Extents of the 3D image.
    private PatientSlice
    PatientSlice contains all the Patient Coordinate System view-specific data for rendering this component:
    private int
    Orientation of this component image.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ViewJComponentTriSliceImage(SurfaceRender _frame, ModelImage _imageA, ModelImage _imageB, int _orientation)
    Constructs new component image plane with the appropriate arrays.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets all variables to null, disposes, and garbage collects.
    protected void
    Calls garbage collector to release system resources.
    float
    Accessor that returns the alphablend of the two image.
    boolean
    Returns whether the slice is axis-aligned or rotated.
    Get the buffered image.
    Accessor that returns the image A.
    Accessor that returns the image B.
    int
    Accessor that returns the component's orientation either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT
    void
    Interpolate(boolean bSample)
    When set to true, the m_kPatientSlice.showDiagonal function does tri-linear interpolation of the ModelImage data:
    void
    setAlphaBlend(int value)
    Sets the alpha blending of parameter for two image displaying.
    void
    setBuffers(float[] imgBufferA, float[] imgBufferB)
    Sets the buffers for the actual data, the displayable image, and the paint.
    void
    setCenter(int i, int j, int k)
    setCenter sets the PatientSlice center:
    void
    Sets component's Image A.
    void
    Sets component's Image B.
    void
    setImageBufferB(float[] buffer)
    Sets component's Image B data buffer.
    void
    Accessor that sets the model lut for the image A.
    void
    Accessor that sets the model lut for the image B.
    void
    setOrientation(int _orientation)
    Accessor that sets the orientation of the component either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT
    void
    Sets the RGB table for ARGB image A.
    void
    Sets the RGB table for ARGB image B.
    void
    setSlice(int _slice)
    Accessor that sets the slice of the image component.
    boolean
    show(int tSlice, int zSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, javax.vecmath.Vector3f[] akVertices)
    Shows the image.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • alphaBlend

      private float alphaBlend
      AlphaBlending values for compositing two images.
    • frame

      private SurfaceRender frame
      Frame where the component image is displayed.
    • imageA

      private ModelImage imageA
      Model for image A.
    • imageActive

      private ModelImage imageActive
      Model for active image.
    • imageB

      private ModelImage imageB
      Model for image A.
    • localImageExtents

      private int[] localImageExtents
      Extents of the 3D image.
    • img

      private BufferedImage img
      BufferedImage to hold the slice image.
    • orientation

      private int orientation
      Orientation of this component image.
    • m_kPatientSlice

      private PatientSlice m_kPatientSlice
      PatientSlice contains all the Patient Coordinate System view-specific data for rendering this component:
  • Constructor Details

    • ViewJComponentTriSliceImage

      public ViewJComponentTriSliceImage(SurfaceRender _frame, ModelImage _imageA, ModelImage _imageB, int _orientation)
      Constructs new component image plane with the appropriate arrays.
      Parameters:
      _frame - The SurfaceRender parent frame
      _imageA - Model of the image that will be displayed.
      _imageB - Model of the image that will be displayed.
      _orientation - Orientation of the image.
  • Method Details

    • disposeLocal

      public void disposeLocal()
      Sets all variables to null, disposes, and garbage collects.
    • getAlphaBlend

      public float getAlphaBlend()
      Accessor that returns the alphablend of the two image.
      Returns:
      Opacity of paint.
    • getImage

      public BufferedImage getImage()
      Get the buffered image.
      Returns:
      BufferedImage Buffered image.
    • getImageA

      public ModelImage getImageA()
      Accessor that returns the image A.
      Returns:
      Image A.
    • getImageB

      public ModelImage getImageB()
      Accessor that returns the image B.
      Returns:
      Image B.
    • getOrientation

      public int getOrientation()
      Accessor that returns the component's orientation either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT
      Returns:
      Image orientation (AXIAL, CORONAL, SAGITTAL)
    • Interpolate

      public void Interpolate(boolean bSample)
      When set to true, the m_kPatientSlice.showDiagonal function does tri-linear interpolation of the ModelImage data:
      Parameters:
      bSample - when true interpolate the ModelImage data
    • setAlphaBlend

      public void setAlphaBlend(int value)
      Sets the alpha blending of parameter for two image displaying.
      Parameters:
      value - Amount [0,100] that is the percentage of Image A to be displayed.
    • setBuffers

      public void setBuffers(float[] imgBufferA, float[] imgBufferB)
      Sets the buffers for the actual data, the displayable image, and the paint.
      Parameters:
      imgBufferA - Storage buffer used to display image A.
      imgBufferB - Storage buffer used to display image B.
    • setImageA

      public void setImageA(ModelImage image)
      Sets component's Image A.
      Parameters:
      image - The component's image A.
    • setImageB

      public void setImageB(ModelImage image)
      Sets component's Image B.
      Parameters:
      image - The component's image B.
    • setImageBufferB

      public void setImageBufferB(float[] buffer)
      Sets component's Image B data buffer.
      Parameters:
      buffer - The component's image B data buffer.
    • setLUTa

      public void setLUTa(ModelLUT LUT)
      Accessor that sets the model lut for the image A.
      Parameters:
      LUT - The model LUT for image A.
    • setLUTb

      public void setLUTb(ModelLUT LUT)
      Accessor that sets the model lut for the image B.
      Parameters:
      LUT - The model LUT for image B.
    • setOrientation

      public void setOrientation(int _orientation)
      Accessor that sets the orientation of the component either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT
      Parameters:
      _orientation - Orientaiton of image slice to be displayed.
    • setRGBTA

      public void setRGBTA(ModelRGB RGBT)
      Sets the RGB table for ARGB image A.
      Parameters:
      RGBT - RGB table.
    • setRGBTB

      public void setRGBTB(ModelRGB RGBT)
      Sets the RGB table for ARGB image B.
      Parameters:
      RGBT - RGB table.
    • setSlice

      public void setSlice(int _slice)
      Accessor that sets the slice of the image component.
      Parameters:
      _slice - Image slice to be displayed.
    • setCenter

      public void setCenter(int i, int j, int k)
      setCenter sets the PatientSlice center:
      Parameters:
      i - FileCoordinates
      j - FileCoordinates
      k - FileCoordinates
    • show

      public boolean show(int tSlice, int zSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, javax.vecmath.Vector3f[] akVertices)
      Shows the image.
      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.
      akVertices - four corners of the cut-plane bounding box for diagonal slices
      Returns:
      Confirms if the show updated the image
    • finalize

      protected void finalize() throws Throwable
      Calls garbage collector to release system resources.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - if there is a problem encountered during memory clean-up
    • getAxisAligned

      public boolean getAxisAligned()
      Returns whether the slice is axis-aligned or rotated.
      Returns:
      true when the slice is axis-aligned, false otherwise.