Class JPanelBrainSurfaceFlattener
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.renderer.JPanelRendererBase
-
- gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
-
- gov.nih.mipav.view.renderer.J3D.surfaceview.brainflattenerview.JPanelBrainSurfaceFlattener
-
- All Implemented Interfaces:
ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
public class JPanelBrainSurfaceFlattener extends JPanelRendererJ3D implements ViewImageUpdateInterface
DOCUMENT ME!- 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 private boolean
m_bFileLoaded
DOCUMENT ME!private boolean
m_bFirstSurface
DOCUMENT ME!private int
m_iGridY
DOCUMENT ME!private javax.swing.JButton
m_kButtonLoadImage
DOCUMENT ME!private javax.swing.JButton
m_kButtonLoadSurface
DOCUMENT ME!private javax.vecmath.Point3f
m_kCenter
DOCUMENT ME!private javax.swing.JRadioButton
m_kDisablePick
DOCUMENT ME!private javax.swing.ButtonGroup
m_kDisplayButtonGroup
DOCUMENT ME!private javax.swing.JRadioButton
m_kDisplayPlane
DOCUMENT ME!private javax.swing.JRadioButton
m_kDisplaySphere
DOCUMENT ME!private java.io.File
m_kFile
DOCUMENT ME!private ModelImage
m_kImage
DOCUMENT ME!private java.lang.String
m_kImageDir
DOCUMENT ME!private java.lang.String
m_kImageFile
DOCUMENT ME!private javax.swing.JLabel
m_kLabelFileName
DOCUMENT ME!private javax.swing.JLabel
m_kLabelFileNameImage
DOCUMENT ME!private javax.swing.JCheckBox
m_kLatLonLines
DOCUMENT ME!private ModelLUT
m_kLUTa
DOCUMENT ME!private ModelImage
m_kLUTImageA
DOCUMENT ME!private javax.swing.JTextField
m_kNumLatText
DOCUMENT ME!private javax.swing.JTextField
m_kNumLonText
DOCUMENT ME!private JFrameHistogram
m_kPanelBrainsurfaceFlattenerLUT
DOCUMENT ME!private ViewJFrameVolumeView
m_kParentFrame
DOCUMENT ME!private javax.swing.ButtonGroup
m_kPickButtonGroup
DOCUMENT ME!private javax.swing.JRadioButton
m_kPickCorrespondence
DOCUMENT ME!private javax.swing.JRadioButton
m_kPickPuncture
DOCUMENT ME!private java.lang.String
m_kSurfaceDir
DOCUMENT ME!private ModelTriangleMesh
m_kTriangleMesh
DOCUMENT ME!private MjCorticalAnalysis
m_kView
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
rayBasedRender, renderBase
-
Fields inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
applyButton, cancelButton, cancelFlag, closeButton, helpButton, isActiveImage, mainPanel, NEW, OKButton, REPLACE, runInSeparateThread, serif12, serif12B
-
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(MjCorticalAnalysis kView, ModelImage kImage, ViewJFrameVolumeView kParentFrame)
Create the control-panel for the brainsurfaceFlattener interface:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed, sets up the variables needed for running the algorithm, and calls the algorithm.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:private void
displayCorticalAnalysis()
Resets the Mesh Display, when the file is reloaded:void
disposeLocal()
DOCUMENT ME!protected void
finalize()
Delete all local member variables:ModelImage
getImageA()
DOCUMENT ME!ModelImage
getImageB()
DOCUMENT ME!javax.swing.JPanel
getMainPanel()
Return the main control panel.private void
init()
Initialize the user-interface, buttons and ActionCommands.private void
loadingImage()
Load a new ModelImage for the brainsurface flattener scene:private void
loadingSurface()
Load a new surface file for the brainsurface flattener scene:void
setSlice(int slice)
setSlice.void
setTimeSlice(int tSlice)
setTimeSlice.boolean
updateImageExtents()
updateImageExtents.boolean
updateImages()
updateImages.boolean
updateImages(boolean flag)
updateImages.boolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
updateImages.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
getSurfaceRender, setRayBasedRender, setSurfaceRender
-
Methods inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
buildApplyButton, buildCancelButton, buildCloseButton, buildHelpButton, buildOKButton, buildTitledBorder, focusGained, focusLost, isCancelled, itemStateChanged, keyPressed, keyReleased, keyTyped, makeString, resizePanel, setLeftHandSystem, setVisible, setVisibleStandard, setWCSystem, testParameter
-
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, 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
-
m_bFileLoaded
private boolean m_bFileLoaded
DOCUMENT ME!
-
m_bFirstSurface
private boolean m_bFirstSurface
DOCUMENT ME!
-
m_iGridY
private int m_iGridY
DOCUMENT ME!
-
m_kButtonLoadImage
private javax.swing.JButton m_kButtonLoadImage
DOCUMENT ME!
-
m_kButtonLoadSurface
private javax.swing.JButton m_kButtonLoadSurface
DOCUMENT ME!
-
m_kCenter
private javax.vecmath.Point3f m_kCenter
DOCUMENT ME!
-
m_kDisablePick
private javax.swing.JRadioButton m_kDisablePick
DOCUMENT ME!
-
m_kDisplayButtonGroup
private javax.swing.ButtonGroup m_kDisplayButtonGroup
DOCUMENT ME!
-
m_kDisplayPlane
private javax.swing.JRadioButton m_kDisplayPlane
DOCUMENT ME!
-
m_kDisplaySphere
private javax.swing.JRadioButton m_kDisplaySphere
DOCUMENT ME!
-
m_kFile
private java.io.File m_kFile
DOCUMENT ME!
-
m_kImage
private ModelImage m_kImage
DOCUMENT ME!
-
m_kImageDir
private java.lang.String m_kImageDir
DOCUMENT ME!
-
m_kImageFile
private java.lang.String m_kImageFile
DOCUMENT ME!
-
m_kLabelFileName
private javax.swing.JLabel m_kLabelFileName
DOCUMENT ME!
-
m_kLabelFileNameImage
private javax.swing.JLabel m_kLabelFileNameImage
DOCUMENT ME!
-
m_kLatLonLines
private javax.swing.JCheckBox m_kLatLonLines
DOCUMENT ME!
-
m_kLUTa
private ModelLUT m_kLUTa
DOCUMENT ME!
-
m_kLUTImageA
private ModelImage m_kLUTImageA
DOCUMENT ME!
-
m_kNumLatText
private javax.swing.JTextField m_kNumLatText
DOCUMENT ME!
-
m_kNumLonText
private javax.swing.JTextField m_kNumLonText
DOCUMENT ME!
-
m_kPanelBrainsurfaceFlattenerLUT
private JFrameHistogram m_kPanelBrainsurfaceFlattenerLUT
DOCUMENT ME!
-
m_kParentFrame
private ViewJFrameVolumeView m_kParentFrame
DOCUMENT ME!
-
m_kPickButtonGroup
private javax.swing.ButtonGroup m_kPickButtonGroup
DOCUMENT ME!
-
m_kPickCorrespondence
private javax.swing.JRadioButton m_kPickCorrespondence
DOCUMENT ME!
-
m_kPickPuncture
private javax.swing.JRadioButton m_kPickPuncture
DOCUMENT ME!
-
m_kSurfaceDir
private java.lang.String m_kSurfaceDir
DOCUMENT ME!
-
m_kTriangleMesh
private ModelTriangleMesh m_kTriangleMesh
DOCUMENT ME!
-
m_kView
private MjCorticalAnalysis m_kView
DOCUMENT ME!
-
-
Constructor Detail
-
JPanelBrainSurfaceFlattener
public JPanelBrainSurfaceFlattener(MjCorticalAnalysis kView, ModelImage kImage, ViewJFrameVolumeView kParentFrame)
Create the control-panel for the brainsurfaceFlattener interface:- Parameters:
kView
- the engine behind the brainsurfaceFlattener and one of the parent frames affected by the interfacekImage
- the ModelImage datakParentFrame
- the parent frame for the panel, contains the surfaceRenderer, where the brain model is displayed
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed, sets up the variables needed for running the algorithm, and calls the algorithm.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classJPanelRendererBase
- Parameters:
event
- Event that triggers function
-
disposeLocal
public void disposeLocal()
DOCUMENT ME!- Overrides:
disposeLocal
in classJPanelRendererJ3D
-
getImageA
public ModelImage getImageA()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getImageB
public ModelImage getImageB()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMainPanel
public javax.swing.JPanel getMainPanel()
Return the main control panel.- Specified by:
getMainPanel
in classJPanelRendererBase
- Returns:
- JPanel the main control panel
-
setSlice
public void setSlice(int slice)
setSlice.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- int
-
setTimeSlice
public void setTimeSlice(int tSlice)
setTimeSlice.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
tSlice
- int
-
updateImageExtents
public boolean updateImageExtents()
updateImageExtents.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Returns:
- boolean
-
updateImages
public boolean updateImages()
updateImages.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- boolean
-
updateImages
public boolean updateImages(boolean flag)
updateImages.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
flag
- boolean- Returns:
- boolean
-
updateImages
public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
updateImages.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
LUTa
- ModelLUTLUTb
- ModelLUTflag
- booleaninterpMode
- int- Returns:
- boolean
-
finalize
protected void finalize() throws java.lang.Throwable
Delete all local member variables:- Overrides:
finalize
in classJPanelRendererBase
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
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:
-
displayCorticalAnalysis
private void displayCorticalAnalysis()
Resets the Mesh Display, when the file is reloaded:
-
init
private void init()
Initialize the user-interface, buttons and ActionCommands.
-
loadingImage
private void loadingImage()
Load a new ModelImage for the brainsurface flattener scene:
-
loadingSurface
private void loadingSurface()
Load a new surface file for the brainsurface flattener scene:
-
-