Class JDialogTalairachTransform

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

public class JDialogTalairachTransform extends JDialogBase implements AlgorithmInterface
Interface for the TalairachTransform plugin.
Version:
July 2002
Author:
Pierre-Louis Bazin
See Also:
  • Field Details

    • algo

    • acpcDialog

      private JDialogACPC acpcDialog
    • image

      private ModelImage image
    • otherImage

      private ModelImage otherImage
    • resultImage

      private ModelImage resultImage
    • acpcImage

      private ModelImage acpcImage
    • tlrcImage

      private ModelImage tlrcImage
    • userInterface

      private ViewUserInterface userInterface
    • title

      private String title
    • transformType

      private String transformType
    • transform

      private TalairachTransformInfo transform
    • interpolation

      private String interpolation
    • talairachPanel

      private JPanel talairachPanel
    • newImagePanel

      private JPanel newImagePanel
    • computeACPC

      private JButton computeACPC
    • computeTLRC

      private JButton computeTLRC
    • computeImage

      private JButton computeImage
    • labelImage

      private JLabel labelImage
    • comboBoxImage

      private JComboBox comboBoxImage
    • updateImage

      private JButton updateImage
    • labelTransform

      private JLabel labelTransform
    • comboBoxTransform

      private JComboBox comboBoxTransform
    • labelInterpolation

      private JLabel labelInterpolation
    • comboBoxInterpolation

      private JComboBox comboBoxInterpolation
    • loadsaveLabel

      private JLabel loadsaveLabel
    • loadButton

      private JButton loadButton
    • saveButton

      private JButton saveButton
    • botPanel

      private JPanel botPanel
    • imgPanel

      private JPanel imgPanel
    • transPanel

      private JPanel transPanel
    • interpPanel

      private JPanel interpPanel
    • loadsavePanel

      private JPanel loadsavePanel
    • loadDialog

      private JFileChooser loadDialog
    • saveDialog

      private JFileChooser saveDialog
    • acpcResLabel

      private JLabel acpcResLabel
    • acpcResText

      private JTextField acpcResText
    • acpcResPanel

      private JPanel acpcResPanel
    • acpcRes

      private float acpcRes
    • tlrcRes

      private float[] tlrcRes
    • acpcResOrg

      private float acpcResOrg
    • acpcPC

      private WildMagic.LibFoundation.Mathematics.Vector3f acpcPC
  • Constructor Details

    • JDialogTalairachTransform

      public JDialogTalairachTransform(Frame theParentFrame, ModelImage im)
      Creates dialog for plugin.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
    • JDialogTalairachTransform

      public JDialogTalairachTransform(ViewUserInterface UI, ModelImage im)
      Used primarily for the script to store variables and run the algorithm. No actual dialog will appear but the set up info and result image will be stored here.
      Parameters:
      UI - The user interface, needed to create the image frame.
      im - Source image.
  • Method Details

    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • buildComboBoxImage

      private void buildComboBoxImage()
    • updateComboBoxImage

      private void updateComboBoxImage()
    • buildLoadDialog

      private void buildLoadDialog()
    • buildSaveDialog

      private void buildSaveDialog()
    • dispose

      public void dispose()
      Overrides:
      dispose in class Window
    • transformToACPC

      private void transformToACPC()
    • transformToTLRC

      private void transformToTLRC()
    • transformImage

      private void transformImage()
    • getResultImage

      public ModelImage getResultImage()
      Accessor that returns the image.
      Returns:
      The result image.
    • setParameters

      public void setParameters()
      Accessor that sets the parameters
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers function.
    • loadFileActionPerformed

      public void loadFileActionPerformed(ActionEvent evt)
    • saveFileActionPerformed

      public void saveFileActionPerformed(ActionEvent evt)
    • setTalairachHeader

      public void setTalairachHeader(ModelImage img)
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithm when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.