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 classJDialogTreT2.DialogThreeprivate classJDialogTreT2.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 intb1ImageIndexprivate int[]bestToWorstprivate booleancalculateB0private booleancalculateM0private booleancalculateT2private AlgorithmTreT2cAlgoprivate double[]contractionprivate double[]expansionprivate booleangeScannerprivate floathardNoiseThresholdprivate booleanincludeB1Mapprivate booleaninvertT2toR2private booleanlowerLeftCornerprivate booleanlowerRightCornerprivate doublemaxM0private doublemaxT2private javax.swing.JComboBoxmodelingComboBoxprivate intNfa_phase0private intNfa_phase180private floatnoiseScaleprivate booleanperformApproxModelingprivate booleanperformConventionalModelingprivate booleanperformConventionalWith0Phaseprivate booleanperformConventionalWith180Phaseprivate booleanperformFullModelingprivate java.util.ArrayList<javax.swing.JRadioButton>phaseRadiosprivate double[]reflectionprivate static longserialVersionUIDprivate double[]shrinkprivate booleansiemensScannerprivate double[][]simplexprivate double[]simplexCentreprivate double[]simplexLineValuesprivate double[]simplexResidualsprivate int[]ssfpImageIndex_phase0private int[]ssfpImageIndex_phase180private intt1ImageIndexprivate static java.lang.Stringtitleprivate double[]treFA_phase0private double[]treFA_phase180private doubletreTRprivate double[]twoPContractionprivate double[]twoPExpansionprivate double[]twoPReflectionprivate double[]twoPShrinkprivate double[][]twoPSimplexprivate double[]twoPSimplexCentreprivate double[]twoPSimplexLineValuesprivate double[]twoPSimplexResidualsprivate booleanupperLeftCornerprivate booleanupperRightCornerprivate booleanuseHardThresholdingprivate booleanuseSmartThresholdingprivate 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 voidactionPerformed(java.awt.event.ActionEvent event)voidalgorithmPerformed(AlgorithmBase algorithm)Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).protected voidcallAlgorithm()Starts the algorithm.protected voiddoPostAlgorithmActions()Store the result image in the script runner's image table now that the action execution is finished.floatgetHardNoiseThreshold()doublegetMaxM0()doublegetMaxT2()intgetNfa_phase0()intgetNfa_phase180()floatgetNoiseScale()doublegetTreTR()private voidinit()booleanisCalculateB0()booleanisCalculateM0()booleanisCalculateT2()booleanisGeScanner()booleanisIncludeB1Map()booleanisInvertT2toR2()booleanisLowerLeftCorner()booleanisLowerRightCorner()booleanisPerformApproxModeling()booleanisPerformConventionalModeling()booleanisPerformConventionalWith0Phase()booleanisPerformConventionalWith180Phase()booleanisPerformFullModeling()booleanisSiemensScanner()booleanisUpperLeftCorner()booleanisUpperRightCorner()booleanisUseHardThresholding()booleanisUseSmartThresholding()protected voidsetGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.protected voidstoreParamsFromGUI()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: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
-
doPostAlgorithmActions
protected void doPostAlgorithmActions()
Store the result image in the script runner's image table now that the action execution is finished.- Overrides:
doPostAlgorithmActionsin classJDialogScriptableBase
-
setGUIFromParams
protected void setGUIFromParams()
Description copied from class:JDialogScriptableBaseSet the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
protected void storeParamsFromGUI() throws ParserExceptionDescription copied from class:JDialogScriptableBaseRecord the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUIin 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:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classJDialogBase
-
callAlgorithm
protected void callAlgorithm()
Description copied from class:JDialogScriptableBaseStarts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.- Specified by:
callAlgorithmin 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()
-
-