Package gov.nih.mipav.view.dialogs
Class JDialogRegistrationOAR35D
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.JDialogRegistrationOAR35D
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
Dialog to get user input, then call AlgorithmRegOAR35D. Internal registration is performed within one 4D image. In
adjacent mode the first volume above the reference volume is registered to the reference volume, then the second
volume above the reference volume is registered to the first volume above the reference volume, and so on until the
last volume is registered the next to last volume. Then, the first volume below the reference volume is registered to
the reference volume, the second volume below the reference volume is registered to first volume below the reference
volume, and so on unitl the first volume is registered to the second volume. In reference mode every volume is simply
registered to the reference volume. In average mode every volume is registered to the average of all volumes.
- Author:
- Neva Cherniavsky
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested 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 JRadioButtonDOCUMENT ME!private JDialogVariables for Advanced Settings dialog.private JRadioButtonDOCUMENT ME!private JButtonDOCUMENT ME!private floatDOCUMENT ME!private JTextFieldDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxprivate intDOCUMENT ME!private StringDOCUMENT ME!private booleanDOCUMENT ME!private intDOCUMENT ME!(package private) booleanDOCUMENT ME!private booleanWhen true, the full version of JTEM Powell search is used in the registration algorithm.private booleanDOCUMENT ME!private final intprivate booleanDOCUMENT ME!private JCheckBoxDOCUMENT ME!private StringDOCUMENT ME!private floatDOCUMENT ME!private JTextFieldDOCUMENT ME!private JCheckBoxDOCUMENT ME!private ModelImageDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JCheckBoxTurns on the JTEM full version of Powell's algorithm on or offprivate JLabelDOCUMENT ME!private final intprivate ModelImageDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private final intprivate JRadioButtonDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private final intprivate intDOCUMENT ME!private JTextFieldDOCUMENT ME!private JRadioButtonDOCUMENT ME!private ModelImageDOCUMENT ME!private AlgorithmRegOAR35DDOCUMENT ME!private AlgorithmRegELSUNCOAR35Dprivate intDOCUMENT ME!private floatDOCUMENT ME!private JTextFieldDOCUMENT ME!private floatDOCUMENT ME!private JTextFieldDOCUMENT ME!private JCheckBoxDOCUMENT ME!private intprivate static final longUse serialVersionUID for interoperability.private JTextFieldDOCUMENT ME!private ViewUserInterfaceDOCUMENT ME!private booleanDOCUMENT ME!private JRadioButtonDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private JRadioButtonDOCUMENT ME!Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParametersFields 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, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor needed for dynamic instantiation (used during scripting).JDialogRegistrationOAR35D(Frame theParentFrame, ModelImage im) Creates new dialog for user to choose variables for internal registration. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.voidalgorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented.private JDialogbuildAdvancedDialog(int maxIter, int numMinima) Build advanced settings dialog.protected voidCalls the algorithm with the set-up parameters.private voidinit()Initializes the GUI components and displays the dialog.voiditemStateChanged(ItemEvent event) Changes the interpolation box to enabled or disabled depending on if the transform box is checked or not.voidsetCoarseBegin(float x) Accessor to set the coarse sample begin.voidsetCoarseEnd(float x) Accessor to set the coarse sample end.voidsetCoarseRate(float x) Accessor to set the coarse sample rate.voidsetCostChoice(int x) Accessor to set the choice of cost function.voidsetDOF(int x) Accessor to set the degrees of freedom.voidsetFastMode(boolean flag) Accessor to set whether or not to execute the fast mode (skip sub sample and goto last final optimization).voidsetFineRate(float x) Accessor to set the fine sample rate.voidsetGraphCheckBox(boolean doGraph) Accessor to set graphCheckBox.protected voidSet the dialog GUI using the script parameters while running this algorithm as part of a script.voidAccessor to set the input weight image.voidsetInterp(int x) Accessor to set the initial interpolation.voidsetInterp2(int x) Accessor to set the final interpolation.voidsetMaxIterations(int maxIterations) Accessor to set maxIterations.voidsetNumMinima(int numMinima) Accessor to set numMinima.voidsetOutsideReferenceVolume(ModelImage refVolume) allows user to use an outside reference volume for registering.voidsetRefImageNum(int refImageNumber) Accessor to set refImageNum.voidsetRegisterTo(int registerTo) Accessor to set registerTo.voidsetSearchAlgorithm(int searchAlgorithm) voidsetSubsample(boolean doSubsample) Accessor to set whether or not subsampling occurs.private booleanSets the variables needed to call the registration algorithm based on the values entered in the dialog.voidsetVoisOnly(boolean flag) Accessor to set the VOIs only flag.voidsetWeighted(boolean flag) Accessor to set the weighted images flag.protected voidRecord the parameters just used to run this algorithm in a script.Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
doPostAlgorithmActions, getDialogActionString, insertScriptLine, isComplete, scriptRun, setCompleteMethods 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, 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, windowOpenedMethods 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, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, toFrontMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
POWELL
private final int POWELL- See Also:
-
ELSUNC
private final int ELSUNC- See Also:
-
LEVENBERG_MARQUARDT
private final int LEVENBERG_MARQUARDT- See Also:
-
NL2SOL
private final int NL2SOL- See Also:
-
searchAlgorithm
private int searchAlgorithm -
doGraph
boolean doGraphDOCUMENT ME! -
adjacentImageRButton
DOCUMENT ME! -
advancedDialog
Variables for Advanced Settings dialog. -
averageImageRButton
DOCUMENT ME! -
maxIterationsText
DOCUMENT ME! -
numMinText
DOCUMENT ME! -
doJTEM
private boolean doJTEMWhen true, the full version of JTEM Powell search is used in the registration algorithm. -
jtemCheckbox
Turns on the JTEM full version of Powell's algorithm on or off -
buttonWeightInput
DOCUMENT ME! -
coarseRateText
DOCUMENT ME! -
comboBoxCostFunct
DOCUMENT ME! -
comboBoxSearchAlgo
-
comboBoxDOF
DOCUMENT ME! -
comboBoxInterp
DOCUMENT ME! -
comboBoxInterp2
DOCUMENT ME! -
cost
private int costDOCUMENT ME! -
interp
private int interpDOCUMENT ME! -
interp2
private int interp2DOCUMENT ME! -
DOF
private int DOFDOCUMENT ME! -
doColor
private boolean doColorDOCUMENT ME! -
doSubsample
private boolean doSubsampleDOCUMENT ME! -
fastMode
private boolean fastModeDOCUMENT ME! -
fastModeCheckbox
DOCUMENT ME! -
fileNameWInput
DOCUMENT ME! -
directoryWInput
DOCUMENT ME! -
fineRateText
DOCUMENT ME! -
graphCheckBox
DOCUMENT ME! -
inputWeightImage
DOCUMENT ME! -
labelInterp2
DOCUMENT ME! -
matchImage
DOCUMENT ME! -
maxIterations_def
private int maxIterations_defDOCUMENT ME! -
numMinima_def
private int numMinima_defDOCUMENT ME! -
maxIterations
private int maxIterationsDOCUMENT ME! -
noneRadio
DOCUMENT ME! -
numMinima
private int numMinimaDOCUMENT ME! -
refImageNum
private int refImageNumDOCUMENT ME! -
refImageNumText
DOCUMENT ME! -
refImageRButton
DOCUMENT ME! -
refVolume
DOCUMENT ME! -
reg35
DOCUMENT ME! -
reg35E
-
registerTo
private int registerToDOCUMENT ME! -
rotateBegin
private float rotateBeginDOCUMENT ME! -
rotateEnd
private float rotateEndDOCUMENT ME! -
coarseRate
private float coarseRateDOCUMENT ME! -
fineRate
private float fineRateDOCUMENT ME! -
rotateBeginText
DOCUMENT ME! -
rotateEndText
DOCUMENT ME! -
sampleCheckBox
DOCUMENT ME! -
textInput
DOCUMENT ME! -
UI
DOCUMENT ME! -
useOutsideReferenceVolume
private boolean useOutsideReferenceVolumeDOCUMENT ME! -
voiRadio
DOCUMENT ME! -
voisOnly
private boolean voisOnlyDOCUMENT ME! -
weighted
private boolean weightedDOCUMENT ME! -
weightRadio
DOCUMENT ME!
-
-
Constructor Details
-
JDialogRegistrationOAR35D
public JDialogRegistrationOAR35D()Empty constructor needed for dynamic instantiation (used during scripting). -
JDialogRegistrationOAR35D
Creates new dialog for user to choose variables for internal registration.- Parameters:
theParentFrame- Parent frame.im- Source image.
-
-
Method Details
-
actionPerformed
Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- Event that triggers function.
-
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
Changes the interpolation box to enabled or disabled depending on if the transform box is checked or not.- Specified by:
itemStateChangedin interfaceItemListener- Overrides:
itemStateChangedin classJDialogBase- Parameters:
event- Event that triggered this function.
-
setCoarseBegin
public void setCoarseBegin(float x) Accessor to set the coarse sample begin.- Parameters:
x- Coarse begin
-
setCoarseEnd
public void setCoarseEnd(float x) Accessor to set the coarse sample end.- Parameters:
x- Coarse end
-
setCoarseRate
public void setCoarseRate(float x) Accessor to set the coarse sample rate.- Parameters:
x- Coarse rate
-
setCostChoice
public void setCostChoice(int x) Accessor to set the choice of cost function.- Parameters:
x- Cost function.
-
setDOF
public void setDOF(int x) Accessor to set the degrees of freedom.- Parameters:
x- Degrees of freedom
-
setFastMode
public void setFastMode(boolean flag) Accessor to set whether or not to execute the fast mode (skip sub sample and goto last final optimization).- Parameters:
flag-truethen skip to level one (last ) optimization.
-
setFineRate
public void setFineRate(float x) Accessor to set the fine sample rate.- Parameters:
x- Fine rate
-
setGraphCheckBox
public void setGraphCheckBox(boolean doGraph) Accessor to set graphCheckBox.- Parameters:
doGraph- if true output graphs of rotations and translations
-
setInputWeightImage
Accessor to set the input weight image.- Parameters:
im- Input weight image.
-
setInterp
public void setInterp(int x) Accessor to set the initial interpolation.- Parameters:
x- Interpolation
-
setInterp2
public void setInterp2(int x) Accessor to set the final interpolation.- Parameters:
x- Interpolation
-
setMaxIterations
public void setMaxIterations(int maxIterations) Accessor to set maxIterations.- Parameters:
maxIterations- DOCUMENT ME!
-
setNumMinima
public void setNumMinima(int numMinima) Accessor to set numMinima.- Parameters:
numMinima- DOCUMENT ME!
-
setOutsideReferenceVolume
allows user to use an outside reference volume for registering.- Parameters:
refVolume- (3-Dim reference volume)
-
setRefImageNum
public void setRefImageNum(int refImageNumber) Accessor to set refImageNum.- Parameters:
refImageNumber- number of reference slice
-
setRegisterTo
public void setRegisterTo(int registerTo) Accessor to set registerTo.- Parameters:
registerTo- - 1 = adjacent, 2 = average, 3 = reference
-
setSearchAlgorithm
public void setSearchAlgorithm(int searchAlgorithm) - Parameters:
searchAlgorithm-
-
setSubsample
public void setSubsample(boolean doSubsample) Accessor to set whether or not subsampling occurs.- Parameters:
doSubsample- DOCUMENT ME!
-
setVoisOnly
public void setVoisOnly(boolean flag) Accessor to set the VOIs only flag.- Parameters:
flag-truethen only register the parts of the images in the VOIs.
-
setWeighted
public void setWeighted(boolean flag) Accessor to set the weighted images flag.- Parameters:
flag-truemeans there are weighted images.
-
callAlgorithm
protected void callAlgorithm()Calls the algorithm with the set-up parameters.- Specified by:
callAlgorithmin classJDialogScriptableBase
-
setGUIFromParams
protected void setGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
Record 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.
-
buildAdvancedDialog
Build advanced settings dialog. Returns JDialog.- Parameters:
maxIter- DOCUMENT ME!numMinima- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
init
private void init()Initializes the GUI components and displays the dialog. -
setVariables
private boolean setVariables()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.
-