Class JDialogRegistrationOAR35D

All Implemented Interfaces:
AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogRegistrationOAR35D extends JDialogScriptableBase implements AlgorithmInterface
Dialog to get user input, then call AlgorithmRegOAR35D. Internal registration is performed within one 4D image. In adjacent mode the first volume above the reference volume is registered to the reference volume, then the second volume above the reference volume is registered to the first volume above the reference volume, and so on until the last volume is registered the next to last volume. Then, the first volume below the reference volume is registered to the reference volume, the second volume below the reference volume is registered to first volume below the reference volume, and so on unitl the first volume is registered to the second volume. In reference mode every volume is simply registered to the reference volume. In average mode every volume is registered to the average of all volumes.
Author:
Neva Cherniavsky
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • POWELL

      private final int POWELL
      See Also:
    • ELSUNC

      private final int ELSUNC
      See Also:
    • LEVENBERG_MARQUARDT

      private final int LEVENBERG_MARQUARDT
      See Also:
    • NL2SOL

      private final int NL2SOL
      See Also:
    • searchAlgorithm

      private int searchAlgorithm
    • doGraph

      boolean doGraph
      DOCUMENT ME!
    • adjacentImageRButton

      private JRadioButton adjacentImageRButton
      DOCUMENT ME!
    • advancedDialog

      private JDialog advancedDialog
      Variables for Advanced Settings dialog.
    • averageImageRButton

      private JRadioButton averageImageRButton
      DOCUMENT ME!
    • maxIterationsText

      private JTextField maxIterationsText
      DOCUMENT ME!
    • numMinText

      private JTextField numMinText
      DOCUMENT ME!
    • doJTEM

      private boolean doJTEM
      When true, the full version of JTEM Powell search is used in the registration algorithm.
    • jtemCheckbox

      private JCheckBox jtemCheckbox
      Turns on the JTEM full version of Powell's algorithm on or off
    • buttonWeightInput

      private JButton buttonWeightInput
      DOCUMENT ME!
    • coarseRateText

      private JTextField coarseRateText
      DOCUMENT ME!
    • comboBoxCostFunct

      private JComboBox comboBoxCostFunct
      DOCUMENT ME!
    • comboBoxSearchAlgo

      private JComboBox comboBoxSearchAlgo
    • comboBoxDOF

      private JComboBox comboBoxDOF
      DOCUMENT ME!
    • comboBoxInterp

      private JComboBox comboBoxInterp
      DOCUMENT ME!
    • comboBoxInterp2

      private 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!
    • doColor

      private boolean doColor
      DOCUMENT ME!
    • doSubsample

      private boolean doSubsample
      DOCUMENT ME!
    • fastMode

      private boolean fastMode
      DOCUMENT ME!
    • fastModeCheckbox

      private JCheckBox fastModeCheckbox
      DOCUMENT ME!
    • fileNameWInput

      private String fileNameWInput
      DOCUMENT ME!
    • directoryWInput

      private String directoryWInput
      DOCUMENT ME!
    • fineRateText

      private JTextField fineRateText
      DOCUMENT ME!
    • graphCheckBox

      private JCheckBox graphCheckBox
      DOCUMENT ME!
    • inputWeightImage

      private ModelImage inputWeightImage
      DOCUMENT ME!
    • labelInterp2

      private JLabel labelInterp2
      DOCUMENT ME!
    • 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 JRadioButton noneRadio
      DOCUMENT ME!
    • numMinima

      private int numMinima
      DOCUMENT ME!
    • refImageNum

      private int refImageNum
      DOCUMENT ME!
    • refImageNumText

      private JTextField refImageNumText
      DOCUMENT ME!
    • refImageRButton

      private JRadioButton refImageRButton
      DOCUMENT ME!
    • refVolume

      private ModelImage refVolume
      DOCUMENT ME!
    • reg35

      private AlgorithmRegOAR35D reg35
      DOCUMENT ME!
    • reg35E

      private AlgorithmRegELSUNCOAR35D reg35E
    • registerTo

      private int registerTo
      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 JTextField rotateBeginText
      DOCUMENT ME!
    • rotateEndText

      private JTextField rotateEndText
      DOCUMENT ME!
    • sampleCheckBox

      private JCheckBox sampleCheckBox
      DOCUMENT ME!
    • textInput

      private JTextField textInput
      DOCUMENT ME!
    • UI

      private ViewUserInterface UI
      DOCUMENT ME!
    • useOutsideReferenceVolume

      private boolean useOutsideReferenceVolume
      DOCUMENT ME!
    • voiRadio

      private JRadioButton voiRadio
      DOCUMENT ME!
    • voisOnly

      private boolean voisOnly
      DOCUMENT ME!
    • weighted

      private boolean weighted
      DOCUMENT ME!
    • weightRadio

      private JRadioButton weightRadio
      DOCUMENT ME!
  • Constructor Details

    • JDialogRegistrationOAR35D

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

      public JDialogRegistrationOAR35D(Frame theParentFrame, ModelImage im)
      Creates new dialog for user to choose variables for internal registration.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed, sets the variables, and calls the algorithm.
      Specified by:
      actionPerformed in interface 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.
    • itemStateChanged

      public void itemStateChanged(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 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.
    • 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.
    • setFineRate

      public void setFineRate(float x)
      Accessor to set the fine sample rate.
      Parameters:
      x - Fine rate
    • setGraphCheckBox

      public void setGraphCheckBox(boolean doGraph)
      Accessor to set graphCheckBox.
      Parameters:
      doGraph - if true output graphs of rotations and translations
    • setInputWeightImage

      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
    • setMaxIterations

      public void setMaxIterations(int maxIterations)
      Accessor to set maxIterations.
      Parameters:
      maxIterations - DOCUMENT ME!
    • setNumMinima

      public void setNumMinima(int numMinima)
      Accessor to set numMinima.
      Parameters:
      numMinima - DOCUMENT ME!
    • setOutsideReferenceVolume

      public void setOutsideReferenceVolume(ModelImage refVolume)
      allows user to use an outside reference volume for registering.
      Parameters:
      refVolume - (3-Dim reference volume)
    • setRefImageNum

      public void setRefImageNum(int refImageNumber)
      Accessor to set refImageNum.
      Parameters:
      refImageNumber - number of reference slice
    • setRegisterTo

      public void setRegisterTo(int registerTo)
      Accessor to set registerTo.
      Parameters:
      registerTo - - 1 = adjacent, 2 = average, 3 = reference
    • setSearchAlgorithm

      public void setSearchAlgorithm(int searchAlgorithm)
      Parameters:
      searchAlgorithm -
    • setSubsample

      public void setSubsample(boolean doSubsample)
      Accessor to set whether or not subsampling occurs.
      Parameters:
      doSubsample - DOCUMENT ME!
    • setVoisOnly

      public void setVoisOnly(boolean flag)
      Accessor to set the VOIs only flag.
      Parameters:
      flag - 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.
    • callAlgorithm

      protected void callAlgorithm()
      Calls the algorithm with the set-up parameters.
      Specified by:
      callAlgorithm 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
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Record the parameters just used to run this algorithm in a script.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.
    • buildAdvancedDialog

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

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

      private boolean setVariables()
      Sets the variables needed to call the registration algorithm based on the values entered in the dialog.
      Returns:
      true if the variables are properly set, false otherwise.