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,ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.CancelListener, JInterfaceBase.DrawingPanel, JInterfaceBase.OkColorListenerNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JPanelSurface_WMSurface panelprivate JFrameHistogramDisplay the independent LUT for Black/White images.private ModelImageModelImage used to generate the 3D texture:.private ModelImageReference to ModelImage A for linking the texture to the imageA LUT.private JCheckBoxRadioButton for turing on the surface image texture:.private ButtonGroupGrouping the radio buttons:.private StringStores the currently-loaded ModelImage directory name:.private StringStores the currently-loaded ModelImage file name:.private JLabelDisplay the currently-loaded ModelImage file name:.private JButtonLoad a new ModelImage:.private ButtonGroupGrouping the radio buttons:.private ModelImageIndependent ModelImage for independent LUT.private ModelStorageBaseThe LUT associated with the ModelImage imageA:.private ModelStorageBaseThe LUT associated with the independent texture LUT:.private JRadioButtonUse the ModelImage LUT.private JRadioButtonUse the ModelImage LUT.private JRadioButtonUse a separate LUT.private JRadioButtonUse a separate LUT.private static final longUse serialVersionUID for interoperability.Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
cancelButton, colorChooser, m_kVolumeViewer, mainPanel, OKButton, rayBasedRenderWMFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJPanelSurfaceTexture_WM(VolumeTriPlanarInterface kVolumeViewer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidRemoves this object from the ModelImage imageDisplayListener list.booleanReturns The SurfaceRender ModelImage imageA for linking to the LUT.Returns the ModelImage associated with the independent LUT.getLUT()Return the current ModelLUT.Returns The ModelImage that is the data source for the Texture3D.booleanbooleanbooleanprivate voidinit()Initializes the interface, and generates the first default texture.private voidinitLUT()Initializes or re-initializes the Histogram LUT interface based on the currently-loaded ModelImage.private voidLoad a new ModelImage to use for the 3D Texture display:voidsetEnabled(boolean flag) Enables or disables the interface.voidUpdate the ModelRGB associated with the separate texture, and regenerate the ImageComponente3D volume texture.voidvoidsetSlice(int slice) setSlice.voidsetSurfacePanel(JPanelSurface_WM kSurfacePanel) Sets the surface panel.voidsetTextureImage(String kDir, String kFileName) voidsetTextureImageOn(boolean bOn) voidsetTextureLUTOn(boolean bOn) voidsetTextureOn(boolean bOn) voidsetTimeSlice(int tSlice) setTimeSlice.booleanThis methods calls the componentImage's REPAINT method to redraw the screen.booleanThis methods calls the componentImage's REPAINT method to redraw the screen.booleanupdateImages(boolean flag) This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(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, updateColorButtonMethods 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, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods 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, toFrontMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
mHistogram
Display the independent LUT for Black/White images. -
mImageA
ModelImage used to generate the 3D texture:. -
mImageALink
Reference to ModelImage A for linking the texture to the imageA LUT. -
mImageAsTextureCheck
RadioButton for turing on the surface image texture:. -
mImageDirName
Stores the currently-loaded ModelImage directory name:. -
mImageFileName
Stores the currently-loaded ModelImage file name:. -
mImageFileNameLabel
Display the currently-loaded ModelImage file name:. -
mLoadImageButton
Load a new ModelImage:. -
mModelImageRadioButton
Use the ModelImage LUT. -
mNewImageRadioButton
Use a separate LUT. -
mImageButtonGroup
Grouping the radio buttons:. -
mLUTImageA
Independent ModelImage for independent LUT. -
mLUTModel
The LUT associated with the ModelImage imageA:. -
mLUTSeparate
The LUT associated with the independent texture LUT:. -
mModelLUTRadioButton
Use the ModelImage LUT. -
mNewLUTRadioButton
Use a separate LUT. -
mLUTButtonGroup
Grouping the radio buttons:. -
m_kSurfacePanel
Surface panel
-
-
Constructor Details
-
JPanelSurfaceTexture_WM
Constructor.- Parameters:
kVolumeViewer- parent frame.
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
disposeLocal
public void disposeLocal()Removes this object from the ModelImage imageDisplayListener list. -
getImageLink
Returns The SurfaceRender ModelImage imageA for linking to the LUT.- Returns:
- mImageALink, for identifying the ModelLUT associated with mImageA.
-
getImageSeparate
Returns the ModelImage associated with the independent LUT.- Returns:
- the ModelImage associated with the independent LUT
-
getLUT
Return the current ModelLUT.- Returns:
- the currently used ModelLUT.
-
getSeparateLUT
-
setSeparateLUT
-
getTextureImage
Returns The ModelImage that is the data source for the Texture3D.- Returns:
- mImageA, the ModelImage used to generate the Texture3D
-
getImageFileName
-
getImageDir
-
setTextureImage
-
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:
setEnabledin classComponent- Parameters:
flag- when true enable the interface, when false disable the interface.
-
setRGBTA
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:ViewImageUpdateInterfacesetSlice.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- Current slice
-
setSurfacePanel
Sets the surface panel.- Parameters:
kSurfacePanel- surface panel.
-
setTimeSlice
public void setTimeSlice(int tSlice) Description copied from interface:ViewImageUpdateInterfacesetTimeSlice.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
tSlice- Current time volume
-
updateImageExtents
public boolean updateImageExtents()Description copied from interface:ViewImageUpdateInterfaceThis 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:
updateImageExtentsin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages()Description copied from interface:ViewImageUpdateInterfaceThis methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean flag) Description copied from interface:ViewImageUpdateInterfaceThis methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
flag- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
Description copied from interface:ViewImageUpdateInterfaceThis methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin 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:
-