Class JDialogRegistrationOAR25D

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

public class JDialogRegistrationOAR25D extends JDialogScriptableBase implements AlgorithmInterface
Dialog to get user input, then call AlgorithmRegOAR25D. Internal registration is performed within one 3D image. In adjacent mode the first slice above the reference slice is registered to the reference slice, then the second slice above the reference slice is registered to the first slice above the reference slice, and so on until the last slice is registered the next to last slice. Then, the first slice below the reference slice is registered to the reference slice, the second slice below the reference slice is registered to first slice below the reference slice, and so on unitl the first slice is registered to the second slice. In reference mode every slice is simply registered to the reference slice.
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.
    • maxIterationsText

      private JTextField maxIterationsText
      DOCUMENT ME!
    • numMinText

      private JTextField numMinText
      DOCUMENT ME!
    • 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!
    • doAdjacent

      private boolean doAdjacent
      DOCUMENT ME!
    • doColor

      private boolean doColor
      DOCUMENT ME!
    • doSubsample

      private boolean doSubsample
      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!
    • labelCoarse

      private JLabel labelCoarse
      DOCUMENT ME!
    • labelCoarseDegrees

      private JLabel labelCoarseDegrees
      DOCUMENT ME!
    • labelFine

      private JLabel labelFine
      DOCUMENT ME!
    • labelFineDegrees

      private JLabel labelFineDegrees
      DOCUMENT ME!
    • labelInterp2

      private JLabel labelInterp2
      DOCUMENT ME!
    • labelRotateDegrees

      private JLabel labelRotateDegrees
      DOCUMENT ME!
    • labelRotateRange

      private JLabel labelRotateRange
      DOCUMENT ME!
    • labelRotateRangeTo

      private JLabel labelRotateRangeTo
      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!
    • refSlice

      private ModelImage refSlice
      DOCUMENT ME!
    • reg25

      private AlgorithmRegOAR25D2 reg25
      DOCUMENT ME!
    • reg25E

      private AlgorithmRegELSUNCOAR25D reg25E
    • 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!
    • transformVOIs

      private boolean transformVOIs
      DOCUMENT ME!
    • transformVOIsBox

      private JCheckBox transformVOIsBox
      DOCUMENT ME!
    • UI

      private ViewUserInterface UI
      DOCUMENT ME!
    • useOutsideReferenceSlice

      private boolean useOutsideReferenceSlice
      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

    • JDialogRegistrationOAR25D

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

      public JDialogRegistrationOAR25D(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.
    • setDoAdjacent

      public void setDoAdjacent(boolean doAdj)
      Accessor to set doAdjacent.
      Parameters:
      doAdj - true means adjacent mode, false means reference mode
    • setDOF

      public void setDOF(int x)
      Accessor to set the degrees of freedom.
      Parameters:
      x - Degrees of freedom
    • setDoGraph

      public void setDoGraph(boolean doGr)
      Accessor to set if a graph should be brought up of rotations invalid input: '&' translations.
      Parameters:
      doGr - boolean true = bring up graph
    • 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!
    • setOutsideReferenceSlice

      public void setOutsideReferenceSlice(ModelImage refSlice)
      allows user to use an outside reference slice for registering.
      Parameters:
      refSlice - (2-Dim reference slice)
    • setRefImageNum

      public void setRefImageNum(int refImageNumber)
      Accessor to set refImageNum.
      Parameters:
      refImageNumber - number of reference slice
    • 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!
    • setTransformVOIs

      public void setTransformVOIs(boolean transformVOIs)
      Accessor to set whether or not VOIs should be transformed.
      Parameters:
      transformVOIs - 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.