Class AlgorithmDTITract
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.DiffusionTensorImaging.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 Summary
Fields Modifier and Type Field Description private boolean[]
m_abVisited
Which tensor nodes are already on the fiber bundle tractprivate boolean
m_bFirstWrite
When saving the fiber bundle tracts.private boolean
m_bNegX
private boolean
m_bNegY
private boolean
m_bNegZ
private float
m_fAngleMax
private float
m_fFAMax
private float
m_fFAMin
private int
m_iMinLength
private ModelImage
m_kDTI
Input Diffusion Tensor Image:private ModelImage
m_kEigenValueImage
Input EigenValue Image:private ModelImage
m_kEigenVectorImage
Input EigenVector Image:private ModelImage
m_kFAImage
Input FA Image:private java.lang.String
m_kOutputFile
The name of the tract output file, specified by the user.-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description 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: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:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal()
Clean up memory.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.private void
reconstructTracts()
Constructs the Fiber Bundle Tracts from the DTI and the EigenVectorImage parameters.void
runAlgorithm()
Run the DTI -> EigenVector Functional Anisotropy algorithm.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.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
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 classAlgorithmBase
-
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.
-
-