Class AlgorithmDTITract

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.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 Detail

      • 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 java.lang.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 Detail

      • AlgorithmDTITract

        public AlgorithmDTITract​(ModelImage kDTI,
                                 ModelImage kEigenVectorImage,
                                 ModelImage kEigenValueImage,
                                 java.lang.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,
                                 java.lang.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 Detail

      • 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​(java.util.Vector<java.lang.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.
        DTI - Diffusion Tensor image used to calculate next direction of tract.
        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).
      • outputTract

        private void outputTract​(java.util.Vector<java.lang.Integer> kTract,
                                 int iDimX,
                                 int iDimY,
                                 int iDimZ,
                                 java.io.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.