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

public class AlgorithmDTITract extends AlgorithmBase
Algorithm requires input of previous calculated FA, EigenVector and EigenValue images from AlgorithmDTI2EGFA to calculate fiber bundle tracts This algorithm works in conjunction with AlgorithmDTI2EGFA to create the MIPAV DTI Fiber Tracking/ Statistics Dialog See:Introduction to Diffusion Tensor Imaging, by Susumu Mori
  • Field Details

    • m_kDTI

      private ModelImage m_kDTI
      Input Diffusion Tensor Image:
    • m_kFAImage

      private ModelImage m_kFAImage
      Input FA Image:
    • m_kEigenVectorImage

      private ModelImage m_kEigenVectorImage
      Input EigenVector Image:
    • m_kEigenValueImage

      private ModelImage m_kEigenValueImage
      Input EigenValue Image:
    • m_kOutputFile

      private String m_kOutputFile
      The name of the tract output file, specified by the user.
    • m_abVisited

      private boolean[] m_abVisited
      Which tensor nodes are already on the fiber bundle tract
    • m_bFirstWrite

      private boolean m_bFirstWrite
      When saving the fiber bundle tracts.
    • m_bNegX

      private boolean m_bNegX
    • m_bNegY

      private boolean m_bNegY
    • m_bNegZ

      private boolean m_bNegZ
    • m_fFAMin

      private float m_fFAMin
    • m_fFAMax

      private float m_fFAMax
    • m_fAngleMax

      private float m_fAngleMax
    • m_iMinLength

      private int m_iMinLength
  • Constructor Details

    • AlgorithmDTITract

      public AlgorithmDTITract(ModelImage kDTI, ModelImage kEigenVectorImage, ModelImage kEigenValueImage, String kFile, boolean bNegX, boolean bNegY, boolean bNegZ)
      Initialize the Algorithm with the input DTI Image:
      Parameters:
      kDTI - input DTI Image.
    • AlgorithmDTITract

      public AlgorithmDTITract(ModelImage kDTI, ModelImage kFAImage, ModelImage kEigenVectorImage, ModelImage kEigenValueImage, String kFile, boolean bNegX, boolean bNegY, boolean bNegZ, float fFAMin, float fFAMax, float fMaxAngle, int iMinLength)
      Initialize the Algorithm with the input DTI Image:
      Parameters:
      kDTI - input DTI Image.
  • Method Details

    • disposeLocal

      public void disposeLocal()
      Clean up memory.
    • runAlgorithm

      public void runAlgorithm()
      Run the DTI -> EigenVector Functional Anisotropy algorithm.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • reconstructTracts

      private void reconstructTracts()
      Constructs the Fiber Bundle Tracts from the DTI and the EigenVectorImage parameters. The fiber bundles are output to a file specified by the user.
      Parameters:
      DTI - Diffusion Tensor Image.
      EigenVectorImage - EigenVector Image.
    • traceTract2

      private void traceTract2(Vector<Integer> kTract, WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kDir, ModelImage EigenVectorImage, ModelImage eigenValueImage, ModelImage kFAImage, boolean bDir)
      Traces a single fiber bundle tract starting at the input position and following the input direction.
      Parameters:
      kTract - fiber bundle tract, new positions are stored in this tract as the fiber is traced.
      kStart - starting position of the tract.
      kDir - direction from the position.
      bDir - boolean when true the positions are added to the end of the tract (positive direction). When false the positions are added to the beginning of the tract (negative direction).
      DTI - Diffusion Tensor image used to calculate next direction of tract.
    • outputTract

      private void outputTract(Vector<Integer> kTract, int iDimX, int iDimY, int iDimZ, FileOutputStream kFileWriter)
      Writes the fiber bundle tract to disk.
      Parameters:
      kTract - the fiber bundle tract.
      iDimX - x-dimension of the diffusion tensor image.
      iDimY - y-dimension of the diffusion tensor image.
      iDimZ - z-dimension of the diffusion tensor image.
      kFileWrite - FileOutputStream.