Package gov.nih.mipav.view.dialogs
Class JDialogTreT2
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- gov.nih.mipav.view.dialogs.JDialogBase
-
- gov.nih.mipav.view.dialogs.JDialogScriptableBase
-
- gov.nih.mipav.view.dialogs.JDialogTreT2
-
- All Implemented Interfaces:
AlgorithmInterface
,ScriptableActionInterface
,DialogDefaultsInterface
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JDialogTreT2 extends JDialogScriptableBase implements AlgorithmInterface
The dialog for the calculation of Tre methods. This dialog is scriptable, but not yet Jistable. Tags used for file selection include "ssfp", "ph0", "ph180", "b1map", "t1map". Case insensitive- Author:
- senseneyj
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
JDialogTreT2.DialogThree
private class
JDialogTreT2.DialogTwo
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private int
b1ImageIndex
private int[]
bestToWorst
private boolean
calculateB0
private boolean
calculateM0
private boolean
calculateT2
private AlgorithmTreT2
cAlgo
private double[]
contraction
private double[]
expansion
private boolean
geScanner
private float
hardNoiseThreshold
private boolean
includeB1Map
private boolean
invertT2toR2
private boolean
lowerLeftCorner
private boolean
lowerRightCorner
private double
maxM0
private double
maxT2
private javax.swing.JComboBox
modelingComboBox
private int
Nfa_phase0
private int
Nfa_phase180
private float
noiseScale
private boolean
performApproxModeling
private boolean
performConventionalModeling
private boolean
performConventionalWith0Phase
private boolean
performConventionalWith180Phase
private boolean
performFullModeling
private java.util.ArrayList<javax.swing.JRadioButton>
phaseRadios
private double[]
reflection
private static long
serialVersionUID
private double[]
shrink
private boolean
siemensScanner
private double[][]
simplex
private double[]
simplexCentre
private double[]
simplexLineValues
private double[]
simplexResiduals
private int[]
ssfpImageIndex_phase0
private int[]
ssfpImageIndex_phase180
private int
t1ImageIndex
private static java.lang.String
title
private double[]
treFA_phase0
private double[]
treFA_phase180
private double
treTR
private double[]
twoPContraction
private double[]
twoPExpansion
private double[]
twoPReflection
private double[]
twoPShrink
private double[][]
twoPSimplex
private double[]
twoPSimplexCentre
private double[]
twoPSimplexLineValues
private double[]
twoPSimplexResiduals
private boolean
upperLeftCorner
private boolean
upperRightCorner
private boolean
useHardThresholding
private boolean
useSmartThresholding
private java.lang.String[]
wList
-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParameters
-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogTreT2()
Empty constructor needed for dynamic instantiation.JDialogTreT2(java.awt.Frame theParentFrame, ModelImage im)
Construct the barrel/pin cushion correction dialog.
-
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).protected void
callAlgorithm()
Starts the algorithm.protected void
doPostAlgorithmActions()
Store the result image in the script runner's image table now that the action execution is finished.float
getHardNoiseThreshold()
double
getMaxM0()
double
getMaxT2()
int
getNfa_phase0()
int
getNfa_phase180()
float
getNoiseScale()
double
getTreTR()
private void
init()
boolean
isCalculateB0()
boolean
isCalculateM0()
boolean
isCalculateT2()
boolean
isGeScanner()
boolean
isIncludeB1Map()
boolean
isInvertT2toR2()
boolean
isLowerLeftCorner()
boolean
isLowerRightCorner()
boolean
isPerformApproxModeling()
boolean
isPerformConventionalModeling()
boolean
isPerformConventionalWith0Phase()
boolean
isPerformConventionalWith180Phase()
boolean
isPerformFullModeling()
boolean
isSiemensScanner()
boolean
isUpperLeftCorner()
boolean
isUpperRightCorner()
boolean
isUseHardThresholding()
boolean
isUseSmartThresholding()
protected void
setGUIFromParams()
Set the dialog GUI using the script parameters while running this algorithm as part of a script.protected void
storeParamsFromGUI()
Record the parameters just used to run this algorithm in a script.-
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
getDialogActionString, insertScriptLine, isComplete, scriptRun, setComplete
-
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
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, 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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
title
private static java.lang.String title
-
treTR
private double treTR
-
maxT2
private double maxT2
-
maxM0
private double maxM0
-
treFA_phase0
private double[] treFA_phase0
-
treFA_phase180
private double[] treFA_phase180
-
ssfpImageIndex_phase0
private int[] ssfpImageIndex_phase0
-
ssfpImageIndex_phase180
private int[] ssfpImageIndex_phase180
-
t1ImageIndex
private int t1ImageIndex
-
b1ImageIndex
private int b1ImageIndex
-
simplexLineValues
private double[] simplexLineValues
-
simplexResiduals
private double[] simplexResiduals
-
simplexCentre
private double[] simplexCentre
-
reflection
private double[] reflection
-
expansion
private double[] expansion
-
contraction
private double[] contraction
-
shrink
private double[] shrink
-
simplex
private double[][] simplex
-
twoPSimplexLineValues
private double[] twoPSimplexLineValues
-
twoPSimplexResiduals
private double[] twoPSimplexResiduals
-
twoPSimplexCentre
private double[] twoPSimplexCentre
-
twoPReflection
private double[] twoPReflection
-
twoPExpansion
private double[] twoPExpansion
-
twoPContraction
private double[] twoPContraction
-
twoPShrink
private double[] twoPShrink
-
twoPSimplex
private double[][] twoPSimplex
-
bestToWorst
private int[] bestToWorst
-
Nfa_phase0
private int Nfa_phase0
-
Nfa_phase180
private int Nfa_phase180
-
calculateT2
private boolean calculateT2
-
includeB1Map
private boolean includeB1Map
-
performConventionalModeling
private boolean performConventionalModeling
-
performApproxModeling
private boolean performApproxModeling
-
performFullModeling
private boolean performFullModeling
-
calculateM0
private boolean calculateM0
-
invertT2toR2
private boolean invertT2toR2
-
calculateB0
private boolean calculateB0
-
performConventionalWith180Phase
private boolean performConventionalWith180Phase
-
performConventionalWith0Phase
private boolean performConventionalWith0Phase
-
geScanner
private boolean geScanner
-
siemensScanner
private boolean siemensScanner
-
upperLeftCorner
private boolean upperLeftCorner
-
upperRightCorner
private boolean upperRightCorner
-
lowerLeftCorner
private boolean lowerLeftCorner
-
lowerRightCorner
private boolean lowerRightCorner
-
useSmartThresholding
private boolean useSmartThresholding
-
useHardThresholding
private boolean useHardThresholding
-
noiseScale
private final float noiseScale
- See Also:
- Constant Field Values
-
hardNoiseThreshold
private final float hardNoiseThreshold
- See Also:
- Constant Field Values
-
wList
private java.lang.String[] wList
-
cAlgo
private AlgorithmTreT2 cAlgo
-
modelingComboBox
private javax.swing.JComboBox modelingComboBox
-
phaseRadios
private java.util.ArrayList<javax.swing.JRadioButton> phaseRadios
-
-
Constructor Detail
-
JDialogTreT2
public JDialogTreT2()
Empty constructor needed for dynamic instantiation.
-
JDialogTreT2
public JDialogTreT2(java.awt.Frame theParentFrame, ModelImage im)
Construct the barrel/pin cushion correction dialog.- Parameters:
theParentFrame
- Parent frame.im
- Source image.
-
-
Method Detail
-
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 interfaceAlgorithmInterface
- Parameters:
algorithm
- the algorithm which has just completed
-
doPostAlgorithmActions
protected void doPostAlgorithmActions()
Store the result image in the script runner's image table now that the action execution is finished.- Overrides:
doPostAlgorithmActions
in classJDialogScriptableBase
-
setGUIFromParams
protected void setGUIFromParams()
Description copied from class:JDialogScriptableBase
Set the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParams
in classJDialogScriptableBase
-
storeParamsFromGUI
protected void storeParamsFromGUI() throws ParserException
Description copied from class:JDialogScriptableBase
Record the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUI
in classJDialogScriptableBase
- Throws:
ParserException
- If there is a problem creating/recording the new parameters.
-
init
private void init()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogBase
-
callAlgorithm
protected void callAlgorithm()
Description copied from class:JDialogScriptableBase
Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.- Specified by:
callAlgorithm
in classJDialogScriptableBase
-
getTreTR
public double getTreTR()
-
getMaxT2
public double getMaxT2()
-
getMaxM0
public double getMaxM0()
-
getNfa_phase0
public int getNfa_phase0()
-
getNfa_phase180
public int getNfa_phase180()
-
isCalculateT2
public boolean isCalculateT2()
-
isIncludeB1Map
public boolean isIncludeB1Map()
-
isPerformConventionalModeling
public boolean isPerformConventionalModeling()
-
isPerformApproxModeling
public boolean isPerformApproxModeling()
-
isPerformFullModeling
public boolean isPerformFullModeling()
-
isCalculateM0
public boolean isCalculateM0()
-
isInvertT2toR2
public boolean isInvertT2toR2()
-
isCalculateB0
public boolean isCalculateB0()
-
isPerformConventionalWith180Phase
public boolean isPerformConventionalWith180Phase()
-
isPerformConventionalWith0Phase
public boolean isPerformConventionalWith0Phase()
-
isGeScanner
public boolean isGeScanner()
-
isSiemensScanner
public boolean isSiemensScanner()
-
isUpperLeftCorner
public boolean isUpperLeftCorner()
-
isUpperRightCorner
public boolean isUpperRightCorner()
-
isLowerLeftCorner
public boolean isLowerLeftCorner()
-
isLowerRightCorner
public boolean isLowerRightCorner()
-
isUseSmartThresholding
public boolean isUseSmartThresholding()
-
isUseHardThresholding
public boolean isUseHardThresholding()
-
getNoiseScale
public float getNoiseScale()
-
getHardNoiseThreshold
public float getHardNoiseThreshold()
-
-