Class JPanelSurfaceTexture_WM
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
-
- gov.nih.mipav.view.renderer.WildMagic.Interface.JPanelSurfaceTexture_WM
-
- All Implemented Interfaces:
ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.CancelListener, JInterfaceBase.DrawingPanel, JInterfaceBase.OkColorListener
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private JPanelSurface_WM
m_kSurfacePanel
Surface panelprivate JFrameHistogram
mHistogram
Display the independent LUT for Black/White images.private ModelImage
mImageA
ModelImage used to generate the 3D texture:.private ModelImage
mImageALink
Reference to ModelImage A for linking the texture to the imageA LUT.private javax.swing.JCheckBox
mImageAsTextureCheck
RadioButton for turing on the surface image texture:.private javax.swing.ButtonGroup
mImageButtonGroup
Grouping the radio buttons:.private java.lang.String
mImageDirName
Stores the currently-loaded ModelImage directory name:.private java.lang.String
mImageFileName
Stores the currently-loaded ModelImage file name:.private javax.swing.JLabel
mImageFileNameLabel
Display the currently-loaded ModelImage file name:.private javax.swing.JButton
mLoadImageButton
Load a new ModelImage:.private javax.swing.ButtonGroup
mLUTButtonGroup
Grouping the radio buttons:.private ModelImage
mLUTImageA
Independent ModelImage for independent LUT.private ModelStorageBase
mLUTModel
The LUT associated with the ModelImage imageA:.private ModelStorageBase
mLUTSeparate
The LUT associated with the independent texture LUT:.private javax.swing.JRadioButton
mModelImageRadioButton
Use the ModelImage LUT.private javax.swing.JRadioButton
mModelLUTRadioButton
Use the ModelImage LUT.private javax.swing.JRadioButton
mNewImageRadioButton
Use a separate LUT.private javax.swing.JRadioButton
mNewLUTRadioButton
Use a separate LUT.private static long
serialVersionUID
Use serialVersionUID for interoperability.-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
cancelButton, colorChooser, m_kVolumeViewer, mainPanel, OKButton, rayBasedRenderWM
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JPanelSurfaceTexture_WM(VolumeTriPlanarInterface kVolumeViewer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
void
disposeLocal()
Removes this object from the ModelImage imageDisplayListener list.boolean
getEnabled()
java.lang.String
getImageDir()
java.lang.String
getImageFileName()
ModelImage
getImageLink()
Returns The SurfaceRender ModelImage imageA for linking to the LUT.ModelImage
getImageSeparate()
Returns the ModelImage associated with the independent LUT.ModelStorageBase
getLUT()
Return the current ModelLUT.ModelStorageBase
getSeparateLUT()
ModelImage
getTextureImage()
Returns The ModelImage that is the data source for the Texture3D.boolean
getTextureImageOn()
boolean
getTextureLUTOn()
boolean
getTextureOn()
private void
init()
Initializes the interface, and generates the first default texture.private void
initLUT()
Initializes or re-initializes the Histogram LUT interface based on the currently-loaded ModelImage.private void
loadingImage()
Load a new ModelImage to use for the 3D Texture display:void
setEnabled(boolean flag)
Enables or disables the interface.void
setRGBTA(ModelRGB RGBTa)
Update the ModelRGB associated with the separate texture, and regenerate the ImageComponente3D volume texture.void
setSeparateLUT(ModelStorageBase kLUT)
void
setSlice(int slice)
setSlice.void
setSurfacePanel(JPanelSurface_WM kSurfacePanel)
Sets the surface panel.void
setTextureImage(java.lang.String kDir, java.lang.String kFileName)
void
setTextureImageOn(boolean bOn)
void
setTextureLUTOn(boolean bOn)
void
setTextureOn(boolean bOn)
void
setTimeSlice(int tSlice)
setTimeSlice.boolean
updateImageExtents()
This methods calls the componentImage's REPAINT method to redraw the screen.boolean
updateImages()
This methods calls the componentImage's REPAINT method to redraw the screen.boolean
updateImages(boolean flag)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
This methods calls the componentImage's update method to redraw the screen.-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
buildCancelButton, buildOKButton, buildTitledBorder, getMainPanel, setButtonColor, updateColorButton
-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
mHistogram
private JFrameHistogram mHistogram
Display the independent LUT for Black/White images.
-
mImageA
private ModelImage mImageA
ModelImage used to generate the 3D texture:.
-
mImageALink
private ModelImage mImageALink
Reference to ModelImage A for linking the texture to the imageA LUT.
-
mImageAsTextureCheck
private javax.swing.JCheckBox mImageAsTextureCheck
RadioButton for turing on the surface image texture:.
-
mImageDirName
private java.lang.String mImageDirName
Stores the currently-loaded ModelImage directory name:.
-
mImageFileName
private java.lang.String mImageFileName
Stores the currently-loaded ModelImage file name:.
-
mImageFileNameLabel
private javax.swing.JLabel mImageFileNameLabel
Display the currently-loaded ModelImage file name:.
-
mLoadImageButton
private javax.swing.JButton mLoadImageButton
Load a new ModelImage:.
-
mModelImageRadioButton
private javax.swing.JRadioButton mModelImageRadioButton
Use the ModelImage LUT.
-
mNewImageRadioButton
private javax.swing.JRadioButton mNewImageRadioButton
Use a separate LUT.
-
mImageButtonGroup
private javax.swing.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 javax.swing.JRadioButton mModelLUTRadioButton
Use the ModelImage LUT.
-
mNewLUTRadioButton
private javax.swing.JRadioButton mNewLUTRadioButton
Use a separate LUT.
-
mLUTButtonGroup
private javax.swing.ButtonGroup mLUTButtonGroup
Grouping the radio buttons:.
-
m_kSurfacePanel
private JPanelSurface_WM m_kSurfacePanel
Surface panel
-
-
Constructor Detail
-
JPanelSurfaceTexture_WM
public JPanelSurfaceTexture_WM(VolumeTriPlanarInterface kVolumeViewer)
Constructor.- Parameters:
kVolumeViewer
- parent frame.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.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 java.lang.String getImageFileName()
-
getImageDir
public java.lang.String getImageDir()
-
setTextureImage
public void setTextureImage(java.lang.String kDir, java.lang.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 classjava.awt.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 interfaceViewImageUpdateInterface
- 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 interfaceViewImageUpdateInterface
- 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 interfaceViewImageUpdateInterface
- 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 interfaceViewImageUpdateInterface
- 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 interfaceViewImageUpdateInterface
- 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 interfaceViewImageUpdateInterface
- Parameters:
LUTa
- LUT used to update imageALUTb
- LUT used to update imageBflag
- forces show to re import image and calc. java imageinterpMode
- 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:
-
-