Package gov.nih.mipav.view.dialogs
Class JDialogConstrainedOAR3D
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.JDialogConstrainedOAR3D
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
Dialog to get user input, then call algorithm RegistrationOAR3D. The user must designate a reference image, a type of
cost function, the degrees of freedom used in the registration, and the range and rate of the coarse and fine
samples. These are set to defaults most likely to give a fast and accurate registration. The user may also select
weighted images to discount parts of the reference and input images in the registration. These must be the same size
as their respective originals - i.e., the reference weight image must be the same size as the reference image. The
user can select to display the registered image. Regardless of whether this is selected, the matrix will be stored in
a file in the user's working directory and also in the original image's transformation matrix.
- 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 JDialogVariables for Advanced Settings dialog.private intDOCUMENT ME!private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private booleanDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxprivate intDOCUMENT ME!private StringDOCUMENT ME!private intprivate StringDOCUMENT ME!private StringDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private intDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private JCheckBoxDOCUMENT ME!private StringDOCUMENT ME!private StringDOCUMENT ME!private floatprivate GridBagConstraintsDOCUMENT ME!private doubleprivate doubleprivate ModelImageDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private booleanDOCUMENT ME!private JCheckBoxDOCUMENT ME!private ModelImageDOCUMENT ME!private JComboBoxprivate Stringprivate JLabelprivate intDOCUMENT ME!private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private float[][]when done debugging: private boolean limitTranslation = false, oneTransLimit = false;.private booleanDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JTextFieldDOCUMENT ME!private booleanDOCUMENT ME!private JComboBoxprivate intTells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image maximumprivate JLabelprivate ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private AlgorithmConstrainedOAR3Dprivate AlgorithmConstrainedELSUNCOAR3DDOCUMENT ME!private ModelImageDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private floatprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private floatDOCUMENT ME!private floatDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private floatprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private floatDOCUMENT ME!private floatDOCUMENT ME!private JPanelVariables for Rotation and Translation bounds.private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private floatprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private floatDOCUMENT ME!private floatDOCUMENT ME!private JCheckBoxDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelprivate JPanel finePanelX, finePanelY, finePanelZ;.private JPanelprivate JPanel finePanelX, finePanelY, finePanelZ;.private JPanelprivate JPanel finePanelX, finePanelY, finePanelZ;.private float[][]DOCUMENT ME!private ViewUserInterfaceDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JCheckBoxDOCUMENT ME!private booleanprivate JLabelprivate JTextFieldprivate JLabelprivate JTextFieldprivate JRadioButtonDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private booleanDOCUMENT ME!private JRadioButtonDOCUMENT 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).JDialogConstrainedOAR3D(Frame theParentFrame, ModelImage im) Creates new dialog for user to choose type of linear image registration algorithm to run. -
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 bracketBound, int maxIter, int numMinima, boolean limitTrans, boolean oneTrans) Build advanced settings dialog.private JComboBoxbuildImgComboBox(ModelImage image) Builds a list of images.protected voidCalls the algorithm with the set-up parameters.protected voidStore the result image in the script runner's image table now that the action execution is finished.private voidenableTranslationsYZ(boolean state) DOCUMENT ME!private voidenableTranslationX(boolean state) DOCUMENT ME!Accessor to get the result image.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.voidsetAdvancedSettings(int bracketBound, int maxIterations, int numMinima) Accessor to set the advanced settings.voidsetCalcCOG(boolean flag) Accessor to set the whether or not to calculate the center of gravity (mass).voidsetCoarseBeginX(float x) Accessor to set the coarse sample beginX.voidsetCoarseBeginY(float y) Accessor to set the coarse sample beginY.voidsetCoarseBeginZ(float z) Accessor to set the coarse sample beginZ.voidsetCoarseEndX(float x) Accessor to set the coarse sample endX.voidsetCoarseEndY(float y) Accessor to set the coarse sample endY.voidsetCoarseEndZ(float z) Accessor to set the coarse sample endZ.voidsetCostChoice(int x) Accessor to set the choice of cost function.voidsetDisplayTransform(boolean flag) Accessor to set the display transform flag.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).voidsetFillValue(float fillValue) Accessor to set intensity value for out of bounds dataprotected 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.voidsetMatrixDirectory(String matrixDirectory) Accessor to set directory in which the matrix file is storedvoidsetMaxOfMinResol(boolean flag) Accessor to set the maximum resolutions flag.voidsetMaxTx(float maxX) Accessor to set the maximum X translation.voidsetMaxTy(float maxY) Accessor to set the maximum Y translation.voidsetMaxTz(float maxZ) Accessor to set the maximum Z translation.voidsetMinTx(float minX) Accessor to set the minimum X translation.voidsetMinTy(float minY) Accessor to set the minimum Y translation.voidsetMinTz(float minZ) Accessor to set the minimum Z translation.voidsetNumCoarseX(int x) Accessor to set the coarse sample rateX.voidsetNumCoarseY(int y) Accessor to set the coarse sample rateY.voidsetNumCoarseZ(int z) Accessor to set the coarse sample rateZ.voidsetOutOfBoundsIndex(int outOfBoundsIndex) tells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image maxvoidAccessor to set the reference image.voidAccessor to set the reference weight image.voidsetSubsample(boolean doSubsample) Accessor to set whether or not subsampling occurs.voidsetUseELSUNC(boolean useELSUNC) Accessor to set whether to use Powell's algorithm calling Brent's method or ELSUNC for search algorithmprivate 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.private voidshowX()DOCUMENT ME!private voidshowY()DOCUMENT ME!private voidshowZ()DOCUMENT ME!protected voidRecord the parameters just used to run this algorithm in a script.private booleantestType(int type, float value) Determine if the value is in the image type range and within the float range since AlgorithmTransform does not use double buffers.Methods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
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:
-
advancedDialog
Variables for Advanced Settings dialog. -
bracketBoundText
DOCUMENT ME! -
maxIterationsText
DOCUMENT ME! -
numMinText
DOCUMENT ME! -
buttonWeightInput
DOCUMENT ME! -
buttonWeightRef
DOCUMENT ME! -
calcCOG
private boolean calcCOGDOCUMENT ME! -
calcCOGCheckbox
DOCUMENT ME! -
coarsePanelX
DOCUMENT ME! -
coarsePanelY
DOCUMENT ME! -
coarsePanelZ
DOCUMENT ME! -
comboBoxCostFunct
DOCUMENT ME! -
comboBoxSearchAlgo
-
comboBoxDOF
DOCUMENT ME! -
comboBoxImage
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! -
costName
DOCUMENT ME! -
displayTransform
private boolean displayTransformDOCUMENT ME! -
doColor
private boolean doColorDOCUMENT ME! -
doSubsample
private boolean doSubsampleDOCUMENT ME! -
fastMode
private boolean fastModeDOCUMENT ME! -
fastModeCheckbox
DOCUMENT ME! -
fileNameWRef
DOCUMENT ME! -
directoryWRef
DOCUMENT ME! -
fileNameWInput
DOCUMENT ME! -
directoryWInput
DOCUMENT ME! -
gbc
DOCUMENT ME! -
inputWeightImage
DOCUMENT ME! -
refWeightImage
DOCUMENT ME! -
labelInterp2
DOCUMENT ME! -
labelTranslateRangeX
DOCUMENT ME! -
labelTranslateRangeY
DOCUMENT ME! -
labelTranslateRangeZ
DOCUMENT ME! -
limitTranslation
private boolean limitTranslationDOCUMENT ME! -
oneTransLimit
private boolean oneTransLimitDOCUMENT ME! -
limitTranslationCheckbox
DOCUMENT ME! -
matchImage
DOCUMENT ME! -
maxIterations_def
private int maxIterations_defDOCUMENT ME! -
bracketBound_def
private int bracketBound_defDOCUMENT ME! -
numMinima_def
private int numMinima_defDOCUMENT ME! -
maxIterations
private int maxIterationsDOCUMENT ME! -
bracketBound
private int bracketBoundDOCUMENT ME! -
maxLimits
private float[][] maxLimitswhen done debugging: private boolean limitTranslation = false, oneTransLimit = false;. -
maxOfMinResol
private boolean maxOfMinResolDOCUMENT ME! -
maxTransTextX
DOCUMENT ME! -
maxTransTextY
DOCUMENT ME! -
maxTransTextZ
DOCUMENT ME! -
minMaxCheckbox
DOCUMENT ME! -
minTransTextX
DOCUMENT ME! -
minTransTextY
DOCUMENT ME! -
minTransTextZ
DOCUMENT ME! -
mmLabelX
DOCUMENT ME! -
mmLabelY
DOCUMENT ME! -
mmLabelZ
DOCUMENT ME! -
noneRadio
DOCUMENT ME! -
numberCoarseTextX
DOCUMENT ME! -
numberCoarseTextY
DOCUMENT ME! -
numberCoarseTextZ
DOCUMENT ME! -
numCoarseX
private int numCoarseXDOCUMENT ME! -
numCoarseY
private int numCoarseYDOCUMENT ME! -
numCoarseZ
private int numCoarseZDOCUMENT ME! -
numMinima
private int numMinimaDOCUMENT ME! -
refImage
DOCUMENT ME! -
reg3E
DOCUMENT ME! -
reg3
-
resultImage
DOCUMENT ME! -
rotateBeginTextX
DOCUMENT ME! -
rotateBeginTextY
DOCUMENT ME! -
rotateBeginTextZ
DOCUMENT ME! -
rotateBeginX
private float rotateBeginXprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;. -
rotateEndX
private float rotateEndXprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;. -
rotateRangeX
private float rotateRangeXprivate JTextField fineRateTextX, fineRateTextY, fineRateTextZ;. -
rotateBeginY
private float rotateBeginYDOCUMENT ME! -
rotateEndY
private float rotateEndYDOCUMENT ME! -
rotateRangeY
private float rotateRangeYDOCUMENT ME! -
rotateBeginZ
private float rotateBeginZDOCUMENT ME! -
rotateEndZ
private float rotateEndZDOCUMENT ME! -
rotateRangeZ
private float rotateRangeZDOCUMENT ME! -
rotateEndTextX
DOCUMENT ME! -
rotateEndTextY
DOCUMENT ME! -
rotateEndTextZ
DOCUMENT ME! -
rotatePanel
Variables for Rotation and Translation bounds. -
rotateRangePanelX
DOCUMENT ME! -
rotateRangePanelY
DOCUMENT ME! -
rotateRangePanelZ
DOCUMENT ME! -
sampleCheckbox
DOCUMENT ME! -
textInput
DOCUMENT ME! -
textRef
DOCUMENT ME! -
toLabelX
DOCUMENT ME! -
toLabelY
DOCUMENT ME! -
toLabelZ
DOCUMENT ME! -
transformCheckbox
DOCUMENT ME! -
translatePanel
DOCUMENT ME! -
translateRangePanelX
private JPanel finePanelX, finePanelY, finePanelZ;. -
translateRangePanelY
private JPanel finePanelX, finePanelY, finePanelZ;. -
translateRangePanelZ
private JPanel finePanelX, finePanelY, finePanelZ;. -
transLimits
private float[][] transLimitsDOCUMENT ME! -
UI
DOCUMENT ME! -
universalRotationCheckbox
DOCUMENT ME! -
universalTranslationCheckbox
DOCUMENT ME! -
voiRadio
DOCUMENT ME! -
voisOnly
private boolean voisOnlyDOCUMENT ME! -
weighted
private boolean weightedDOCUMENT ME! -
weightRadio
DOCUMENT ME! -
xRRadio
DOCUMENT ME! -
yRRadio
DOCUMENT ME! -
zRRadio
DOCUMENT ME! -
xRSelected
private boolean xRSelectedDOCUMENT ME! -
yRSelected
private boolean yRSelectedDOCUMENT ME! -
outOfBoundsLabel
-
outOfBoundsComboBox
-
valueLabel
-
valueText
-
imageMin
private double imageMin -
imageMax
private double imageMax -
dataType
private int dataType -
outOfBoundsIndex
private int outOfBoundsIndexTells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image maximum -
fillValue
private float fillValue -
matrixLabel
-
matrixComboBox
-
matrixDirectory
-
userDirectoryLabel
-
userDirectoryText
-
useELSUNC
private boolean useELSUNC
-
-
Constructor Details
-
JDialogConstrainedOAR3D
public JDialogConstrainedOAR3D()Empty constructor needed for dynamic instantiation (used during scripting). -
JDialogConstrainedOAR3D
Creates new dialog for user to choose type of linear image registration algorithm to run.- 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.
-
getResultImage
Accessor to get the result image.- Returns:
- Result image.
-
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.
-
setAdvancedSettings
public void setAdvancedSettings(int bracketBound, int maxIterations, int numMinima) Accessor to set the advanced settings.- Parameters:
bracketBound- DOCUMENT ME!maxIterations- DOCUMENT ME!numMinima- DOCUMENT ME!
-
setCalcCOG
public void setCalcCOG(boolean flag) Accessor to set the whether or not to calculate the center of gravity (mass).- Parameters:
flag-truethen calculate center of gravity (mass).
-
setCoarseBeginX
public void setCoarseBeginX(float x) Accessor to set the coarse sample beginX.- Parameters:
x- Coarse beginX
-
setCoarseBeginY
public void setCoarseBeginY(float y) Accessor to set the coarse sample beginY.- Parameters:
y- Coarse beginY
-
setCoarseBeginZ
public void setCoarseBeginZ(float z) Accessor to set the coarse sample beginZ.- Parameters:
z- Coarse beginZ
-
setCoarseEndX
public void setCoarseEndX(float x) Accessor to set the coarse sample endX.- Parameters:
x- Coarse endX
-
setCoarseEndY
public void setCoarseEndY(float y) Accessor to set the coarse sample endY.- Parameters:
y- Coarse endY
-
setCoarseEndZ
public void setCoarseEndZ(float z) Accessor to set the coarse sample endZ.- Parameters:
z- Coarse endZ
-
setCostChoice
public void setCostChoice(int x) Accessor to set the choice of cost function.- Parameters:
x- Cost function.
-
setDisplayTransform
public void setDisplayTransform(boolean flag) Accessor to set the display transform flag.- Parameters:
flag-truemeans display the transformed image.
-
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.
-
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
-
setMaxOfMinResol
public void setMaxOfMinResol(boolean flag) Accessor to set the maximum resolutions flag.- Parameters:
flag-truethen use the maximum of minimums of the resolutions of the images.
-
setMaxTx
public void setMaxTx(float maxX) Accessor to set the maximum X translation.- Parameters:
maxX- maximum x
-
setMaxTy
public void setMaxTy(float maxY) Accessor to set the maximum Y translation.- Parameters:
maxY- maximum y
-
setMaxTz
public void setMaxTz(float maxZ) Accessor to set the maximum Z translation.- Parameters:
maxZ- maximum z
-
setMinTx
public void setMinTx(float minX) Accessor to set the minimum X translation.- Parameters:
minX- minimum x
-
setMinTy
public void setMinTy(float minY) Accessor to set the minimum Y translation.- Parameters:
minY- minimum y
-
setMinTz
public void setMinTz(float minZ) Accessor to set the minimum Z translation.- Parameters:
minZ- minimum z
-
setNumCoarseX
public void setNumCoarseX(int x) Accessor to set the coarse sample rateX.- Parameters:
x- Coarse rateX
-
setNumCoarseY
public void setNumCoarseY(int y) Accessor to set the coarse sample rateY.- Parameters:
y- Coarse rateY
-
setNumCoarseZ
public void setNumCoarseZ(int z) Accessor to set the coarse sample rateZ.- Parameters:
z- Coarse rateZ
-
setReferenceImage
Accessor to set the reference image.- Parameters:
im- Reference image.
-
setReferenceWeightImage
Accessor to set the reference weight image.- Parameters:
im- Reference weight image.
-
setSubsample
public void setSubsample(boolean doSubsample) Accessor to set whether or not subsampling occurs.- Parameters:
doSubsample- DOCUMENT ME!
-
setUseELSUNC
public void setUseELSUNC(boolean useELSUNC) Accessor to set whether to use Powell's algorithm calling Brent's method or ELSUNC for search algorithm- Parameters:
useELSUNC-
-
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.
-
setOutOfBoundsIndex
public void setOutOfBoundsIndex(int outOfBoundsIndex) tells how to select fill value for out of bounds data 0 for image minimum 1 for NaN for float, zero otherwise. 2 for user defined 3 for image max- Parameters:
outOfBoundsIndex-
-
setFillValue
public void setFillValue(float fillValue) Accessor to set intensity value for out of bounds data- Parameters:
fillValue-
-
setMatrixDirectory
Accessor to set directory in which the matrix file is stored- Parameters:
matrixDirectory-
-
callAlgorithm
protected void callAlgorithm()Calls the algorithm with the set-up parameters.- Specified by:
callAlgorithmin classJDialogScriptableBase
-
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()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
private JDialog buildAdvancedDialog(int bracketBound, int maxIter, int numMinima, boolean limitTrans, boolean oneTrans) Build advanced settings dialog. Returns JDialog.- Parameters:
bracketBound- DOCUMENT ME!maxIter- DOCUMENT ME!numMinima- DOCUMENT ME!limitTrans- DOCUMENT ME!oneTrans- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
buildImgComboBox
Builds a list of images. Returns combobox.- Parameters:
image- DOCUMENT ME!- Returns:
- Newly created combo box.
-
enableTranslationsYZ
private void enableTranslationsYZ(boolean state) DOCUMENT ME!- Parameters:
state- DOCUMENT ME!
-
enableTranslationX
private void enableTranslationX(boolean state) DOCUMENT ME!- Parameters:
state- 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.
-
testType
private boolean testType(int type, float value) Determine if the value is in the image type range and within the float range since AlgorithmTransform does not use double buffers.- Parameters:
type- image typevalue- value tested- Returns:
- true if value is within acceptable range
-
showX
private void showX()DOCUMENT ME! -
showY
private void showY()DOCUMENT ME! -
showZ
private void showZ()DOCUMENT ME!
-