Class JPanelBrainSurfaceFlattener_WM
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.renderer.WildMagic.brainflattenerview_WM.JPanelBrainSurfaceFlattener_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
public class JPanelBrainSurfaceFlattener_WM extends javax.swing.JPanel implements java.awt.event.ActionListener, ViewImageUpdateInterface
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JButton
cancelButton
Cancel button is used on most dialogs.private boolean
m_bFileLoaded
Set to true when a surface has been loadedprivate boolean
m_bFirstSurface
Causes the surface LUT to be calculated for the first time.private int
m_iGridY
Keeps track of the user-interface position in the main panel.private javax.swing.JRadioButton
m_kDisablePick
Enable/disable correspondence pickingprivate javax.swing.ButtonGroup
m_kDisplayButtonGroup
ButtonGroup for the plane/surface display selection.private javax.swing.JRadioButton
m_kDisplayPlane
Toggle displaying the plane on/offprivate javax.swing.JRadioButton
m_kDisplaySphere
Toggle displaying the sphere on/offprivate javax.swing.JPanel
m_kInsidePanel
Panel container.private javax.swing.JCheckBox
m_kLatLonLines
Toggle display of latitude/longitude lines on/off.private ModelLUT
m_kLUTa
Color LUT based on Volume Dataprivate ModelImage
m_kLUTImageA
Volume data for LUTprivate javax.swing.JTextField
m_kNumLatText
Text box for entering the number of latitude lines.private javax.swing.JTextField
m_kNumLonText
Text box for entering the number of longitude lines.private JFrameHistogram
m_kPanelBrainsurfaceFlattenerLUT
LUT Panel based on surface curvature.private javax.swing.ButtonGroup
m_kPickButtonGroup
Picking button group -- switch between picking correspondence points and the puncture triangle.private javax.swing.JRadioButton
m_kPickCorrespondence
Correspondence point picking.private javax.swing.JRadioButton
m_kPickPuncture
Puncture triangle picking.private WildMagic.LibGraphics.SceneGraph.TriMesh
m_kTriangleMesh
Brain Surface TriMeshprivate CorticalAnalysisRender
m_kView
Brain Surface Renderer.private VolumeTriPlanarInterface
m_kVolumeViewer
Parent user-interface frame.protected javax.swing.JPanel
mainPanel
The main control.protected javax.swing.JButton
OKButton
OK button is used on most dialogs.private javax.swing.JScrollPane
scroller
The scroll pane holding the panel content.private static long
serialVersionUID
Use serialVersionUID for interoperability.protected java.awt.Font
serif12
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
protected java.awt.Font
serif12B
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JPanelBrainSurfaceFlattener_WM(CorticalAnalysisRender kView, VolumeTriPlanarInterface kParent)
Create the control-panel for the brainsurfaceFlattener interface:
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
protected javax.swing.JButton
buildOKButton()
Builds the OK button.static javax.swing.border.TitledBorder
buildTitledBorder(java.lang.String title)
Builds a titled border with the given title, an etched border, and the proper font and color.private void
createLUTFromSurface()
Creates a LUT for the surface, where the curvature values are used in the look-up table instead of the ModelImage values:WildMagic.LibGraphics.SceneGraph.Node
displayCorticalAnalysis(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
void
disposeLocal()
Memory cleanup.protected void
finalize()
ModelImage
getImageA()
Return ModelImage A.ModelImage
getImageB()
Return ModelImage B.javax.swing.JPanel
getMainPanel()
Return the main control panel.private void
init()
Initialize the user-interface, buttons and ActionCommands.void
resizePanel(int panelWidth, int frameHeight)
Resizing the control panel.void
setSlice(int slice)
setSlice.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 javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
mainPanel
protected javax.swing.JPanel mainPanel
The main control.
-
serif12
protected java.awt.Font serif12
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
-
serif12B
protected java.awt.Font serif12B
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
-
OKButton
protected javax.swing.JButton OKButton
OK button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.
-
cancelButton
protected javax.swing.JButton cancelButton
Cancel button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.
-
m_bFileLoaded
private boolean m_bFileLoaded
Set to true when a surface has been loaded
-
m_bFirstSurface
private boolean m_bFirstSurface
Causes the surface LUT to be calculated for the first time.
-
m_iGridY
private int m_iGridY
Keeps track of the user-interface position in the main panel.
-
m_kDisablePick
private javax.swing.JRadioButton m_kDisablePick
Enable/disable correspondence picking
-
m_kDisplayButtonGroup
private javax.swing.ButtonGroup m_kDisplayButtonGroup
ButtonGroup for the plane/surface display selection.
-
m_kDisplayPlane
private javax.swing.JRadioButton m_kDisplayPlane
Toggle displaying the plane on/off
-
m_kDisplaySphere
private javax.swing.JRadioButton m_kDisplaySphere
Toggle displaying the sphere on/off
-
m_kLatLonLines
private javax.swing.JCheckBox m_kLatLonLines
Toggle display of latitude/longitude lines on/off.
-
m_kLUTa
private ModelLUT m_kLUTa
Color LUT based on Volume Data
-
m_kLUTImageA
private ModelImage m_kLUTImageA
Volume data for LUT
-
m_kNumLatText
private javax.swing.JTextField m_kNumLatText
Text box for entering the number of latitude lines.
-
m_kNumLonText
private javax.swing.JTextField m_kNumLonText
Text box for entering the number of longitude lines.
-
m_kPanelBrainsurfaceFlattenerLUT
private JFrameHistogram m_kPanelBrainsurfaceFlattenerLUT
LUT Panel based on surface curvature.
-
m_kPickButtonGroup
private javax.swing.ButtonGroup m_kPickButtonGroup
Picking button group -- switch between picking correspondence points and the puncture triangle.
-
m_kPickCorrespondence
private javax.swing.JRadioButton m_kPickCorrespondence
Correspondence point picking.
-
m_kPickPuncture
private javax.swing.JRadioButton m_kPickPuncture
Puncture triangle picking.
-
m_kTriangleMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kTriangleMesh
Brain Surface TriMesh
-
m_kView
private CorticalAnalysisRender m_kView
Brain Surface Renderer.
-
scroller
private javax.swing.JScrollPane scroller
The scroll pane holding the panel content. Useful when the screen is small.
-
m_kInsidePanel
private javax.swing.JPanel m_kInsidePanel
Panel container.
-
m_kVolumeViewer
private VolumeTriPlanarInterface m_kVolumeViewer
Parent user-interface frame.
-
-
Constructor Detail
-
JPanelBrainSurfaceFlattener_WM
public JPanelBrainSurfaceFlattener_WM(CorticalAnalysisRender kView, VolumeTriPlanarInterface kParent)
Create the control-panel for the brainsurfaceFlattener interface:- Parameters:
kView
- the engine behind the brainsurfaceFlattener and one of the parent frames affected by the interfacekParentFrame
- the parent frame for the panel, contains the surfaceRenderer, where the brain model is displayed
-
-
Method Detail
-
buildTitledBorder
public static javax.swing.border.TitledBorder buildTitledBorder(java.lang.String title)
Builds a titled border with the given title, an etched border, and the proper font and color. Changed to public static member so that it can be used for other JPanels not inherited from this base class.- Parameters:
title
- Title of the border- Returns:
- The titled border.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
displayCorticalAnalysis
public WildMagic.LibGraphics.SceneGraph.Node displayCorticalAnalysis(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
- Parameters:
kMesh
-- Returns:
- Scene-graph node containing the TriMesh lat/lon lines.
-
disposeLocal
public void disposeLocal()
Memory cleanup.
-
getImageA
public ModelImage getImageA()
Return ModelImage A.- Returns:
- ModelImage A.
-
getImageB
public ModelImage getImageB()
Return ModelImage B.- Returns:
- ModelImage B.
-
getMainPanel
public javax.swing.JPanel getMainPanel()
Return the main control panel.- Returns:
- JPanel the main control panel
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)
Resizing the control panel.- Parameters:
panelWidth
- int widthframeHeight
- int height
-
setSlice
public void setSlice(int slice)
Description copied from interface:ViewImageUpdateInterface
setSlice.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- Current slice
-
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
-
createLUTFromSurface
private void createLUTFromSurface()
Creates a LUT for the surface, where the curvature values are used in the look-up table instead of the ModelImage values:
-
init
private void init()
Initialize the user-interface, buttons and ActionCommands.
-
buildOKButton
protected javax.swing.JButton buildOKButton()
Builds the OK button. Sets it internally as well return the just-built button.- Returns:
- OK button.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-