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
,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 JDialogConstrainedOAR3D extends JDialogScriptableBase implements AlgorithmInterface
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:
AlgorithmCostFunctions
,AlgorithmConstrainedOAR3D
, Serialized Form
-
-
Nested Class Summary
-
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 javax.swing.JDialog
advancedDialog
Variables for Advanced Settings dialog.private int
bracketBound
DOCUMENT ME!private int
bracketBound_def
DOCUMENT ME!private javax.swing.JTextField
bracketBoundText
DOCUMENT ME!private javax.swing.JButton
buttonWeightInput
DOCUMENT ME!private javax.swing.JButton
buttonWeightRef
DOCUMENT ME!private boolean
calcCOG
DOCUMENT ME!private javax.swing.JCheckBox
calcCOGCheckbox
DOCUMENT ME!private javax.swing.JPanel
coarsePanelX
DOCUMENT ME!private javax.swing.JPanel
coarsePanelY
DOCUMENT ME!private javax.swing.JPanel
coarsePanelZ
DOCUMENT ME!private javax.swing.JComboBox
comboBoxCostFunct
DOCUMENT ME!private javax.swing.JComboBox
comboBoxDOF
DOCUMENT ME!private javax.swing.JComboBox
comboBoxImage
DOCUMENT ME!private javax.swing.JComboBox
comboBoxInterp
DOCUMENT ME!private javax.swing.JComboBox
comboBoxInterp2
DOCUMENT ME!private javax.swing.JComboBox
comboBoxSearchAlgo
private int
cost
DOCUMENT ME!private java.lang.String
costName
DOCUMENT ME!private int
dataType
private java.lang.String
directoryWInput
DOCUMENT ME!private java.lang.String
directoryWRef
DOCUMENT ME!private boolean
displayTransform
DOCUMENT ME!private boolean
doColor
DOCUMENT ME!private int
DOF
DOCUMENT ME!private boolean
doSubsample
DOCUMENT ME!private boolean
fastMode
DOCUMENT ME!private javax.swing.JCheckBox
fastModeCheckbox
DOCUMENT ME!private java.lang.String
fileNameWInput
DOCUMENT ME!private java.lang.String
fileNameWRef
DOCUMENT ME!private float
fillValue
private java.awt.GridBagConstraints
gbc
DOCUMENT ME!private double
imageMax
private double
imageMin
private ModelImage
inputWeightImage
DOCUMENT ME!private int
interp
DOCUMENT ME!private int
interp2
DOCUMENT ME!private javax.swing.JLabel
labelInterp2
DOCUMENT ME!private javax.swing.JLabel
labelTranslateRangeX
DOCUMENT ME!private javax.swing.JLabel
labelTranslateRangeY
DOCUMENT ME!private javax.swing.JLabel
labelTranslateRangeZ
DOCUMENT ME!private boolean
limitTranslation
DOCUMENT ME!private javax.swing.JCheckBox
limitTranslationCheckbox
DOCUMENT ME!private ModelImage
matchImage
DOCUMENT ME!private javax.swing.JComboBox
matrixComboBox
private java.lang.String
matrixDirectory
private javax.swing.JLabel
matrixLabel
private int
maxIterations
DOCUMENT ME!private int
maxIterations_def
DOCUMENT ME!private javax.swing.JTextField
maxIterationsText
DOCUMENT ME!private float[][]
maxLimits
when done debugging: private boolean limitTranslation = false, oneTransLimit = false;.private boolean
maxOfMinResol
DOCUMENT ME!private javax.swing.JTextField
maxTransTextX
DOCUMENT ME!private javax.swing.JTextField
maxTransTextY
DOCUMENT ME!private javax.swing.JTextField
maxTransTextZ
DOCUMENT ME!private javax.swing.JCheckBox
minMaxCheckbox
DOCUMENT ME!private javax.swing.JTextField
minTransTextX
DOCUMENT ME!private javax.swing.JTextField
minTransTextY
DOCUMENT ME!private javax.swing.JTextField
minTransTextZ
DOCUMENT ME!private javax.swing.JLabel
mmLabelX
DOCUMENT ME!private javax.swing.JLabel
mmLabelY
DOCUMENT ME!private javax.swing.JLabel
mmLabelZ
DOCUMENT ME!private javax.swing.JRadioButton
noneRadio
DOCUMENT ME!private javax.swing.JTextField
numberCoarseTextX
DOCUMENT ME!private javax.swing.JTextField
numberCoarseTextY
DOCUMENT ME!private javax.swing.JTextField
numberCoarseTextZ
DOCUMENT ME!private int
numCoarseX
DOCUMENT ME!private int
numCoarseY
DOCUMENT ME!private int
numCoarseZ
DOCUMENT ME!private int
numMinima
DOCUMENT ME!private int
numMinima_def
DOCUMENT ME!private javax.swing.JTextField
numMinText
DOCUMENT ME!private boolean
oneTransLimit
DOCUMENT ME!private javax.swing.JComboBox
outOfBoundsComboBox
private 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 maximumprivate javax.swing.JLabel
outOfBoundsLabel
private ModelImage
refImage
DOCUMENT ME!private ModelImage
refWeightImage
DOCUMENT ME!private AlgorithmConstrainedOAR3D
reg3
private AlgorithmConstrainedELSUNCOAR3D
reg3E
DOCUMENT ME!private ModelImage
resultImage
DOCUMENT ME!private javax.swing.JTextField
rotateBeginTextX
DOCUMENT ME!private javax.swing.JTextField
rotateBeginTextY
DOCUMENT ME!private javax.swing.JTextField
rotateBeginTextZ
DOCUMENT ME!private float
rotateBeginX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private float
rotateBeginY
DOCUMENT ME!private float
rotateBeginZ
DOCUMENT ME!private javax.swing.JTextField
rotateEndTextX
DOCUMENT ME!private javax.swing.JTextField
rotateEndTextY
DOCUMENT ME!private javax.swing.JTextField
rotateEndTextZ
DOCUMENT ME!private float
rotateEndX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private float
rotateEndY
DOCUMENT ME!private float
rotateEndZ
DOCUMENT ME!private javax.swing.JPanel
rotatePanel
Variables for Rotation and Translation bounds.private javax.swing.JPanel
rotateRangePanelX
DOCUMENT ME!private javax.swing.JPanel
rotateRangePanelY
DOCUMENT ME!private javax.swing.JPanel
rotateRangePanelZ
DOCUMENT ME!private float
rotateRangeX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.private float
rotateRangeY
DOCUMENT ME!private float
rotateRangeZ
DOCUMENT ME!private javax.swing.JCheckBox
sampleCheckbox
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.private javax.swing.JTextField
textInput
DOCUMENT ME!private javax.swing.JTextField
textRef
DOCUMENT ME!private javax.swing.JLabel
toLabelX
DOCUMENT ME!private javax.swing.JLabel
toLabelY
DOCUMENT ME!private javax.swing.JLabel
toLabelZ
DOCUMENT ME!private javax.swing.JCheckBox
transformCheckbox
DOCUMENT ME!private javax.swing.JPanel
translatePanel
DOCUMENT ME!private javax.swing.JPanel
translateRangePanelX
private JPanel finePanelX, finePanelY, finePanelZ;.private javax.swing.JPanel
translateRangePanelY
private JPanel finePanelX, finePanelY, finePanelZ;.private javax.swing.JPanel
translateRangePanelZ
private JPanel finePanelX, finePanelY, finePanelZ;.private float[][]
transLimits
DOCUMENT ME!private ViewUserInterface
UI
DOCUMENT ME!private javax.swing.JCheckBox
universalRotationCheckbox
DOCUMENT ME!private javax.swing.JCheckBox
universalTranslationCheckbox
DOCUMENT ME!private boolean
useELSUNC
private javax.swing.JLabel
userDirectoryLabel
private javax.swing.JTextField
userDirectoryText
private javax.swing.JLabel
valueLabel
private javax.swing.JTextField
valueText
private javax.swing.JRadioButton
voiRadio
DOCUMENT ME!private boolean
voisOnly
DOCUMENT ME!private boolean
weighted
DOCUMENT ME!private javax.swing.JRadioButton
weightRadio
DOCUMENT ME!private javax.swing.JRadioButton
xRRadio
DOCUMENT ME!private boolean
xRSelected
DOCUMENT ME!private javax.swing.JRadioButton
yRRadio
DOCUMENT ME!private boolean
yRSelected
DOCUMENT ME!private javax.swing.JRadioButton
zRRadio
DOCUMENT ME!-
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 JDialogConstrainedOAR3D()
Empty constructor needed for dynamic instantiation (used during scripting).JDialogConstrainedOAR3D(java.awt.Frame theParentFrame, ModelImage im)
Creates new dialog for user to choose type of linear image registration algorithm to run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.void
algorithmPerformed(AlgorithmBase algorithm)
This method is required if the AlgorithmPerformed interface is implemented.private javax.swing.JDialog
buildAdvancedDialog(int bracketBound, int maxIter, int numMinima, boolean limitTrans, boolean oneTrans)
Build advanced settings dialog.private javax.swing.JComboBox
buildImgComboBox(ModelImage image)
Builds a list of images.protected void
callAlgorithm()
Calls the algorithm with the set-up parameters.protected void
doPostAlgorithmActions()
Store the result image in the script runner's image table now that the action execution is finished.private void
enableTranslationsYZ(boolean state)
DOCUMENT ME!private void
enableTranslationX(boolean state)
DOCUMENT ME!ModelImage
getResultImage()
Accessor to get the result image.private void
init()
Initializes the GUI components and displays the dialog.void
itemStateChanged(java.awt.event.ItemEvent event)
Changes the interpolation box to enabled or disabled depending on if the transform box is checked or not.void
setAdvancedSettings(int bracketBound, int maxIterations, int numMinima)
Accessor to set the advanced settings.void
setCalcCOG(boolean flag)
Accessor to set the whether or not to calculate the center of gravity (mass).void
setCoarseBeginX(float x)
Accessor to set the coarse sample beginX.void
setCoarseBeginY(float y)
Accessor to set the coarse sample beginY.void
setCoarseBeginZ(float z)
Accessor to set the coarse sample beginZ.void
setCoarseEndX(float x)
Accessor to set the coarse sample endX.void
setCoarseEndY(float y)
Accessor to set the coarse sample endY.void
setCoarseEndZ(float z)
Accessor to set the coarse sample endZ.void
setCostChoice(int x)
Accessor to set the choice of cost function.void
setDisplayTransform(boolean flag)
Accessor to set the display transform flag.void
setDOF(int x)
Accessor to set the degrees of freedom.void
setFastMode(boolean flag)
Accessor to set whether or not to execute the fast mode (skip sub sample and goto last final optimization).void
setFillValue(float fillValue)
Accessor to set intensity value for out of bounds dataprotected void
setGUIFromParams()
Set the dialog GUI using the script parameters while running this algorithm as part of a script.void
setInputWeightImage(ModelImage im)
Accessor to set the input weight image.void
setInterp(int x)
Accessor to set the initial interpolation.void
setInterp2(int x)
Accessor to set the final interpolation.void
setMatrixDirectory(java.lang.String matrixDirectory)
Accessor to set directory in which the matrix file is storedvoid
setMaxOfMinResol(boolean flag)
Accessor to set the maximum resolutions flag.void
setMaxTx(float maxX)
Accessor to set the maximum X translation.void
setMaxTy(float maxY)
Accessor to set the maximum Y translation.void
setMaxTz(float maxZ)
Accessor to set the maximum Z translation.void
setMinTx(float minX)
Accessor to set the minimum X translation.void
setMinTy(float minY)
Accessor to set the minimum Y translation.void
setMinTz(float minZ)
Accessor to set the minimum Z translation.void
setNumCoarseX(int x)
Accessor to set the coarse sample rateX.void
setNumCoarseY(int y)
Accessor to set the coarse sample rateY.void
setNumCoarseZ(int z)
Accessor to set the coarse sample rateZ.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 maxvoid
setReferenceImage(ModelImage im)
Accessor to set the reference image.void
setReferenceWeightImage(ModelImage im)
Accessor to set the reference weight image.void
setSubsample(boolean doSubsample)
Accessor to set whether or not subsampling occurs.void
setUseELSUNC(boolean useELSUNC)
Accessor to set whether to use Powell's algorithm calling Brent's method or ELSUNC for search algorithmprivate boolean
setVariables()
Sets the variables needed to call the registration algorithm based on the values entered in the dialog.void
setVoisOnly(boolean flag)
Accessor to set the VOIs only flag.void
setWeighted(boolean flag)
Accessor to set the weighted images flag.private void
showX()
DOCUMENT ME!private void
showY()
DOCUMENT ME!private void
showZ()
DOCUMENT ME!protected void
storeParamsFromGUI()
Record the parameters just used to run this algorithm in a script.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.-
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, 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
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
advancedDialog
private javax.swing.JDialog advancedDialog
Variables for Advanced Settings dialog.
-
bracketBoundText
private javax.swing.JTextField bracketBoundText
DOCUMENT ME!
-
maxIterationsText
private javax.swing.JTextField maxIterationsText
DOCUMENT ME!
-
numMinText
private javax.swing.JTextField numMinText
DOCUMENT ME!
-
buttonWeightInput
private javax.swing.JButton buttonWeightInput
DOCUMENT ME!
-
buttonWeightRef
private javax.swing.JButton buttonWeightRef
DOCUMENT ME!
-
calcCOG
private boolean calcCOG
DOCUMENT ME!
-
calcCOGCheckbox
private javax.swing.JCheckBox calcCOGCheckbox
DOCUMENT ME!
-
coarsePanelX
private javax.swing.JPanel coarsePanelX
DOCUMENT ME!
-
coarsePanelY
private javax.swing.JPanel coarsePanelY
DOCUMENT ME!
-
coarsePanelZ
private javax.swing.JPanel coarsePanelZ
DOCUMENT ME!
-
comboBoxCostFunct
private javax.swing.JComboBox comboBoxCostFunct
DOCUMENT ME!
-
comboBoxSearchAlgo
private javax.swing.JComboBox comboBoxSearchAlgo
-
comboBoxDOF
private javax.swing.JComboBox comboBoxDOF
DOCUMENT ME!
-
comboBoxImage
private javax.swing.JComboBox comboBoxImage
DOCUMENT ME!
-
comboBoxInterp
private javax.swing.JComboBox comboBoxInterp
DOCUMENT ME!
-
comboBoxInterp2
private javax.swing.JComboBox comboBoxInterp2
DOCUMENT ME!
-
cost
private int cost
DOCUMENT ME!
-
interp
private int interp
DOCUMENT ME!
-
interp2
private int interp2
DOCUMENT ME!
-
DOF
private int DOF
DOCUMENT ME!
-
costName
private java.lang.String costName
DOCUMENT ME!
-
displayTransform
private boolean displayTransform
DOCUMENT ME!
-
doColor
private boolean doColor
DOCUMENT ME!
-
doSubsample
private boolean doSubsample
DOCUMENT ME!
-
fastMode
private boolean fastMode
DOCUMENT ME!
-
fastModeCheckbox
private javax.swing.JCheckBox fastModeCheckbox
DOCUMENT ME!
-
fileNameWRef
private java.lang.String fileNameWRef
DOCUMENT ME!
-
directoryWRef
private java.lang.String directoryWRef
DOCUMENT ME!
-
fileNameWInput
private java.lang.String fileNameWInput
DOCUMENT ME!
-
directoryWInput
private java.lang.String directoryWInput
DOCUMENT ME!
-
gbc
private java.awt.GridBagConstraints gbc
DOCUMENT ME!
-
inputWeightImage
private ModelImage inputWeightImage
DOCUMENT ME!
-
refWeightImage
private ModelImage refWeightImage
DOCUMENT ME!
-
labelInterp2
private javax.swing.JLabel labelInterp2
DOCUMENT ME!
-
labelTranslateRangeX
private javax.swing.JLabel labelTranslateRangeX
DOCUMENT ME!
-
labelTranslateRangeY
private javax.swing.JLabel labelTranslateRangeY
DOCUMENT ME!
-
labelTranslateRangeZ
private javax.swing.JLabel labelTranslateRangeZ
DOCUMENT ME!
-
limitTranslation
private boolean limitTranslation
DOCUMENT ME!
-
oneTransLimit
private boolean oneTransLimit
DOCUMENT ME!
-
limitTranslationCheckbox
private javax.swing.JCheckBox limitTranslationCheckbox
DOCUMENT ME!
-
matchImage
private ModelImage matchImage
DOCUMENT ME!
-
maxIterations_def
private int maxIterations_def
DOCUMENT ME!
-
bracketBound_def
private int bracketBound_def
DOCUMENT ME!
-
numMinima_def
private int numMinima_def
DOCUMENT ME!
-
maxIterations
private int maxIterations
DOCUMENT ME!
-
bracketBound
private int bracketBound
DOCUMENT ME!
-
maxLimits
private float[][] maxLimits
when done debugging: private boolean limitTranslation = false, oneTransLimit = false;.
-
maxOfMinResol
private boolean maxOfMinResol
DOCUMENT ME!
-
maxTransTextX
private javax.swing.JTextField maxTransTextX
DOCUMENT ME!
-
maxTransTextY
private javax.swing.JTextField maxTransTextY
DOCUMENT ME!
-
maxTransTextZ
private javax.swing.JTextField maxTransTextZ
DOCUMENT ME!
-
minMaxCheckbox
private javax.swing.JCheckBox minMaxCheckbox
DOCUMENT ME!
-
minTransTextX
private javax.swing.JTextField minTransTextX
DOCUMENT ME!
-
minTransTextY
private javax.swing.JTextField minTransTextY
DOCUMENT ME!
-
minTransTextZ
private javax.swing.JTextField minTransTextZ
DOCUMENT ME!
-
mmLabelX
private javax.swing.JLabel mmLabelX
DOCUMENT ME!
-
mmLabelY
private javax.swing.JLabel mmLabelY
DOCUMENT ME!
-
mmLabelZ
private javax.swing.JLabel mmLabelZ
DOCUMENT ME!
-
noneRadio
private javax.swing.JRadioButton noneRadio
DOCUMENT ME!
-
numberCoarseTextX
private javax.swing.JTextField numberCoarseTextX
DOCUMENT ME!
-
numberCoarseTextY
private javax.swing.JTextField numberCoarseTextY
DOCUMENT ME!
-
numberCoarseTextZ
private javax.swing.JTextField numberCoarseTextZ
DOCUMENT ME!
-
numCoarseX
private int numCoarseX
DOCUMENT ME!
-
numCoarseY
private int numCoarseY
DOCUMENT ME!
-
numCoarseZ
private int numCoarseZ
DOCUMENT ME!
-
numMinima
private int numMinima
DOCUMENT ME!
-
refImage
private ModelImage refImage
DOCUMENT ME!
-
reg3E
private AlgorithmConstrainedELSUNCOAR3D reg3E
DOCUMENT ME!
-
reg3
private AlgorithmConstrainedOAR3D reg3
-
resultImage
private ModelImage resultImage
DOCUMENT ME!
-
rotateBeginTextX
private javax.swing.JTextField rotateBeginTextX
DOCUMENT ME!
-
rotateBeginTextY
private javax.swing.JTextField rotateBeginTextY
DOCUMENT ME!
-
rotateBeginTextZ
private javax.swing.JTextField rotateBeginTextZ
DOCUMENT ME!
-
rotateBeginX
private float rotateBeginX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.
-
rotateEndX
private float rotateEndX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.
-
rotateRangeX
private float rotateRangeX
private JTextField fineRateTextX, fineRateTextY, fineRateTextZ;.
-
rotateBeginY
private float rotateBeginY
DOCUMENT ME!
-
rotateEndY
private float rotateEndY
DOCUMENT ME!
-
rotateRangeY
private float rotateRangeY
DOCUMENT ME!
-
rotateBeginZ
private float rotateBeginZ
DOCUMENT ME!
-
rotateEndZ
private float rotateEndZ
DOCUMENT ME!
-
rotateRangeZ
private float rotateRangeZ
DOCUMENT ME!
-
rotateEndTextX
private javax.swing.JTextField rotateEndTextX
DOCUMENT ME!
-
rotateEndTextY
private javax.swing.JTextField rotateEndTextY
DOCUMENT ME!
-
rotateEndTextZ
private javax.swing.JTextField rotateEndTextZ
DOCUMENT ME!
-
rotatePanel
private javax.swing.JPanel rotatePanel
Variables for Rotation and Translation bounds.
-
rotateRangePanelX
private javax.swing.JPanel rotateRangePanelX
DOCUMENT ME!
-
rotateRangePanelY
private javax.swing.JPanel rotateRangePanelY
DOCUMENT ME!
-
rotateRangePanelZ
private javax.swing.JPanel rotateRangePanelZ
DOCUMENT ME!
-
sampleCheckbox
private javax.swing.JCheckBox sampleCheckbox
DOCUMENT ME!
-
textInput
private javax.swing.JTextField textInput
DOCUMENT ME!
-
textRef
private javax.swing.JTextField textRef
DOCUMENT ME!
-
toLabelX
private javax.swing.JLabel toLabelX
DOCUMENT ME!
-
toLabelY
private javax.swing.JLabel toLabelY
DOCUMENT ME!
-
toLabelZ
private javax.swing.JLabel toLabelZ
DOCUMENT ME!
-
transformCheckbox
private javax.swing.JCheckBox transformCheckbox
DOCUMENT ME!
-
translatePanel
private javax.swing.JPanel translatePanel
DOCUMENT ME!
-
translateRangePanelX
private javax.swing.JPanel translateRangePanelX
private JPanel finePanelX, finePanelY, finePanelZ;.
-
translateRangePanelY
private javax.swing.JPanel translateRangePanelY
private JPanel finePanelX, finePanelY, finePanelZ;.
-
translateRangePanelZ
private javax.swing.JPanel translateRangePanelZ
private JPanel finePanelX, finePanelY, finePanelZ;.
-
transLimits
private float[][] transLimits
DOCUMENT ME!
-
UI
private ViewUserInterface UI
DOCUMENT ME!
-
universalRotationCheckbox
private javax.swing.JCheckBox universalRotationCheckbox
DOCUMENT ME!
-
universalTranslationCheckbox
private javax.swing.JCheckBox universalTranslationCheckbox
DOCUMENT ME!
-
voiRadio
private javax.swing.JRadioButton voiRadio
DOCUMENT ME!
-
voisOnly
private boolean voisOnly
DOCUMENT ME!
-
weighted
private boolean weighted
DOCUMENT ME!
-
weightRadio
private javax.swing.JRadioButton weightRadio
DOCUMENT ME!
-
xRRadio
private javax.swing.JRadioButton xRRadio
DOCUMENT ME!
-
yRRadio
private javax.swing.JRadioButton yRRadio
DOCUMENT ME!
-
zRRadio
private javax.swing.JRadioButton zRRadio
DOCUMENT ME!
-
xRSelected
private boolean xRSelected
DOCUMENT ME!
-
yRSelected
private boolean yRSelected
DOCUMENT ME!
-
outOfBoundsLabel
private javax.swing.JLabel outOfBoundsLabel
-
outOfBoundsComboBox
private javax.swing.JComboBox outOfBoundsComboBox
-
valueLabel
private javax.swing.JLabel valueLabel
-
valueText
private javax.swing.JTextField valueText
-
imageMin
private double imageMin
-
imageMax
private double imageMax
-
dataType
private int dataType
-
outOfBoundsIndex
private 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 maximum
-
fillValue
private float fillValue
-
matrixLabel
private javax.swing.JLabel matrixLabel
-
matrixComboBox
private javax.swing.JComboBox matrixComboBox
-
matrixDirectory
private java.lang.String matrixDirectory
-
userDirectoryLabel
private javax.swing.JLabel userDirectoryLabel
-
userDirectoryText
private javax.swing.JTextField userDirectoryText
-
useELSUNC
private boolean useELSUNC
-
-
Constructor Detail
-
JDialogConstrainedOAR3D
public JDialogConstrainedOAR3D()
Empty constructor needed for dynamic instantiation (used during scripting).
-
JDialogConstrainedOAR3D
public JDialogConstrainedOAR3D(java.awt.Frame theParentFrame, ModelImage im)
Creates new dialog for user to choose type of linear image registration algorithm to run.- Parameters:
theParentFrame
- Parent frame.im
- Source image.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogBase
- Parameters:
event
- Event that triggers function.
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
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:
algorithmPerformed
in interfaceAlgorithmInterface
- Parameters:
algorithm
- Algorithm that caused the event.
-
getResultImage
public ModelImage getResultImage()
Accessor to get the result image.- Returns:
- Result image.
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
Changes the interpolation box to enabled or disabled depending on if the transform box is checked or not.- Specified by:
itemStateChanged
in interfacejava.awt.event.ItemListener
- Overrides:
itemStateChanged
in 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
-true
then 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
-true
means 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
-true
then skip to level one (last ) optimization.
-
setInputWeightImage
public void setInputWeightImage(ModelImage im)
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
-true
then 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
public void setReferenceImage(ModelImage im)
Accessor to set the reference image.- Parameters:
im
- Reference image.
-
setReferenceWeightImage
public void setReferenceWeightImage(ModelImage im)
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
-true
then 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
-true
means 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
public void setMatrixDirectory(java.lang.String matrixDirectory)
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:
callAlgorithm
in classJDialogScriptableBase
-
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()
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
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.
-
buildAdvancedDialog
private javax.swing.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
private javax.swing.JComboBox buildImgComboBox(ModelImage image)
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:
true
if the variables are properly set,false
otherwise.
-
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!
-
-