Class AlgorithmMidsagittal

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmMidsagittal
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmMidsagittal extends AlgorithmBase
Finds the midsagittal line of a brain MRI by:
  • Flipping the image horizontally.
  • Registering the flipped image against the original.
  • Getting the angle that the registration rotated the image.
  • Transforming the original image by half the registration rotation.
Version:
0.1 Dec 29, 2004
Author:
Evan McCreedy
  • Field Details

    • baseNumIter

      private int baseNumIter
      Limits the number of iterations of Powell's algorithm when registering the original image against the flipped image.
    • coarseAngle

      private int coarseAngle
      The coarse angle step to use in each dimension when registering the original image against the flipped image.
    • costFunc

      private int costFunc
      The cost function to use when registering the original image against the flipped image.
    • dof

      private int dof
      The number of degrees of freedom to use when registering the original image against the flipped image.
    • doSubsample

      private boolean doSubsample
      Whether to use subsampling when registering the original image against the flipped image.
    • doMultiThread

      private boolean doMultiThread
    • fastMode

      private boolean fastMode
      Whether to skip searching of the parameter space when registering the original image against the flipped image.
    • fineAngle

      private int fineAngle
      The fine angle step to use in each dimension when registering the original image against the flipped image.
    • interp

      private int interp
      The interpolation method to use when registering the original image against the flipped image.
    • maxOfMin

      private boolean maxOfMin
      Whether to use the maximum of the minimum resolutions of the 2 images when respampling during registration against the flipped image.
    • numMinima

      private int numMinima
      Number of minima from level 8 to test at level 4 when registering the original image against the flipped image.
    • searchAngle

      private int searchAngle
      The search angles to use in each dimension (from -searchAngle to searchAngle) when registering the original image against the flipped image.
  • Constructor Details

    • AlgorithmMidsagittal

      public AlgorithmMidsagittal(ModelImage srcImg)
      Construct the midsagittal algorithm.
      Parameters:
      srcImg - source image model
  • Method Details

    • finalize

      public void finalize()
      Prepares this class for destruction.
      Overrides:
      finalize in class AlgorithmBase
    • getResultImage

      public ModelImage getResultImage()
      Get the midsagittal aligned image.
      Returns:
      the aligned image
    • runAlgorithm

      public void runAlgorithm()
      Starts the algorithm.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • calc

      private void calc()
      Find the midsagittal line and transform the source image to align it along that line vertically.
    • calc35D

      private void calc35D()