Class JDialogRegistrationOAR2D

    • Nested Class Summary

      • 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
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Constructor Summary

      Constructors 
      Constructor Description
      JDialogRegistrationOAR2D()
      Empty constructor needed for dynamic instantiation (used during scripting).
      JDialogRegistrationOAR2D​(java.awt.Frame theParentFrame, ModelImage im)
      Creates new dialog for user to choose type of 2D image registration algorithm to run.
      JDialogRegistrationOAR2D​(java.awt.Frame theParentFrame, ModelImage ref, ModelImage match, int iCost, int iDOF, int iInterp, float fRotateBegin, float fRotateEnd, float fCoarseRate, float fFineRate, boolean bDoSubsample, int iMaxIterations, int iNumMin, int iInterp2, boolean bDisplayTransform, float fRotateBF, float fXScaleBF, float fYScaleBF, int iScaleStepsBF, int iTranslationBF)
      Creates new dialog for user to choose type of 2D 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 maxIter, int numMinima)
      Build advanced settings dialog.
      private javax.swing.JDialog buildBruteForceDialog()
      Builds the bruteForceDialog so the user can set the brute-force registration parameters:
      private javax.swing.JComboBox buildImgComboBox​(ModelImage image)
      Builds a list of images.
      protected void callAlgorithm()
      Calls the algorithm with the set-up parameters.
      ParameterTable createInputParameters()
      Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in setGUIFromParams()).
      ParameterTable createOutputParameters()
      Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).
      protected void doPostAlgorithmActions()
      Store the result image in the script runner's image table now that the action execution is finished.
      ActionMetadata getActionMetadata()
      Return meta-information about this discoverable action for categorization and labeling purposes.
      boolean getBruteForce()
      Accessor to get whether or not to do the brute-force registration.
      float getCoarseBegin()
      Accessor to get the coarse sample begin.
      float getCoarseEnd()
      Accessor to get the coarse sample end.
      float getCoarseRate()
      Accessor to get the coarse sample rate.
      int getCostChoice()
      Accessor to get the choice of cost function.
      boolean getDisplayTransform()
      Accessor to get the display transform flag.
      int getDOF()
      Accessor to get the degrees of freedom.
      float getFineRate()
      Accessor to get the fine sample rate.
      int getInterp()
      Accessor to get the initial interpolation.
      int getInterp2()
      Accessor to get the final interpolation.
      int getMaxIterations()
      Accessor to get maxIterations.
      int getNumMinima()
      Accessor to get numMinima.
      java.lang.String getOutputImageName​(java.lang.String imageParamName)
      Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).
      ModelImage getResultImage()
      Accessor to get the result image.
      float getRotationBruteForce()
      Accessor to get the rotation range for brute force registration:
      int getScaleStepsBruteForce()
      Accessor to get the y scale range for brute force registration:
      boolean getSubsample()
      Accessor to get whether or not subsampling occurs.
      int getTranslationBruteForce()
      Accessor to get the translation range for brute force registration:
      float getXScaleBruteForce()
      Accessor to get the x scale range for brute force registration:
      float getYScaleBruteForce()
      Accessor to get the y scale range for brute force registration:
      private void init()
      Initializes the GUI components and displays the dialog.
      private void initPresets()
      Initializes the GUI components, based on the preset values set by the class calling the constructor.
      boolean isActionComplete()
      Returns whether the action has successfully completed its execution.
      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 setCoarseBegin​(float x)
      Accessor to set the coarse sample begin.
      void setCoarseEnd​(float x)
      Accessor to set the coarse sample end.
      void setCoarseRate​(float x)
      Accessor to set the coarse sample rate.
      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 setFillValue​(float fillValue)
      Accessor to set intensity value for out of bounds data
      void setFineRate​(float x)
      Accessor to set the fine sample rate.
      protected 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 stored
      void setMultiThread​(boolean doMultiThread)
      Accessor to set whether or not powell's algorithm uses multithreading
      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
      void setReferenceImage​(ModelImage im)
      Accessor to set the reference image.
      void setReferenceWeightImage​(ModelImage im)
      Accessor to set the reference weight image.
      void setSearchAlgorithm​(int searchAlgorithm)  
      void setSubsample​(boolean doSubsample)
      Accessor to set whether or not subsampling occurs.
      private 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.
      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 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • searchAlgorithm

        private int searchAlgorithm
      • advancedDialog

        private javax.swing.JDialog advancedDialog
        Variables for Advanced Settings dialog.
      • maxIterationsText

        private javax.swing.JTextField maxIterationsText
        DOCUMENT ME!
      • numMinText

        private javax.swing.JTextField numMinText
        DOCUMENT ME!
      • bruteForceCheckBox

        private javax.swing.JCheckBox bruteForceCheckBox
        CheckBox to turn brute-force registration on or off:.
      • bruteForceDialog

        private javax.swing.JDialog bruteForceDialog
        Dialog to set the brute-force registration parameters:.
      • buttonWeightInput

        private javax.swing.JButton buttonWeightInput
        DOCUMENT ME!
      • buttonWeightRef

        private javax.swing.JButton buttonWeightRef
        DOCUMENT ME!
      • coarseRateText

        private javax.swing.JTextField coarseRateText
        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!
      • displayTransform

        private boolean displayTransform
        DOCUMENT ME!
      • doColor

        private boolean doColor
        DOCUMENT ME!
      • doColorCheckBox

        private javax.swing.JCheckBox doColorCheckBox
        CheckBox to turn color registration on or off:.
      • doSubsample

        private boolean doSubsample
        DOCUMENT ME!
      • doJTEM

        private boolean doJTEM
      • doMultiThread

        private boolean doMultiThread
      • 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!
      • fineRateText

        private javax.swing.JTextField fineRateText
        DOCUMENT ME!
      • inputWeightImage

        private ModelImage inputWeightImage
        DOCUMENT ME!
      • refWeightImage

        private ModelImage refWeightImage
        DOCUMENT ME!
      • labelCoarse

        private javax.swing.JLabel labelCoarse
        DOCUMENT ME!
      • labelCoarseDegrees

        private javax.swing.JLabel labelCoarseDegrees
        DOCUMENT ME!
      • labelFine

        private javax.swing.JLabel labelFine
        DOCUMENT ME!
      • labelFineDegrees

        private javax.swing.JLabel labelFineDegrees
        DOCUMENT ME!
      • labelInterp2

        private javax.swing.JLabel labelInterp2
        DOCUMENT ME!
      • labelRotateDegrees

        private javax.swing.JLabel labelRotateDegrees
        DOCUMENT ME!
      • labelRotateRange

        private javax.swing.JLabel labelRotateRange
        DOCUMENT ME!
      • labelRotateRangeTo

        private javax.swing.JLabel labelRotateRangeTo
        DOCUMENT ME!
      • m_bSubsetDialog

        private boolean m_bSubsetDialog
        If true the dialog for this instance of JDialogRegistrationOAR2D will not activate the AlgorithmRegOAR2D:.
      • matchImage

        private ModelImage matchImage
        DOCUMENT ME!
      • maxIterations_def

        private int maxIterations_def
        DOCUMENT ME!
      • numMinima_def

        private int numMinima_def
        DOCUMENT ME!
      • maxIterations

        private int maxIterations
        DOCUMENT ME!
      • noneRadio

        private javax.swing.JRadioButton noneRadio
        DOCUMENT ME!
      • numMinima

        private int numMinima
        DOCUMENT ME!
      • refImage

        private ModelImage refImage
        DOCUMENT ME!
      • resultImage

        private ModelImage resultImage
        DOCUMENT ME!
      • rotateBegin

        private float rotateBegin
        DOCUMENT ME!
      • rotateEnd

        private float rotateEnd
        DOCUMENT ME!
      • coarseRate

        private float coarseRate
        DOCUMENT ME!
      • fineRate

        private float fineRate
        DOCUMENT ME!
      • rotateBeginText

        private javax.swing.JTextField rotateBeginText
        DOCUMENT ME!
      • rotateEndText

        private javax.swing.JTextField rotateEndText
        DOCUMENT ME!
      • rotationBF

        private float rotationBF
        DOCUMENT ME!
      • xscaleBF

        private float xscaleBF
        DOCUMENT ME!
      • yscaleBF

        private float yscaleBF
        DOCUMENT ME!
      • rotationText

        private javax.swing.JTextField rotationText
        Brute-force registration parameters:.
      • translationText

        private javax.swing.JTextField translationText
        Brute-force registration parameters:.
      • xscaleText

        private javax.swing.JTextField xscaleText
        Brute-force registration parameters:.
      • yscaleText

        private javax.swing.JTextField yscaleText
        Brute-force registration parameters:.
      • scaleStepsText

        private javax.swing.JTextField scaleStepsText
        Brute-force registration parameters:.
      • sampleCheckBox

        private javax.swing.JCheckBox sampleCheckBox
        DOCUMENT ME!
      • jtemCheckBox

        private javax.swing.JCheckBox jtemCheckBox
        DOCUMENT ME!
      • multiThreadCheckBox

        private javax.swing.JCheckBox multiThreadCheckBox
      • scaleStepsBF

        private int scaleStepsBF
        DOCUMENT ME!
      • textInput

        private javax.swing.JTextField textInput
        DOCUMENT ME!
      • textRef

        private javax.swing.JTextField textRef
        DOCUMENT ME!
      • transformCheckbox

        private javax.swing.JCheckBox transformCheckbox
        DOCUMENT ME!
      • translationBF

        private int translationBF
        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!
      • 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
    • Constructor Detail

      • JDialogRegistrationOAR2D

        public JDialogRegistrationOAR2D()
        Empty constructor needed for dynamic instantiation (used during scripting).
      • JDialogRegistrationOAR2D

        public JDialogRegistrationOAR2D​(java.awt.Frame theParentFrame,
                                        ModelImage im)
        Creates new dialog for user to choose type of 2D image registration algorithm to run.
        Parameters:
        theParentFrame - Parent frame.
        im - Source image.
      • JDialogRegistrationOAR2D

        public JDialogRegistrationOAR2D​(java.awt.Frame theParentFrame,
                                        ModelImage ref,
                                        ModelImage match,
                                        int iCost,
                                        int iDOF,
                                        int iInterp,
                                        float fRotateBegin,
                                        float fRotateEnd,
                                        float fCoarseRate,
                                        float fFineRate,
                                        boolean bDoSubsample,
                                        int iMaxIterations,
                                        int iNumMin,
                                        int iInterp2,
                                        boolean bDisplayTransform,
                                        float fRotateBF,
                                        float fXScaleBF,
                                        float fYScaleBF,
                                        int iScaleStepsBF,
                                        int iTranslationBF)
        Creates new dialog for user to choose type of 2D image registration algorithm to run.
        Parameters:
        theParentFrame - Parent frame.
        ref - Reference image.
        match - Match image.
        iCost - default cost choice.
        iDOF - default degrees of freedom choice.
        iInterp - default image interpolation choice.
        fRotateBegin - default rotation range choice.
        fRotateEnd - default rotation range choice.
        fCoarseRate - default rotation coarse rate choice.
        fFineRate - default rotation fine rate choice.
        bDoSubsample - default subsampling choice.
        iMaxIterations - default max iterations choice.
        iNumMin - default number of minima choice.
        iInterp2 - default display interpolation choice.
        bDisplayTransform - default display transformed image choice.
        fRotateBF - default rotation angle range for brute-force registration.
        fXScaleBF - default scale in x range for brute-force registration.
        fYScaleBF - default scale in x range for brute-force registration.
        iScaleStepsBF - default number of steps to divide scale range brute-force registration.
        iTranslationBF - default translation range for brute-force registration.
    • 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 interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
        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 interface AlgorithmInterface
        Parameters:
        algorithm - Algorithm that caused the event.
      • getBruteForce

        public boolean getBruteForce()
        Accessor to get whether or not to do the brute-force registration.
        Returns:
        bruteForceCheckBox.isSelected()
      • getCoarseBegin

        public float getCoarseBegin()
        Accessor to get the coarse sample begin.
        Returns:
        rotateBegon Coarse begin
      • getCoarseEnd

        public float getCoarseEnd()
        Accessor to get the coarse sample end.
        Returns:
        rotateEnd Coarse end
      • getCoarseRate

        public float getCoarseRate()
        Accessor to get the coarse sample rate.
        Returns:
        coarseRate, Coarse rate
      • getCostChoice

        public int getCostChoice()
        Accessor to get the choice of cost function.
        Returns:
        cost, Cost function.
      • getDisplayTransform

        public boolean getDisplayTransform()
        Accessor to get the display transform flag.
        Returns:
        displayTransform flag true means display the transformed image.
      • getDOF

        public int getDOF()
        Accessor to get the degrees of freedom.
        Returns:
        DOF, Degrees of freedom
      • getFineRate

        public float getFineRate()
        Accessor to get the fine sample rate.
        Returns:
        fineRate, Fine rate
      • getInterp

        public int getInterp()
        Accessor to get the initial interpolation.
        Returns:
        interp, Interpolation
      • getInterp2

        public int getInterp2()
        Accessor to get the final interpolation.
        Returns:
        interp2, Interpolation
      • getMaxIterations

        public int getMaxIterations()
        Accessor to get maxIterations.
        Returns:
        maxIterations
      • getNumMinima

        public int getNumMinima()
        Accessor to get numMinima.
        Returns:
        numMinima
      • getResultImage

        public ModelImage getResultImage()
        Accessor to get the result image.
        Returns:
        Result image.
      • getRotationBruteForce

        public float getRotationBruteForce()
        Accessor to get the rotation range for brute force registration:
        Returns:
        rotationBF, range of rotations
      • getScaleStepsBruteForce

        public int getScaleStepsBruteForce()
        Accessor to get the y scale range for brute force registration:
        Returns:
        scaleStepsBF, number of divisions for scale
      • getSubsample

        public boolean getSubsample()
        Accessor to get whether or not subsampling occurs.
        Returns:
        doSubsample
      • getTranslationBruteForce

        public int getTranslationBruteForce()
        Accessor to get the translation range for brute force registration:
        Returns:
        translationBF, range of x,y translations
      • getXScaleBruteForce

        public float getXScaleBruteForce()
        Accessor to get the x scale range for brute force registration:
        Returns:
        xscaleBF, range of scales in x
      • getYScaleBruteForce

        public float getYScaleBruteForce()
        Accessor to get the y scale range for brute force registration:
        Returns:
        yscaleBF, range of scales in y
      • 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 interface java.awt.event.ItemListener
        Overrides:
        itemStateChanged in class JDialogBase
        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.
      • 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
      • setFineRate

        public void setFineRate​(float x)
        Accessor to set the fine sample rate.
        Parameters:
        x - Fine rate
      • 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
      • 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!
      • setSearchAlgorithm

        public void setSearchAlgorithm​(int searchAlgorithm)
        Parameters:
        searchAlgorithm -
      • setMultiThread

        public void setMultiThread​(boolean doMultiThread)
        Accessor to set whether or not powell's algorithm uses multithreading
        Parameters:
        doMultiThread -
      • 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 -
      • 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 class JDialogScriptableBase
      • 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 class JDialogScriptableBase
      • buildAdvancedDialog

        private javax.swing.JDialog buildAdvancedDialog​(int maxIter,
                                                        int numMinima)
        Build advanced settings dialog. Returns JDialog.
        Parameters:
        maxIter - DOCUMENT ME!
        numMinima - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • buildBruteForceDialog

        private javax.swing.JDialog buildBruteForceDialog()
        Builds the bruteForceDialog so the user can set the brute-force registration parameters:
        Returns:
        bruteForceDialog
      • buildImgComboBox

        private javax.swing.JComboBox buildImgComboBox​(ModelImage image)
        Builds a list of images. Returns combobox.
        Parameters:
        image - DOCUMENT ME!
        Returns:
        Newly created combo box.
      • init

        private void init()
        Initializes the GUI components and displays the dialog.
      • initPresets

        private void initPresets()
        Initializes the GUI components, based on the preset values set by the class calling the constructor. Then 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 type
        value - value tested
        Returns:
        true if value is within acceptable range
      • getActionMetadata

        public ActionMetadata getActionMetadata()
        Return meta-information about this discoverable action for categorization and labeling purposes.
        Specified by:
        getActionMetadata in interface ActionDiscovery
        Returns:
        Metadata for this action.
      • createInputParameters

        public ParameterTable createInputParameters()
        Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in setGUIFromParams()).
        Specified by:
        createInputParameters in interface ActionDiscovery
        Returns:
        A parameter table listing the inputs of this algorithm.
      • createOutputParameters

        public ParameterTable createOutputParameters()
        Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).
        Specified by:
        createOutputParameters in interface ActionDiscovery
        Returns:
        A parameter table listing the outputs of this algorithm.
      • getOutputImageName

        public java.lang.String getOutputImageName​(java.lang.String imageParamName)
        Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).
        Specified by:
        getOutputImageName in interface ActionDiscovery
        Parameters:
        imageParamName - The output image parameter label for which to get the image name.
        Returns:
        The image name of the requested output image parameter label.
      • isActionComplete

        public boolean isActionComplete()
        Returns whether the action has successfully completed its execution.
        Specified by:
        isActionComplete in interface ActionDiscovery
        Returns:
        True, if the action is complete. False, if the action failed or is still running.