Class JPanelDTIParametersPanel
- 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.DTI_FrameWork.JPanelDTIParametersPanel
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.event.ListSelectionListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JPanelDTIParametersPanel extends JInterfaceBase implements javax.swing.event.ListSelectionListener, javax.swing.event.ChangeListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
JPanelDTIParametersPanel.CancelListener
Cancel the color dialog, change nothing.(package private) class
JPanelDTIParametersPanel.OkColorListener
Pick up the selected color and call method to change the fiber bundle color.private class
JPanelDTIParametersPanel.VOIParams
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.DrawingPanel
-
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 static int
Arrows
private static int
Cylinders
private int
displayMode
private static int
Ellipsoids
private javax.swing.JComboBox
glyphsList
list to hold the glyphs type nameprivate float
m_fFAMax
private float
m_fFAMin
private float
m_fFraction
private float
m_fMaxAngle
private int
m_iCurrentGroup
Number of currently loaded fiber bundle groups.private int
m_iCurrentTrackCount
private int
m_iDimX
private int
m_iDimY
private int
m_iDimZ
private int
m_iMaxTractLength
private int
m_iMinTractLength
private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kCExclude
private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kCIgnore
private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kCInclude
private javax.swing.JButton
m_kColorButton
Color button for changing the color of the fiber bundles.private ViewJColorChooser
m_kColorChooser
Color chooser for when the user wants to change the color of the fiber bundle tracts.private java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f>
m_kCurrentStartList
private javax.swing.JSlider
m_kDisplaySlider
User-control over the number of glyphs displayed in GPUVolumeRenderprivate ModelImage
m_kDTIImage
private javax.swing.JRadioButton
m_kExclude
private javax.swing.JTextField
m_kFAMaxThreshold
private javax.swing.JTextField
m_kFAMinThreshold
private java.util.Vector<java.lang.Integer>
m_kGroupList
Keeps track of the groups of polylines loaded.private javax.swing.JRadioButton
m_kIgnore
private ModelImage
m_kImage
private javax.swing.JRadioButton
m_kInclude
private javax.swing.JTextField
m_kMaxAngle
private javax.swing.JTextField
m_kMaxLength
private javax.swing.JTextField
m_kMinLength
private javax.swing.JLabel
m_kSliderLabel
private javax.swing.JList
m_kTractList
The list box in the dialog for fiber bundle tracts.private javax.swing.JCheckBox
m_kUseEllipsoids
Checkbox for switching between polylines and ellipsoids.private javax.swing.JCheckBox
m_kUseVOICheck
When selected, only tracts that intersect the VOI are displayed.private javax.swing.JCheckBox
m_kUseVolumeColor
Checkbox for turning on/off volume color for the polylines.private javax.swing.JList
m_kVOIList
The list box in the dialog for 3D VOIs.private java.util.Vector<JPanelDTIParametersPanel.VOIParams>
m_kVOIParamsList
private VolumeTriPlanarRender
m_kVolumeDisplay
private javax.swing.JTextField
m_kVoxelStepsize
private VolumeTriPlanarInterfaceDTI
parentFrame
private static int
Polylines
private static long
serialVersionUID
private static int
Tubes
-
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 JPanelDTIParametersPanel(VolumeTriPlanarInterfaceDTI _parentFrame, VolumeTriPlanarRender _m_kVolumeDisplay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
void
add3DVOI(java.lang.String kVOIName, SurfaceState kSurfaceState, VolumeSurface kSurface)
void
addTract()
Updates the tract list user-interface.private void
addTract(VOIContour kTract, int iDimX, int iDimY, int iDimZ)
Adds a fiber bundle tract to the GPUVolumeRender and JPanelSurface.private void
calcTracts(VOIBaseVector[] tracksList, int index, int xMin, int xMax, int yMin, int yMax, int zMin, int zMax, ModelImage fAImage, ViewJProgressBar kProgressBar)
void
closeFiberTractGroup()
Called after a mouse drag on mouse release, when the user has drawn tracks interactively and then finishes.private void
createNewTracts()
private javax.swing.JPanel
createTractDialog()
Creates the user-interface for the Fiber Bundle Tract dialog.private javax.swing.JPanel
createTractPanel()
Creates the user-interface for the Fiber Bundle Tract panel.void
diplayTract(int iX, int iY, int iZ)
Constructs the Fiber Bundle Tracts from the dtiImage and the eigenImage parameters.private VOIContour
diplayTract(int iX, int iY, int iZ, int iDimX, int iDimY, int iDimZ, boolean bUseSizeLimit)
void
disposeLocal()
Dispose memory.private void
extractGroupAndSize(java.lang.String kName, int[] values)
javax.swing.JPanel
getMainPanel()
Get the main control Panel.private int
getMinUnused(java.util.Vector<java.lang.Integer> kBundleList)
Gets a new fiber bundle index.private void
invokeDisplayFunction()
private void
loadPolyline()
void
remove3DVOI(java.lang.String kVOIName)
private void
removePolyline()
Removes the fiber bundle from the GPUVolumeRender and JPanelSurface.void
resizePanel(int panelWidth, int frameHeight)
Resizing the control panel with ViewJFrameVolumeView's frame width and height.private void
savePolyline()
private void
setColor(java.awt.Color color)
This is called when the user chooses a new color for the fiber bundle.void
stateChanged(javax.swing.event.ChangeEvent e)
private boolean
testTrack(VOIContour kTrack)
private boolean
testTrack(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
private boolean
testTrack(WildMagic.LibFoundation.Mathematics.Vector3f kP0, WildMagic.LibFoundation.Mathematics.Vector3f kP1)
private void
traceTract2(VOIContour kTract, WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kDir, ModelImage eigenImage, ModelImage eigenValueImage, ModelImage kFAImage, ModelImage kDTIImage, boolean bDir)
private void
updateCurrentGroup()
Updates the number of fiber bundle tract groups.void
valueChanged(javax.swing.event.ListSelectionEvent kEvent)
-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
buildCancelButton, buildOKButton, buildTitledBorder, 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, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_kTractList
private javax.swing.JList m_kTractList
The list box in the dialog for fiber bundle tracts.
-
m_kVOIList
private javax.swing.JList m_kVOIList
The list box in the dialog for 3D VOIs.
-
m_kColorButton
private javax.swing.JButton m_kColorButton
Color button for changing the color of the fiber bundles.
-
m_kUseVolumeColor
private javax.swing.JCheckBox m_kUseVolumeColor
Checkbox for turning on/off volume color for the polylines.
-
m_kUseEllipsoids
private javax.swing.JCheckBox m_kUseEllipsoids
Checkbox for switching between polylines and ellipsoids.
-
m_kDisplaySlider
private javax.swing.JSlider m_kDisplaySlider
User-control over the number of glyphs displayed in GPUVolumeRender
-
m_kSliderLabel
private javax.swing.JLabel m_kSliderLabel
-
parentFrame
private VolumeTriPlanarInterfaceDTI parentFrame
-
m_kVolumeDisplay
private VolumeTriPlanarRender m_kVolumeDisplay
-
m_kDTIImage
private ModelImage m_kDTIImage
-
m_kUseVOICheck
private javax.swing.JCheckBox m_kUseVOICheck
When selected, only tracts that intersect the VOI are displayed.
-
m_kGroupList
private java.util.Vector<java.lang.Integer> m_kGroupList
Keeps track of the groups of polylines loaded.
-
m_iCurrentGroup
private int m_iCurrentGroup
Number of currently loaded fiber bundle groups.
-
m_iCurrentTrackCount
private int m_iCurrentTrackCount
-
m_kImage
private ModelImage m_kImage
-
m_kFAMinThreshold
private javax.swing.JTextField m_kFAMinThreshold
-
m_kFAMaxThreshold
private javax.swing.JTextField m_kFAMaxThreshold
-
m_kMaxAngle
private javax.swing.JTextField m_kMaxAngle
-
m_kMinLength
private javax.swing.JTextField m_kMinLength
-
m_kMaxLength
private javax.swing.JTextField m_kMaxLength
-
m_kVoxelStepsize
private javax.swing.JTextField m_kVoxelStepsize
-
displayMode
private int displayMode
-
Polylines
private static int Polylines
-
Ellipsoids
private static int Ellipsoids
-
Tubes
private static int Tubes
-
Cylinders
private static int Cylinders
-
Arrows
private static int Arrows
-
m_kCInclude
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kCInclude
-
m_kCExclude
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kCExclude
-
m_kCIgnore
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kCIgnore
-
m_kInclude
private javax.swing.JRadioButton m_kInclude
-
m_kExclude
private javax.swing.JRadioButton m_kExclude
-
m_kIgnore
private javax.swing.JRadioButton m_kIgnore
-
m_fFAMin
private float m_fFAMin
-
m_fFAMax
private float m_fFAMax
-
m_fMaxAngle
private float m_fMaxAngle
-
m_iMinTractLength
private int m_iMinTractLength
-
m_iMaxTractLength
private int m_iMaxTractLength
-
glyphsList
private javax.swing.JComboBox glyphsList
list to hold the glyphs type name
-
m_kVOIParamsList
private java.util.Vector<JPanelDTIParametersPanel.VOIParams> m_kVOIParamsList
-
m_kColorChooser
private ViewJColorChooser m_kColorChooser
Color chooser for when the user wants to change the color of the fiber bundle tracts.
-
m_fFraction
private float m_fFraction
-
m_kCurrentStartList
private java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> m_kCurrentStartList
-
m_iDimX
private int m_iDimX
-
m_iDimY
private int m_iDimY
-
m_iDimZ
private int m_iDimZ
-
-
Constructor Detail
-
JPanelDTIParametersPanel
public JPanelDTIParametersPanel(VolumeTriPlanarInterfaceDTI _parentFrame, VolumeTriPlanarRender _m_kVolumeDisplay)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
add3DVOI
public void add3DVOI(java.lang.String kVOIName, SurfaceState kSurfaceState, VolumeSurface kSurface)
-
closeFiberTractGroup
public void closeFiberTractGroup()
Called after a mouse drag on mouse release, when the user has drawn tracks interactively and then finishes.
-
addTract
public void addTract()
Updates the tract list user-interface.
-
extractGroupAndSize
private void extractGroupAndSize(java.lang.String kName, int[] values)
-
diplayTract
public void diplayTract(int iX, int iY, int iZ)
Constructs the Fiber Bundle Tracts from the dtiImage and the eigenImage parameters. The fiber bundles are output to a file specified by the user.- Parameters:
dtiImage
- Diffusion Tensor Image.eigenImage
- EigenVector Image.
-
disposeLocal
public void disposeLocal()
Dispose memory.
-
getMainPanel
public javax.swing.JPanel getMainPanel()
Get the main control Panel.- Overrides:
getMainPanel
in classJInterfaceBase
- Returns:
- mainPanel main control panel
-
remove3DVOI
public void remove3DVOI(java.lang.String kVOIName)
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)
Resizing the control panel with ViewJFrameVolumeView's frame width and height.- Parameters:
panelWidth
- DOCUMENT ME!frameHeight
- DOCUMENT ME!
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Parameters:
e
- Event that triggered this function.
-
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent kEvent)
- Specified by:
valueChanged
in interfacejavax.swing.event.ListSelectionListener
-
addTract
private void addTract(VOIContour kTract, int iDimX, int iDimY, int iDimZ)
Adds a fiber bundle tract to the GPUVolumeRender and JPanelSurface.- Parameters:
kTract
- list of voxels in the fiber bundle.iVQuantity
- number of voxels in the fiber bundle.iDimX
- the x-dimensions of the DTI image used to create the tract.iDimY
- the y-dimensions of the DTI image used to create the tract.iDimZ
- the z-dimensions of the DTI image used to create the tract.
-
createNewTracts
private void createNewTracts()
-
calcTracts
private void calcTracts(VOIBaseVector[] tracksList, int index, int xMin, int xMax, int yMin, int yMax, int zMin, int zMax, ModelImage fAImage, ViewJProgressBar kProgressBar)
-
createTractDialog
private javax.swing.JPanel createTractDialog()
Creates the user-interface for the Fiber Bundle Tract dialog.- Returns:
- JPanel containing the user-interface for the Fiber Bundle Tract dialog.
-
createTractPanel
private javax.swing.JPanel createTractPanel()
Creates the user-interface for the Fiber Bundle Tract panel.- Returns:
- JPanel containing the user-interface for the Fiber Bundle Tract panel.
-
diplayTract
private VOIContour diplayTract(int iX, int iY, int iZ, int iDimX, int iDimY, int iDimZ, boolean bUseSizeLimit)
-
getMinUnused
private int getMinUnused(java.util.Vector<java.lang.Integer> kBundleList)
Gets a new fiber bundle index.- Parameters:
kBundleList
- list of fiber bundles.
-
invokeDisplayFunction
private void invokeDisplayFunction()
-
removePolyline
private void removePolyline()
Removes the fiber bundle from the GPUVolumeRender and JPanelSurface.
-
loadPolyline
private void loadPolyline()
-
savePolyline
private void savePolyline()
-
setColor
private void setColor(java.awt.Color color)
This is called when the user chooses a new color for the fiber bundle. It changes the color of the fiber bundle.- Parameters:
color
- Color to change fiber bundle to.
-
traceTract2
private void traceTract2(VOIContour kTract, WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kDir, ModelImage eigenImage, ModelImage eigenValueImage, ModelImage kFAImage, ModelImage kDTIImage, boolean bDir)
-
updateCurrentGroup
private void updateCurrentGroup()
Updates the number of fiber bundle tract groups.
-
testTrack
private boolean testTrack(VOIContour kTrack)
-
testTrack
private boolean testTrack(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
-
testTrack
private boolean testTrack(WildMagic.LibFoundation.Mathematics.Vector3f kP0, WildMagic.LibFoundation.Mathematics.Vector3f kP1)
-
-