Class JPanelDTIPreprocessing
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gov.nih.mipav.view.renderer.WildMagic.DTI_FrameWork.JPanelDTIPreprocessing
- All Implemented Interfaces:
AlgorithmInterface,ActionListener,ItemListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
public class JPanelDTIPreprocessing
extends JPanel
implements AlgorithmInterface, ActionListener, ItemListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested 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 TypeFieldDescriptionprivate StringFile name for the B0 to T2 transformation matrix (needed to populate the next panel in the DTIPipeline)private TransMatrixThe transformation matrix describing the transformation from registering B0 to T2 image.(package private) JPanelprivate floatprivate floatprivate floatprivate JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private booleanprivate booleanprivate booleanprivate booleanprivate floatprivate floatprivate floatprivate ModelImageThe B0 image from the original 4D DWI image series, extracted from the DWI volume:private ModelImageThe T2 image that the B0 image is registered to.private ModelImageAfter the B0 image is registered to the T2 image the B0 sub-volume is replaced in the original DWI image, creating a new 4D DWI image:private intDOCUMENT ME!private intDOCUMENT ME!private JLabelprivate JLabelprivate JLabelprivate JLabelprivate JPanelDOCUMENT ME!DOCUMENT ME!private intprivate booleanprivate intprivate JButtonprivate JButtonprivate Stringaction command when the user presses the browse button to select the output directory:private JTextFieldoutput directory enables user to choose where to save files to.(package private) JCheckBoxprivate DTIPipelineprivate JLabelprivate JTextFieldprotected ViewJProgressBarProgress bar that will listen to a dialog's algorithm (and reflect current progress)user-input for the B0 sub-volume number in the 4D DWI imageprivate AlgorithmRegOAR3DDOCUMENT ME!private AlgorithmRegOAR35DDOCUMENT ME!(package private) int(package private) ModelImageprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate static final longUse serialVersionUID for interoperability.private Fontprivate Fontprivate JCheckBoxprivate JCheckBoxDOCUMENT ME!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_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidalgorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented.private ModelImageB0extraction(ModelImage image4D, int refVolumeNum) Extracts the reference sub-volume from the input 4D image.voidbuildLoadPanel(ActionListener listener, JPanel mainPanel, JLabel label, JTextField imageName, String tooltip, String actionCommand) private JButtonprivate TitledBorderbuildTitledBorder(String title) protected voidcallReg35Algorithm(ModelImage dwiImage) Calls the algorithm with the set-up parameters.protected voidcallT2Algorithm(ModelImage refT2Image, ModelImage matchB0Image) Calls the algorithm with the set-up parameters.protected voidcreateProgressBar(String title, AlgorithmBase pListener) Creates the progress bar that will listen to an algorithm's progress changesprotected voidcreateProgressBar(String title, String msg, AlgorithmBase pListener) Creates the progress bar (should be created within JDialog's callAlgorithm methodprivate voidinit()Initializes the GUI components and displays the dialog.voiditemStateChanged(ItemEvent arg0) private ModelImageresampleT2(ModelImage oldT2, ModelImage matchB0) Resamples the input ModelImage to match the extents and resolutions of the second ModelImage.voidsaveTransformMatrix(String fileName, TransMatrix[] matrix) This method creates the Trans Matrices Array file for DTI PreprocessingvoidsetOutputDirectory(String directory) Sets the default output directory for the images generated by this panel.private booleanSets the variables needed to call the registration algorithm based on the values entered in the dialog.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
pipeline
-
imageB0
The B0 image from the original 4D DWI image series, extracted from the DWI volume: -
imageT2
The T2 image that the B0 image is registered to. This may be the original T2 if it matched the extents/resultions of the other image Or it is the resampled T2 image -
imageUpdatedDWI
After the B0 image is registered to the T2 image the B0 sub-volume is replaced in the original DWI image, creating a new 4D DWI image: -
b0toStructMatrix
The transformation matrix describing the transformation from registering B0 to T2 image. If that step in the process is skipped, this defaults to the identity matrix: -
b0MatrixFileName
File name for the B0 to T2 transformation matrix (needed to populate the next panel in the DTIPipeline) -
serif12
-
serif12B
-
refImageNumText
user-input for the B0 sub-volume number in the 4D DWI image -
comboBoxDOF
DOCUMENT ME! -
progressBar
Progress bar that will listen to a dialog's algorithm (and reflect current progress) -
comboBoxInterp
DOCUMENT ME! -
comboBoxCostFunct
DOCUMENT ME! -
transformDWICheckbox
DOCUMENT ME! -
matrixComboBox
DOCUMENT ME! -
matrixDirText
DOCUMENT ME! -
OKButton
-
mainPanel
-
reg3
DOCUMENT ME! -
reg35
DOCUMENT ME! -
cost
private int costDOCUMENT ME! -
interp
private int interpDOCUMENT ME! -
DOF
private int DOFDOCUMENT ME! -
costT2
private int costT2DOCUMENT ME! -
interpT2
private int interpT2DOCUMENT ME! -
DOFT2
private int DOFT2DOCUMENT ME! -
rotateBeginX
private float rotateBeginX -
rotateEndX
private float rotateEndX -
coarseRateX
private float coarseRateX -
fineRateX
private float fineRateX -
rotateBeginY
private float rotateBeginY -
rotateEndY
private float rotateEndY -
coarseRateY
private float coarseRateY -
fineRateY
private float fineRateY -
rotateBeginZ
private float rotateBeginZ -
rotateEndZ
private float rotateEndZ -
coarseRateZ
private float coarseRateZ -
fineRateZ
private float fineRateZ -
maxOfMinResol
private boolean maxOfMinResol -
doSubsample
private boolean doSubsample -
doMultiThread
private boolean doMultiThread -
fastMode
private boolean fastMode -
doGraph
private boolean doGraph -
maxIterations
private int maxIterations -
numMinima
private int numMinima -
registerTo
int registerTo -
transformMatDWICheckbox
-
transformB0label
-
transformB0MatCheckbox
-
transformB0Checkbox
-
blanklabel
-
skipPreCheckbox
-
correctGradTransCheckbox
-
labelDOF
-
labelCost
-
labelInternal
-
labelInterp
-
structOptPanel
-
outputDir
output directory enables user to choose where to save files to. -
outputCommand
action command when the user presses the browse button to select the output directory: -
buttonPanel
JPanel buttonPanel -
result35RegImage
ModelImage result35RegImage -
performEPICheckbox
JCheckBox performEPICheckbox -
preProsText
-
preProsLabel
-
openDirButton
-
-
Constructor Details
-
JPanelDTIPreprocessing
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
algorithmPerformed
This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to complete.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- Algorithm that caused the event.
-
itemStateChanged
- Specified by:
itemStateChangedin interfaceItemListener
-
saveTransformMatrix
This method creates the Trans Matrices Array file for DTI Preprocessing -
setOutputDirectory
Sets the default output directory for the images generated by this panel.- Parameters:
directory-
-
callReg35Algorithm
Calls the algorithm with the set-up parameters. -
callT2Algorithm
Calls the algorithm with the set-up parameters. -
createProgressBar
Creates the progress bar that will listen to an algorithm's progress changes- Parameters:
title- progress bar's titlepListener- algorithmbase that will notify progress updates to the pBar
-
createProgressBar
Creates the progress bar (should be created within JDialog's callAlgorithm method- Parameters:
title- progress bar's titlemsg- the message to display on the progress bar (initial setting)pListener- the algorithm that will register the progress bar as a listener
-
B0extraction
Extracts the reference sub-volume from the input 4D image.- Parameters:
image4D- 4D image to extract the sub-volume from.refVolumeNum- the reference sub-volume number.- Returns:
- a new ModelImage containing the extracted sub-volume.
-
buildOARButton
-
buildTitledBorder
-
buildLoadPanel
public void buildLoadPanel(ActionListener listener, JPanel mainPanel, JLabel label, JTextField imageName, String tooltip, String actionCommand) -
init
private void init()Initializes the GUI components and displays the dialog. -
resampleT2
Resamples the input ModelImage to match the extents and resolutions of the second ModelImage.- Parameters:
oldT2- input image that will be resampledmatchB0- the image to match- Returns:
- resampled version of the first input image.
-
setVariablesForOAR35D
private boolean setVariablesForOAR35D()Sets the variables needed to call the registration algorithm based on the values entered in the dialog.- Returns:
trueif the variables are properly set,falseotherwise.
-