Class JPanelDTIPreprocessing

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gov.nih.mipav.view.renderer.WildMagic.DTI_FrameWork.JPanelDTIPreprocessing
All Implemented Interfaces:
AlgorithmInterface, ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelDTIPreprocessing extends JPanel implements AlgorithmInterface, ActionListener, ItemListener
See Also:
  • Field Details

    • serialVersionUID

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

      private DTIPipeline pipeline
    • imageB0

      private ModelImage imageB0
      The B0 image from the original 4D DWI image series, extracted from the DWI volume:
    • imageT2

      private ModelImage imageT2
      The T2 image that the B0 image is registered to. This may be the original T2 if it matched the extents/resultions of the other image Or it is the resampled T2 image
    • imageUpdatedDWI

      private ModelImage imageUpdatedDWI
      After the B0 image is registered to the T2 image the B0 sub-volume is replaced in the original DWI image, creating a new 4D DWI image:
    • b0toStructMatrix

      private TransMatrix b0toStructMatrix
      The transformation matrix describing the transformation from registering B0 to T2 image. If that step in the process is skipped, this defaults to the identity matrix:
    • b0MatrixFileName

      private String b0MatrixFileName
      File name for the B0 to T2 transformation matrix (needed to populate the next panel in the DTIPipeline)
    • serif12

      private Font serif12
    • serif12B

      private Font serif12B
    • refImageNumText

      public JTextField refImageNumText
      user-input for the B0 sub-volume number in the 4D DWI image
    • comboBoxDOF

      private JComboBox comboBoxDOF
      DOCUMENT ME!
    • progressBar

      protected ViewJProgressBar progressBar
      Progress bar that will listen to a dialog's algorithm (and reflect current progress)
    • comboBoxInterp

      private JComboBox comboBoxInterp
      DOCUMENT ME!
    • comboBoxCostFunct

      private JComboBox comboBoxCostFunct
      DOCUMENT ME!
    • transformDWICheckbox

      private JCheckBox transformDWICheckbox
      DOCUMENT ME!
    • matrixComboBox

      public JComboBox matrixComboBox
      DOCUMENT ME!
    • matrixDirText

      public JTextField matrixDirText
      DOCUMENT ME!
    • OKButton

      private JButton OKButton
    • mainPanel

      private JPanel mainPanel
    • reg3

      private AlgorithmRegOAR3D reg3
      DOCUMENT ME!
    • reg35

      private AlgorithmRegOAR35D reg35
      DOCUMENT ME!
    • cost

      private int cost
      DOCUMENT ME!
    • interp

      private int interp
      DOCUMENT ME!
    • DOF

      private int DOF
      DOCUMENT ME!
    • costT2

      private int costT2
      DOCUMENT ME!
    • interpT2

      private int interpT2
      DOCUMENT ME!
    • DOFT2

      private int DOFT2
      DOCUMENT ME!
    • rotateBeginX

      private float rotateBeginX
    • rotateEndX

      private float rotateEndX
    • coarseRateX

      private float coarseRateX
    • fineRateX

      private float fineRateX
    • rotateBeginY

      private float rotateBeginY
    • rotateEndY

      private float rotateEndY
    • coarseRateY

      private float coarseRateY
    • fineRateY

      private float fineRateY
    • rotateBeginZ

      private float rotateBeginZ
    • rotateEndZ

      private float rotateEndZ
    • coarseRateZ

      private float coarseRateZ
    • fineRateZ

      private float fineRateZ
    • maxOfMinResol

      private boolean maxOfMinResol
    • doSubsample

      private boolean doSubsample
    • doMultiThread

      private boolean doMultiThread
    • fastMode

      private boolean fastMode
    • doGraph

      private boolean doGraph
    • maxIterations

      private int maxIterations
    • numMinima

      private int numMinima
    • registerTo

      int registerTo
    • transformMatDWICheckbox

      public JCheckBox transformMatDWICheckbox
    • transformB0label

      public JLabel transformB0label
    • transformB0MatCheckbox

      public JCheckBox transformB0MatCheckbox
    • transformB0Checkbox

      public JCheckBox transformB0Checkbox
    • blanklabel

      public JLabel blanklabel
    • skipPreCheckbox

      private JCheckBox skipPreCheckbox
    • correctGradTransCheckbox

      public JCheckBox correctGradTransCheckbox
    • labelDOF

      private JLabel labelDOF
    • labelCost

      private JLabel labelCost
    • labelInternal

      private JLabel labelInternal
    • labelInterp

      private JLabel labelInterp
    • structOptPanel

      public JPanel structOptPanel
    • outputDir

      private JTextField outputDir
      output directory enables user to choose where to save files to.
    • outputCommand

      private String outputCommand
      action command when the user presses the browse button to select the output directory:
    • buttonPanel

      JPanel buttonPanel
    • result35RegImage

      ModelImage result35RegImage
    • performEPICheckbox

      JCheckBox performEPICheckbox
    • preProsText

      private JTextField preProsText
    • preProsLabel

      private JLabel preProsLabel
    • openDirButton

      private JButton openDirButton
  • Constructor Details

    • JPanelDTIPreprocessing

      public JPanelDTIPreprocessing(DTIPipeline pipeline)
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • 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 arg0)
      Specified by:
      itemStateChanged in interface ItemListener
    • saveTransformMatrix

      public void saveTransformMatrix(String fileName, TransMatrix[] matrix)
      This method creates the Trans Matrices Array file for DTI Preprocessing
    • setOutputDirectory

      public void setOutputDirectory(String directory)
      Sets the default output directory for the images generated by this panel.
      Parameters:
      directory -
    • callReg35Algorithm

      protected void callReg35Algorithm(ModelImage dwiImage)
      Calls the algorithm with the set-up parameters.
    • callT2Algorithm

      protected void callT2Algorithm(ModelImage refT2Image, ModelImage matchB0Image)
      Calls the algorithm with the set-up parameters.
    • createProgressBar

      protected void createProgressBar(String title, AlgorithmBase pListener)
      Creates the progress bar that will listen to an algorithm's progress changes
      Parameters:
      title - progress bar's title
      pListener - algorithmbase that will notify progress updates to the pBar
    • createProgressBar

      protected void createProgressBar(String title, String msg, AlgorithmBase pListener)
      Creates the progress bar (should be created within JDialog's callAlgorithm method
      Parameters:
      title - progress bar's title
      msg - the message to display on the progress bar (initial setting)
      pListener - the algorithm that will register the progress bar as a listener
    • B0extraction

      private ModelImage B0extraction(ModelImage image4D, int refVolumeNum)
      Extracts the reference sub-volume from the input 4D image.
      Parameters:
      image4D - 4D image to extract the sub-volume from.
      refVolumeNum - the reference sub-volume number.
      Returns:
      a new ModelImage containing the extracted sub-volume.
    • buildOARButton

      private JButton buildOARButton()
    • buildTitledBorder

      private TitledBorder buildTitledBorder(String title)
    • buildLoadPanel

      public void buildLoadPanel(ActionListener listener, JPanel mainPanel, JLabel label, JTextField imageName, String tooltip, String actionCommand)
    • init

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

      private ModelImage resampleT2(ModelImage oldT2, ModelImage matchB0)
      Resamples the input ModelImage to match the extents and resolutions of the second ModelImage.
      Parameters:
      oldT2 - input image that will be resampled
      matchB0 - the image to match
      Returns:
      resampled version of the first input image.
    • setVariablesForOAR35D

      private boolean setVariablesForOAR35D()
      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.