Class JDialogDTIInput

  • All Implemented Interfaces:
    AlgorithmInterface, 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 JDialogDTIInput
    extends JInterfaceBase
    implements java.awt.event.ActionListener, javax.swing.event.ListSelectionListener, AlgorithmInterface, javax.swing.event.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:
    Serialized Form
    • Nested Class Summary

      • 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
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DTI
      Diffusion Tensor Image dialog:
      static int DWI
      Diffusion Weighted Images dialog:
      static int EG_FA
      EigenVector and Functional Anisotropy dialog:
      private java.lang.String[][] m_aakDWIList
      List of file names for the Diffusion Weighted Images, from the .path file.
      private int[] m_aiMatrixEntries
      keeps track of unique entries in the BMatrix
      private boolean m_bUseXRes
      Set to true if the slice resolution is read from the .list file: (xRes)
      private boolean m_bUseYRes
      Set to true if the slice resolution is read from the .list file: (yRes)
      private boolean m_bUseZRes
      Set to true if the slice resolution is read from the .list file: (zRes)
      private float m_fMeanNoise
      Mean noise vale read from the .list file
      private float m_fResX
      Slice thickness read from .list file
      private float m_fResY
      Slice thickness read from .list file
      private float m_fResZ
      Slice thickness read from .list file
      private int m_iBOrig
      Number of different BMatrix rows:
      private int m_iDimX
      X-dimensions for Diffusion Weighted Images.
      private int m_iDimY
      Y-dimensions for Diffusion Weighted Images.
      private int m_iSlices
      Number of slices in the Diffusion Weighted Images series.
      private int m_iType
      Dialog type.
      private int m_iWeights
      Number of weights in the Diffusion Weighted Images series.
      private ModelImage m_kAnisotropyImage
      Anisotropy image *
      private javax.swing.JTextField m_kAnisotropyPath
      Anisotropy file input path name text box.
      private WildMagic.LibFoundation.Mathematics.GMatrixd m_kBMatrix
      General matrix storing BMatrix values.
      private ModelImage m_kDTIImage
      Diffusion Tensor image.
      private javax.swing.JTextField m_kDTIPath
      Diffusion Tensor file input path name text box.
      private ModelImage m_kDWIMaskImage
      Mask image for calculating the DTI image.
      private javax.swing.JTextField m_kDWIMaskPath
      Diffusion Weighted Images Mask file input path name text box.
      private javax.swing.JTextField m_kDWIPath
      Diffusion Weighted Images .list file input path name text box.
      private ModelImage m_kEigenValueImage
      EigenValue image *
      private ModelImage m_kEigenVectorImage
      Eigenvector image *
      private javax.swing.JTextField m_kEigenVectorPath
      EigenVector file input path name text box.
      private ModelLUT m_kLUTa
      LUT of input image *
      private javax.swing.JCheckBox m_kOpenB0  
      private java.lang.String m_kParentDir
      parent directory for the DTI output images.
      private java.lang.String m_kRawFormat
      raw image format read from the .list file:
      private javax.swing.JCheckBox m_kReconstructTracts
      Checkbox for tract reconstruction.
      private static long serialVersionUID  
      • Fields inherited from class javax.swing.JDialog

        accessibleContext, rootPane, rootPaneCheckingEnabled
      • Fields inherited from class java.awt.Dialog

        DEFAULT_MODALITY_TYPE
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface javax.swing.WindowConstants

        DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    • Constructor Summary

      Constructors 
      Constructor Description
      JDialogDTIInput​(int iType)
      Create a new JDialogDTIInput of one of the four types:
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent kAction)
      ActionListener event.
      void algorithmPerformed​(AlgorithmBase kAlgorithm)
      Called when AlgorithmDWI2DTI is done creating the DTI image.
      private void calcEigenVectorImage()
      Calls AlgorithmDTI2EGFA to create eigen vector and functional anisotropy images.
      private javax.swing.JPanel createDTIPanel()
      Creates the user-interface for the Diffusion Tensor Image dialog.
      private javax.swing.JPanel createDWIPanel()
      Creates the user-interface for the Diffusion Tensor Image dialog.
      private javax.swing.JPanel createEigenPanel()
      Creates the user-interface for the EigenVector FA dialog.
      void disposeLocal()
      Clean up local memory.
      private void init​(int iType)
      The JDialogDTIInput interface.
      private void loadAnisotropyFile()
      Launches the JFileChooser for the user to select the functional anisotropy file.
      private void loadBMatrixFile​(java.lang.String kFileName)
      Loads the BMatrix file.
      private void loadDTIFile()
      Launches the JFileChooser for the user to select the Diffusion Tensor Image.
      private void loadDWIListFile()
      Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file.
      private void loadDWIMaskFile()
      Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file.
      private void loadEigenVectorFile()
      Launches the JFileChooser for the user to select the Eigen Vector file..
      private void loadPathFile​(java.lang.String kFileName, java.lang.String kPathName)
      Loads the .path file.
      private void processDTI()
      Processes the Diffusion Tensor Image.
      private void processDWI()
      Calls AlgorithmDWI2DTI to create the diffusion tensor image.
      void stateChanged​(javax.swing.event.ChangeEvent arg0)  
      void valueChanged​(javax.swing.event.ListSelectionEvent arg0)  
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EG_FA

        public static final int EG_FA
        EigenVector and Functional Anisotropy dialog:
        See Also:
        Constant Field Values
      • m_kEigenVectorImage

        private ModelImage m_kEigenVectorImage
        Eigenvector image *
      • m_kEigenValueImage

        private ModelImage m_kEigenValueImage
        EigenValue image *
      • m_kAnisotropyImage

        private ModelImage m_kAnisotropyImage
        Anisotropy image *
      • m_kDTIImage

        private ModelImage m_kDTIImage
        Diffusion Tensor image.
      • m_kDWIMaskImage

        private ModelImage m_kDWIMaskImage
        Mask image for calculating the DTI image.
      • m_kLUTa

        private ModelLUT m_kLUTa
        LUT of input image *
      • m_kEigenVectorPath

        private javax.swing.JTextField m_kEigenVectorPath
        EigenVector file input path name text box.
      • m_kAnisotropyPath

        private javax.swing.JTextField m_kAnisotropyPath
        Anisotropy file input path name text box.
      • m_kDTIPath

        private javax.swing.JTextField m_kDTIPath
        Diffusion Tensor file input path name text box.
      • m_kDWIPath

        private javax.swing.JTextField m_kDWIPath
        Diffusion Weighted Images .list file input path name text box.
      • m_kDWIMaskPath

        private javax.swing.JTextField m_kDWIMaskPath
        Diffusion Weighted Images Mask file input path name text box.
      • m_kBMatrix

        private WildMagic.LibFoundation.Mathematics.GMatrixd m_kBMatrix
        General matrix storing BMatrix values.
      • m_aakDWIList

        private java.lang.String[][] m_aakDWIList
        List of file names for the Diffusion Weighted Images, from the .path file.
      • m_iSlices

        private int m_iSlices
        Number of slices in the Diffusion Weighted Images series.
      • m_iWeights

        private int m_iWeights
        Number of weights in the Diffusion Weighted Images series.
      • m_iDimX

        private int m_iDimX
        X-dimensions for Diffusion Weighted Images.
      • m_iDimY

        private int m_iDimY
        Y-dimensions for Diffusion Weighted Images.
      • m_iType

        private final int m_iType
        Dialog type.
      • m_kReconstructTracts

        private javax.swing.JCheckBox m_kReconstructTracts
        Checkbox for tract reconstruction.
      • m_kOpenB0

        private javax.swing.JCheckBox m_kOpenB0
      • m_iBOrig

        private int m_iBOrig
        Number of different BMatrix rows:
      • m_aiMatrixEntries

        private int[] m_aiMatrixEntries
        keeps track of unique entries in the BMatrix
      • m_fResX

        private float m_fResX
        Slice thickness read from .list file
      • m_fResY

        private float m_fResY
        Slice thickness read from .list file
      • m_fResZ

        private float m_fResZ
        Slice thickness read from .list file
      • m_bUseXRes

        private boolean m_bUseXRes
        Set to true if the slice resolution is read from the .list file: (xRes)
      • m_bUseYRes

        private boolean m_bUseYRes
        Set to true if the slice resolution is read from the .list file: (yRes)
      • m_bUseZRes

        private boolean m_bUseZRes
        Set to true if the slice resolution is read from the .list file: (zRes)
      • m_fMeanNoise

        private float m_fMeanNoise
        Mean noise vale read from the .list file
      • m_kRawFormat

        private java.lang.String m_kRawFormat
        raw image format read from the .list file:
      • m_kParentDir

        private java.lang.String m_kParentDir
        parent directory for the DTI output images.
    • Constructor Detail

      • 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 Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent kAction)
        ActionListener event.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Parameters:
        kAction - , ActionEvent
      • algorithmPerformed

        public void algorithmPerformed​(AlgorithmBase kAlgorithm)
        Called when AlgorithmDWI2DTI is done creating the DTI image.
        Specified by:
        algorithmPerformed in interface AlgorithmInterface
        Parameters:
        kAlgorithm - , algorithm that is finished.
      • disposeLocal

        public void disposeLocal()
        Clean up local memory.
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent arg0)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
      • valueChanged

        public void valueChanged​(javax.swing.event.ListSelectionEvent arg0)
        Specified by:
        valueChanged in interface javax.swing.event.ListSelectionListener
      • calcEigenVectorImage

        private void calcEigenVectorImage()
        Calls AlgorithmDTI2EGFA to create eigen vector and functional anisotropy images.
      • createDTIPanel

        private javax.swing.JPanel createDTIPanel()
        Creates the user-interface for the Diffusion Tensor Image dialog.
        Returns:
        JPanel containing the user-interface for the Diffusion Tensor Image dialog.
      • createDWIPanel

        private javax.swing.JPanel createDWIPanel()
        Creates the user-interface for the Diffusion Tensor Image dialog.
        Returns:
        JPanel containing the user-interface for the Diffusion Tensor Image dialog.
      • createEigenPanel

        private javax.swing.JPanel 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

        private void loadBMatrixFile​(java.lang.String kFileName)
        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

        private void loadPathFile​(java.lang.String kFileName,
                                  java.lang.String kPathName)
        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.