Class JPanelSurfaceTexture_WM

All Implemented Interfaces:
ViewImageUpdateInterface, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JPanelSurfaceTexture_WM extends JInterfaceBase implements ViewImageUpdateInterface
JPanelSurfaceTexture. Enables texture-mapping of the ModelImage data onto a surface triangle mesh.

The user can change the ModelLUT independently of the ModelLUT associated with the ModelImage, or if the user selects the option of using the ModelLUT associated with the ModelImage, then the texture updates as the user updates that LUT. This class implements the ViewImageUpdateInterface to capture LUT changes.

See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • mHistogram

      private JFrameHistogram mHistogram
      Display the independent LUT for Black/White images.
    • mImageA

      private ModelImage mImageA
      ModelImage used to generate the 3D texture:.
    • mImageAsTextureCheck

      private JCheckBox mImageAsTextureCheck
      RadioButton for turing on the surface image texture:.
    • mImageDirName

      private String mImageDirName
      Stores the currently-loaded ModelImage directory name:.
    • mImageFileName

      private String mImageFileName
      Stores the currently-loaded ModelImage file name:.
    • mImageFileNameLabel

      private JLabel mImageFileNameLabel
      Display the currently-loaded ModelImage file name:.
    • mLoadImageButton

      private JButton mLoadImageButton
      Load a new ModelImage:.
    • mModelImageRadioButton

      private JRadioButton mModelImageRadioButton
      Use the ModelImage LUT.
    • mNewImageRadioButton

      private JRadioButton mNewImageRadioButton
      Use a separate LUT.
    • mImageButtonGroup

      private ButtonGroup mImageButtonGroup
      Grouping the radio buttons:.
    • mLUTImageA

      private ModelImage mLUTImageA
      Independent ModelImage for independent LUT.
    • mLUTModel

      private ModelStorageBase mLUTModel
      The LUT associated with the ModelImage imageA:.
    • mLUTSeparate

      private ModelStorageBase mLUTSeparate
      The LUT associated with the independent texture LUT:.
    • mModelLUTRadioButton

      private JRadioButton mModelLUTRadioButton
      Use the ModelImage LUT.
    • mNewLUTRadioButton

      private JRadioButton mNewLUTRadioButton
      Use a separate LUT.
    • mLUTButtonGroup

      private ButtonGroup mLUTButtonGroup
      Grouping the radio buttons:.
    • m_kSurfacePanel

      private JPanelSurface_WM m_kSurfacePanel
      Surface panel
  • Constructor Details

    • JPanelSurfaceTexture_WM

      public JPanelSurfaceTexture_WM(VolumeTriPlanarInterface kVolumeViewer)
      Constructor.
      Parameters:
      kVolumeViewer - parent frame.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • disposeLocal

      public void disposeLocal()
      Removes this object from the ModelImage imageDisplayListener list.
    • getImageLink

      public ModelImage getImageLink()
      Returns The SurfaceRender ModelImage imageA for linking to the LUT.
      Returns:
      mImageALink, for identifying the ModelLUT associated with mImageA.
    • getImageSeparate

      public ModelImage getImageSeparate()
      Returns the ModelImage associated with the independent LUT.
      Returns:
      the ModelImage associated with the independent LUT
    • getLUT

      public ModelStorageBase getLUT()
      Return the current ModelLUT.
      Returns:
      the currently used ModelLUT.
    • getSeparateLUT

      public ModelStorageBase getSeparateLUT()
    • setSeparateLUT

      public void setSeparateLUT(ModelStorageBase kLUT)
    • getTextureImage

      public ModelImage getTextureImage()
      Returns The ModelImage that is the data source for the Texture3D.
      Returns:
      mImageA, the ModelImage used to generate the Texture3D
    • getImageFileName

      public String getImageFileName()
    • getImageDir

      public String getImageDir()
    • setTextureImage

      public void setTextureImage(String kDir, String kFileName)
    • getTextureImageOn

      public boolean getTextureImageOn()
    • setTextureImageOn

      public void setTextureImageOn(boolean bOn)
    • getTextureLUTOn

      public boolean getTextureLUTOn()
    • setTextureLUTOn

      public void setTextureLUTOn(boolean bOn)
    • getTextureOn

      public boolean getTextureOn()
    • setTextureOn

      public void setTextureOn(boolean bOn)
    • getEnabled

      public boolean getEnabled()
    • setEnabled

      public void setEnabled(boolean flag)
      Enables or disables the interface. Called when a surface is added/removed from the JPanelSurface class.
      Overrides:
      setEnabled in class Component
      Parameters:
      flag - when true enable the interface, when false disable the interface.
    • setRGBTA

      public void setRGBTA(ModelRGB RGBTa)
      Update the ModelRGB associated with the separate texture, and regenerate the ImageComponente3D volume texture.
      Parameters:
      RGBTa - the new ModelRGB for the separate texture.
    • setSlice

      public void setSlice(int slice)
      Description copied from interface: ViewImageUpdateInterface
      setSlice.
      Specified by:
      setSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - Current slice
    • setSurfacePanel

      public void setSurfacePanel(JPanelSurface_WM kSurfacePanel)
      Sets the surface panel.
      Parameters:
      kSurfacePanel - surface panel.
    • setTimeSlice

      public void setTimeSlice(int tSlice)
      Description copied from interface: ViewImageUpdateInterface
      setTimeSlice.
      Specified by:
      setTimeSlice in interface ViewImageUpdateInterface
      Parameters:
      tSlice - Current time volume
    • updateImageExtents

      public boolean updateImageExtents()
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.
      Specified by:
      updateImageExtents in interface ViewImageUpdateInterface
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages()
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(boolean flag)
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Parameters:
      flag - forces show to re import image and calc. java image
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's update method to redraw the screen.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Parameters:
      LUTa - LUT used to update imageA
      LUTb - LUT used to update imageB
      flag - forces show to re import image and calc. java image
      interpMode - image interpolation method (Nearest or Smooth)
      Returns:
      boolean confirming a successful update
    • init

      private void init()
      Initializes the interface, and generates the first default texture.
    • initLUT

      private void initLUT()
      Initializes or re-initializes the Histogram LUT interface based on the currently-loaded ModelImage.
    • loadingImage

      private void loadingImage()
      Load a new ModelImage to use for the 3D Texture display: