Class JPanelDTIEstimateTensor

  • All Implemented Interfaces:
    AlgorithmInterface, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

    public class JPanelDTIEstimateTensor
    extends javax.swing.JPanel
    implements AlgorithmInterface, java.awt.event.ActionListener, java.awt.event.ItemListener
    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
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)  
      void algorithmPerformed​(AlgorithmBase algorithm)
      Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).
      private void buildMaskLoadPanel()  
      private void buildTensorEstPanel()  
      void calcTensor​(ModelImage dwiImage)  
      void enableCalcButton()  
      private void finishTensorPanel()  
      ModelImage getMaskImage()  
      private void init()  
      void itemStateChanged​(java.awt.event.ItemEvent event)  
      private void loadBMatrixFile​(java.lang.String kFileName)
      Loads the BMatrix file.
      void loadDWIListFile()
      Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file.
      private void loadMaskImage()  
      void loadPathFile​(java.lang.String kFileName, java.lang.String kPathName)
      Loads the .path file.
      void setImage​(ModelImage image)
      Set the input diffusion-weighted image (4D image series).
      • 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
      • Methods inherited from class java.lang.Object

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

      • comboBoxDTI_Algorithm

        private javax.swing.JComboBox comboBoxDTI_Algorithm
        menu for selecting dti algorithm:
      • mainPanel

        private javax.swing.JPanel mainPanel
        main panel
      • maskImage

        private ModelImage maskImage
        Mask image for the tensor calculation
      • outputDirTextField

        private javax.swing.JTextField outputDirTextField
        output directory
      • tensorImage

        private ModelImage tensorImage
        Diffusion tensor image:
      • textMaskimage

        private javax.swing.JTextField textMaskimage
        mask image location:
      • textListFile

        private javax.swing.JTextField textListFile
        DWI .list location:
      • displayExit

        private javax.swing.JCheckBox displayExit
        Check boxes enable the user to save and display output images:
      • displayIntensity

        private javax.swing.JCheckBox displayIntensity
      • displayTensor

        private javax.swing.JCheckBox displayTensor
      • saveExit

        private javax.swing.JCheckBox saveExit
      • saveIntensity

        private javax.swing.JCheckBox saveIntensity
      • saveTensor

        private javax.swing.JCheckBox saveTensor
      • serif12

        private java.awt.Font serif12
      • calcTensor

        private javax.swing.JButton calcTensor
      • m_iDimX

        private int m_iDimX
      • m_iDimY

        private int m_iDimY
      • m_iSlices

        private int m_iSlices
      • m_iWeights

        private int m_iWeights
      • m_kRawFormat

        private java.lang.String m_kRawFormat
      • m_fResX

        private float m_fResX
      • m_fResY

        private float m_fResY
      • m_fResZ

        private float m_fResZ
      • m_fMeanNoise

        private float m_fMeanNoise
      • m_bUseXRes

        private boolean m_bUseXRes
      • m_bUseYRes

        private boolean m_bUseYRes
      • m_bUseZRes

        private boolean m_bUseZRes
      • m_aakDWIList

        private java.lang.String[][] m_aakDWIList
      • m_kBMatrix

        private WildMagic.LibFoundation.Mathematics.GMatrixd m_kBMatrix
      • m_aiMatrixEntries

        private int[] m_aiMatrixEntries
      • m_iBOrig

        private int m_iBOrig
    • Constructor Detail

      • JPanelDTIEstimateTensor

        public JPanelDTIEstimateTensor​(DTIPipeline pipeline)
    • Method Detail

      • actionPerformed

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

        public void algorithmPerformed​(AlgorithmBase algorithm)
        Description copied from interface: AlgorithmInterface
        Called after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.
        Specified by:
        algorithmPerformed in interface AlgorithmInterface
        Parameters:
        algorithm - the algorithm which has just completed
      • calcTensor

        public void calcTensor​(ModelImage dwiImage)
      • itemStateChanged

        public void itemStateChanged​(java.awt.event.ItemEvent event)
        Specified by:
        itemStateChanged in interface java.awt.event.ItemListener
      • setImage

        public void setImage​(ModelImage image)
        Set the input diffusion-weighted image (4D image series).
        Parameters:
        image -
      • buildTensorEstPanel

        private void buildTensorEstPanel()
      • buildMaskLoadPanel

        private void buildMaskLoadPanel()
      • finishTensorPanel

        private void finishTensorPanel()
      • init

        private void init()
      • loadMaskImage

        private void loadMaskImage()
      • loadDWIListFile

        public void loadDWIListFile()
        Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file. Loads the .path file.
      • enableCalcButton

        public void enableCalcButton()
      • loadPathFile

        public void loadPathFile​(java.lang.String kFileName,
                                 java.lang.String kPathName)
        Loads the .path file.
        Parameters:
        kFileName - path file name.
        kPathName - , parent directory.
      • loadBMatrixFile

        private void loadBMatrixFile​(java.lang.String kFileName)
        Loads the BMatrix file.
        Parameters:
        kFileName - , name of BMatrix file.