Class JPanelDTIEstimateTensor
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.renderer.WildMagic.DTI_FrameWork.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
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JButtoncalcTensorprivate javax.swing.JComboBoxcomboBoxDTI_Algorithmmenu for selecting dti algorithm:static intDEFAULTDifferent DTI algorithms:private javax.swing.JCheckBoxdisplayExitCheck boxes enable the user to save and display output images:private javax.swing.JCheckBoxdisplayIntensityprivate javax.swing.JCheckBoxdisplayTensorprivate JPanelEPIDistortionCorrectionEPIpanelstatic intLINEARstatic intLLMSEprivate java.lang.String[][]m_aakDWIListprivate int[]m_aiMatrixEntriesprivate booleanm_bUseXResprivate booleanm_bUseYResprivate booleanm_bUseZResprivate floatm_fMeanNoiseprivate floatm_fResXprivate floatm_fResYprivate floatm_fResZprivate intm_iBOrigprivate intm_iDimXprivate intm_iDimYprivate intm_iSlicesprivate intm_iWeightsprivate WildMagic.LibFoundation.Mathematics.GMatrixdm_kBMatrix(package private) ModelImagem_kDWIImageprivate java.lang.Stringm_kRawFormatprivate javax.swing.JPanelmainPanelmain panelprivate ModelImagemaskImageMask image for the tensor calculationstatic intNON_LINEARprivate javax.swing.JTextFieldoutputDirTextFieldoutput directoryprivate DTIPipelinepipelineparent dialogstatic intRESTOREprivate javax.swing.JCheckBoxsaveExitprivate javax.swing.JCheckBoxsaveIntensityprivate javax.swing.JCheckBoxsaveTensorprivate static longserialVersionUIDprivate java.awt.Fontserif12private ModelImagetensorImageDiffusion tensor image:private javax.swing.JTextFieldtextListFileDWI .list location:private javax.swing.JTextFieldtextMaskimagemask image location:static intWEIGHTED_LINEAR-
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 JPanelDTIEstimateTensor(DTIPipeline pipeline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)voidalgorithmPerformed(AlgorithmBase algorithm)Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).private voidbuildMaskLoadPanel()private voidbuildTensorEstPanel()voidcalcTensor(ModelImage dwiImage)voidenableCalcButton()private voidfinishTensorPanel()ModelImagegetMaskImage()private voidinit()voiditemStateChanged(java.awt.event.ItemEvent event)private voidloadBMatrixFile(java.lang.String kFileName)Loads the BMatrix file.voidloadDWIListFile()Launches the JFileChooser for the user to select the Diffusion Weighted Images .path file.private voidloadMaskImage()voidloadPathFile(java.lang.String kFileName, java.lang.String kPathName)Loads the .path file.voidsetImage(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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT
Different DTI algorithms:- See Also:
- Constant Field Values
-
LLMSE
public static final int LLMSE
- See Also:
- Constant Field Values
-
LINEAR
public static final int LINEAR
- See Also:
- Constant Field Values
-
NON_LINEAR
public static final int NON_LINEAR
- See Also:
- Constant Field Values
-
RESTORE
public static final int RESTORE
- See Also:
- Constant Field Values
-
WEIGHTED_LINEAR
public static final int WEIGHTED_LINEAR
- See Also:
- Constant Field Values
-
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
-
pipeline
private DTIPipeline pipeline
parent dialog
-
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:
-
EPIpanel
private JPanelEPIDistortionCorrection EPIpanel
-
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_kDWIImage
ModelImage m_kDWIImage
-
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:
actionPerformedin interfacejava.awt.event.ActionListener
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
Description copied from interface:AlgorithmInterfaceCalled 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:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
calcTensor
public void calcTensor(ModelImage dwiImage)
-
getMaskImage
public ModelImage getMaskImage()
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
- Specified by:
itemStateChangedin interfacejava.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.
-
-