Class JDialogDTIInput
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.JDialogDTIInput
- All Implemented Interfaces:
AlgorithmInterface,ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,ListSelectionListener,RootPaneContainer,WindowConstants
public class JDialogDTIInput
extends JInterfaceBase
implements ActionListener, ListSelectionListener, AlgorithmInterface, ChangeListener
Dialog for specifying Diffusion Tensor Images.
Diffusion Tensor images may be loaded in one of the following ways, specified by the dialog types: DWI, DTI, EG_FA,
or TRACTS.
DWI: The DWI dialog loads the raw Diffusion Weighted Images. Calculates the tensor image from the set of weighed
images. The dialog requires the user to specify the raw image dimensions, and the number of weighted image sets. The
user must also specify the mean noise value, the name of the B-Matrix file, and the .path file which specifies the
locations of the weighted images in the directory structure. Once the tensor image is calculated, the eigen-vector
and functional anisotropy images are calculated and passed to the DialogDTIColorDisplay dialog. The user also has the
option of creating the fiber-tract bundles from the tensor image.
DTI: The DTI dialog loads a previously-calculated Diffusion Tensor image and calculates the eigen-vector image and
the functional anisotropy image. The DialogDTIColorDisplay dialog is then launched. The user specifies the tensor
image and has the option of creating the fiber-tract bundles from the tensor image.
EG_FA: The EG_FA dialog loads previously calculated eigen-vector and functional anisotropy images and launches the
DialogDTIColorDisplay dialog
TRACTS: The tracts dialog is launched from the ViewJFrameViewWM class. It enables the user to add the fiber-tract
visualization to the GPU Volume display. The user can limit the number of tracts, the minimum and maximum tract
lengths, or specify that tracts that pass through a VOI are loaded.
- 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 TypeFieldDescriptionstatic final intDiffusion Tensor Image dialog:static final intDiffusion Weighted Images dialog:static final intEigenVector and Functional Anisotropy dialog:private String[][]List of file names for the Diffusion Weighted Images, from the .path file.private int[]keeps track of unique entries in the BMatrixprivate booleanSet to true if the slice resolution is read from the .list file: (xRes)private booleanSet to true if the slice resolution is read from the .list file: (yRes)private booleanSet to true if the slice resolution is read from the .list file: (zRes)private floatMean noise vale read from the .list fileprivate floatSlice thickness read from .list fileprivate floatSlice thickness read from .list fileprivate floatSlice thickness read from .list fileprivate intNumber of different BMatrix rows:private intX-dimensions for Diffusion Weighted Images.private intY-dimensions for Diffusion Weighted Images.private intNumber of slices in the Diffusion Weighted Images series.private final intDialog type.private intNumber of weights in the Diffusion Weighted Images series.private ModelImageAnisotropy image *private JTextFieldAnisotropy file input path name text box.private WildMagic.LibFoundation.Mathematics.GMatrixdGeneral matrix storing BMatrix values.private ModelImageDiffusion Tensor image.private JTextFieldDiffusion Tensor file input path name text box.private ModelImageMask image for calculating the DTI image.private JTextFieldDiffusion Weighted Images Mask file input path name text box.private JTextFieldDiffusion Weighted Images .list file input path name text box.private ModelImageEigenValue image *private ModelImageEigenvector image *private JTextFieldEigenVector file input path name text box.private ModelLUTLUT of input image *private JCheckBoxprivate Stringparent directory for the DTI output images.private Stringraw image format read from the .list file:private JCheckBoxCheckbox for tract reconstruction.private static final longFields 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
ConstructorsConstructorDescriptionJDialogDTIInput(int iType) Create a new JDialogDTIInput of one of the four types: -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent kAction) ActionListener event.voidalgorithmPerformed(AlgorithmBase kAlgorithm) Called when AlgorithmDWI2DTI is done creating the DTI image.private voidCalls AlgorithmDTI2EGFA to create eigen vector and functional anisotropy images.private JPanelCreates the user-interface for the Diffusion Tensor Image dialog.private JPanelCreates the user-interface for the Diffusion Tensor Image dialog.private JPanelCreates the user-interface for the EigenVector FA dialog.voidClean up local memory.private voidinit(int iType) The JDialogDTIInput interface.private voidLaunches the JFileChooser for the user to select the functional anisotropy file.private voidloadBMatrixFile(String kFileName) Loads the BMatrix file.private voidLaunches the JFileChooser for the user to select the Diffusion Tensor Image.private voidLaunches the JFileChooser for the user to select the Diffusion Weighted Images .path file.private voidLaunches the JFileChooser for the user to select the Diffusion Weighted Images .path file.private voidLaunches the JFileChooser for the user to select the Eigen Vector file..private voidloadPathFile(String kFileName, String kPathName) Loads the .path file.private voidProcesses the Diffusion Tensor Image.private voidCalls AlgorithmDWI2DTI to create the diffusion tensor image.voidstateChanged(ChangeEvent arg0) voidMethods 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, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
DWI
public static final int DWIDiffusion Weighted Images dialog:- See Also:
-
DTI
public static final int DTIDiffusion Tensor Image dialog:- See Also:
-
EG_FA
public static final int EG_FAEigenVector and Functional Anisotropy dialog:- See Also:
-
m_kEigenVectorImage
Eigenvector image * -
m_kEigenValueImage
EigenValue image * -
m_kAnisotropyImage
Anisotropy image * -
m_kDTIImage
Diffusion Tensor image. -
m_kDWIMaskImage
Mask image for calculating the DTI image. -
m_kLUTa
LUT of input image * -
m_kEigenVectorPath
EigenVector file input path name text box. -
m_kAnisotropyPath
Anisotropy file input path name text box. -
m_kDTIPath
Diffusion Tensor file input path name text box. -
m_kDWIPath
Diffusion Weighted Images .list file input path name text box. -
m_kDWIMaskPath
Diffusion Weighted Images Mask file input path name text box. -
m_kBMatrix
private WildMagic.LibFoundation.Mathematics.GMatrixd m_kBMatrixGeneral matrix storing BMatrix values. -
m_aakDWIList
List of file names for the Diffusion Weighted Images, from the .path file. -
m_iSlices
private int m_iSlicesNumber of slices in the Diffusion Weighted Images series. -
m_iWeights
private int m_iWeightsNumber of weights in the Diffusion Weighted Images series. -
m_iDimX
private int m_iDimXX-dimensions for Diffusion Weighted Images. -
m_iDimY
private int m_iDimYY-dimensions for Diffusion Weighted Images. -
m_iType
private final int m_iTypeDialog type. -
m_kReconstructTracts
Checkbox for tract reconstruction. -
m_kOpenB0
-
m_iBOrig
private int m_iBOrigNumber of different BMatrix rows: -
m_aiMatrixEntries
private int[] m_aiMatrixEntrieskeeps track of unique entries in the BMatrix -
m_fResX
private float m_fResXSlice thickness read from .list file -
m_fResY
private float m_fResYSlice thickness read from .list file -
m_fResZ
private float m_fResZSlice thickness read from .list file -
m_bUseXRes
private boolean m_bUseXResSet to true if the slice resolution is read from the .list file: (xRes) -
m_bUseYRes
private boolean m_bUseYResSet to true if the slice resolution is read from the .list file: (yRes) -
m_bUseZRes
private boolean m_bUseZResSet to true if the slice resolution is read from the .list file: (zRes) -
m_fMeanNoise
private float m_fMeanNoiseMean noise vale read from the .list file -
m_kRawFormat
raw image format read from the .list file: -
m_kParentDir
parent directory for the DTI output images.
-
-
Constructor Details
-
JDialogDTIInput
public JDialogDTIInput(int iType) Create a new JDialogDTIInput of one of the four types:- Parameters:
iType- , type of Diffusion Tensor Input dialog to create.
-
-
Method Details
-
actionPerformed
ActionListener event.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
kAction- , ActionEvent
-
algorithmPerformed
Called when AlgorithmDWI2DTI is done creating the DTI image.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
kAlgorithm- , algorithm that is finished.
-
disposeLocal
public void disposeLocal()Clean up local memory. -
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
valueChanged
- Specified by:
valueChangedin interfaceListSelectionListener
-
calcEigenVectorImage
private void calcEigenVectorImage()Calls AlgorithmDTI2EGFA to create eigen vector and functional anisotropy images. -
createDTIPanel
Creates the user-interface for the Diffusion Tensor Image dialog.- Returns:
- JPanel containing the user-interface for the Diffusion Tensor Image dialog.
-
createDWIPanel
Creates the user-interface for the Diffusion Tensor Image dialog.- Returns:
- JPanel containing the user-interface for the Diffusion Tensor Image dialog.
-
createEigenPanel
Creates the user-interface for the EigenVector FA dialog.- Returns:
- JPanel containing the user-interface for the EigenVector FA dialog.
-
init
private void init(int iType) The JDialogDTIInput interface.- Parameters:
iType- , type of Diffusion Tensor Input dialog to create.
-
loadAnisotropyFile
private void loadAnisotropyFile()Launches the JFileChooser for the user to select the functional anisotropy file. Loads the anisotropy data. -
loadBMatrixFile
Loads the BMatrix file.- Parameters:
kFileName- , name of BMatrix file.
-
loadDTIFile
private void loadDTIFile()Launches the JFileChooser for the user to select the Diffusion Tensor Image. Loads the tensor data. -
loadDWIListFile
private void loadDWIListFile()Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file. Loads the .path file. -
loadDWIMaskFile
private void loadDWIMaskFile()Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file. Loads the .path file. -
loadEigenVectorFile
private void loadEigenVectorFile()Launches the JFileChooser for the user to select the Eigen Vector file.. Loads the eigen vector data. -
loadPathFile
Loads the .path file.- Parameters:
kFileName- path file name.kPathName- , parent directory.
-
processDTI
private void processDTI()Processes the Diffusion Tensor Image. Creates the eigen vector and functional anisotropy images. Launched the DialogDTIColorDisplay. -
processDWI
private void processDWI()Calls AlgorithmDWI2DTI to create the diffusion tensor image.
-