DTI-TK

Diffusion Tensor Imaging ToolKit

DTI-TK Logo
Documentation::Before Registration

Documentation.BeforeReg History

Hide minor edits - Show changes to output

Changed lines 8-9 from:
DTI-TK provides a number of tools for converting DTI volumes computed using several major DTI tools to the NIfTI tensor format that is used by DTI-TK. The detailed instructions for these tools are given in the [[Interoperability.Interoperability|Interoperability page]].  After conversion, remember to check that the DTI volumes are converted correctly by using the tensor glyph viewing tool described [[Documentation.VisualizationTool|here]].
 
to:
DTI-TK provides a number of tools for converting DTI volumes computed using several major DTI tools to the NIfTI tensor format that is used by DTI-TK. The detailed instructions for these tools are given in the [[Documentation.Interoperability|Interoperability page]].  After conversion, remember to check that the DTI volumes are converted correctly by using the tensor glyph viewing tool described [[Documentation.VisualizationTool|here]].
 
June 10, 2011, at 09:06 AM by 172.29.30.72 -
Changed lines 20-21 from:
where '''b0_mask.nii.gz''' is the brain tissue mask.
 
to:
where ''b0_mask.nii.gz'' is the brain tissue mask.
 
Changed lines 24-25 from:
# DTI-TK expects '''b0_mask.nii.gz''' to be 0 for the background and 1 for brain tissues.
 
to:
# DTI-TK expects ''b0_mask.nii.gz'' to be 0 for the background and 1 for brain tissues.
 
June 10, 2011, at 09:05 AM by 172.29.30.66 -
Changed lines 24-25 from:
# DTI-TK expects b0'_mask_'.nii.gz to be 0 for the background and 1 for brain tissues.
 
to:
# DTI-TK expects '''b0_mask.nii.gz''' to be 0 for the background and 1 for brain tissues.
 
June 10, 2011, at 09:05 AM by 172.29.30.76 -
Changed lines 16-17 from:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0_mask.nii.gz
to:
->[@
TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0_mask.nii.gz
Changed lines 29-30 from:
->[@ TVtool -in tensor.nii.gz -norm
to:
->[@
TVtool -in tensor.nii.gz -norm
Changed lines 35-36 from:
->[@SVtool -in tensor_norm.nii.gz -stats
to:
->[@ 
SVtool -in tensor_norm.nii.gz -stats
Changed lines 53-54 from:
->[@ BinaryThresholdImageFilter tensor_norm.nii.gz non_outliers.nii.gz 0 100 1 0
to:
->[@
BinaryThresholdImageFilter tensor_norm.nii.gz non_outliers.nii.gz 0 100 1 0
Changed lines 63-64 from:
->[@ TVtool -in tensor.nii.gz -spd -out spd.nii.gz
to:
->[@
TVtool -in tensor.nii.gz -spd -out spd.nii.gz
Changed lines 73-76 from:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".[[<<]] [@TVAdjustVoxelspace -in tensor.nii.gz -origin 0 0 0
to:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".[[<<]]
 
->
[@ 
TVAdjustVoxelspace -in tensor.nii.gz -origin 0 0 0
Added line 78:
 
Changed line 50 from:
->[@ BinaryThresholdImageFiler tensor_norm.nii.gz non_outliers.nii.gz 0 100 1 0
to:
->[@ BinaryThresholdImageFilter tensor_norm.nii.gz non_outliers.nii.gz 0 100 1 0
Changed line 16 from:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0_mask_.nii.gz
to:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0_mask.nii.gz
Changed line 16 from:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0'_mask_'.nii.gz
to:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0_mask_.nii.gz
Changed line 68 from:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".[[<<]] [@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
to:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".[[<<]] [@TVAdjustVoxelspace -in tensor.nii.gz -origin 0 0 0
Changed line 16 from:
->[@ TVMask -in tensor.nii.gz -out mtensor.nii.gz -mask b0'_mask_'.nii.gz
to:
->[@ TVtool -in tensor.nii.gz -out mtensor.nii.gz -mask b0'_mask_'.nii.gz
Changed line 28 from:
->[@ TVNorm -in tensor.nii.gz
to:
->[@ TVtool -in tensor.nii.gz -norm
Changed line 33 from:
->[@SVStatistics -in tensor_norm.nii.gz
to:
->[@SVtool -in tensor_norm.nii.gz -stats
Changed line 51 from:
TVMask -in tensor.nii.gz -mask non_outliers.nii.gz -out mtensor.nii.gz
to:
TVtool -in tensor.nii.gz -mask non_outliers.nii.gz -out mtensor.nii.gz
Changed line 67 from:
Having a comon voxel space is ideal for [Documentation.Registration|bootstrapping a reasonably good initial template estimate]].
to:
Having a comon voxel space is ideal for [[Documentation.Registration|bootstrapping a reasonably good initial template estimate]].
Changed line 67 from:
Having a comon voxel space is ideal for bootstrapping a reasonably good initial template estimate.
to:
Having a comon voxel space is ideal for [Documentation.Registration|bootstrapping a reasonably good initial template estimate]].
Changed lines 26-27 from:
Outliers often don't have any effect on image registration.  However, when the outliers are substantially outside the normal range, they will.  A good indicator that the outliers are worthy of concerns is when their existence distorts the mean significantly.  For analyzing DTI volumes, a good summary scalar that reflects the size of a tensor is the tensor norm.  A practical strategy of identifying outliers is by computing the tensor norm image and examining its intensity statistics.  This can be accomplished with the following two commands:
 
to:
Outliers often don't have any effect on image registration.  However, when the outliers are substantially outside the normal range, they will.  A good indicator that the outliers are worthy of concerns is when their existence distorts the mean significantly.  For analyzing DTI volumes, a good summary scalar that reflects the size of a tensor is the tensor [[http://en.wikipedia.org/wiki/Matrix_norm#Frobenius_norm|norm]].  A practical strategy of identifying outliers is by computing the tensor norm image and examining its intensity statistics.  This can be accomplished with the following two commands:
 
Changed lines 11-12 from:
This is the foremost important step to verify!  A detailed instruction on how to check and, if necessary, to correct the diffusivity unit is available here.  If you choose to use a public available DTI template for registration, make sure that you verify its diffusivity unit as well!
 
to:
This is the foremost important step to verify!  A detailed instruction on how to check and, if necessary, to correct the diffusivity unit is available [[Documentation.diffusivity|here]].  If you choose to use a public available DTI template for registration, make sure that you verify its diffusivity unit as well!
 
Changed lines 68-69 from:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace". 
[[<<]][@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
to:
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".[[<<]] [@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
Changed line 69 from:
[[<<]]->[@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
to:
[[<<]][@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
Changed line 69 from:
->[@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
to:
[[<<]]->[@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
Deleted line 70:
 
Changed lines 57-59 from:
Diffusion tensors, by definition, are symmetric and positive-definite matrices, or SPD.  However, in practice, due to noises in the DWI images, the diffusion tensors estimated within a DTI volume are not always SPD.  The SPD condition is very important however to ensure DTI volumes behave properly after various image processing steps.  DTI-TK provides a simple tool that identifies the voxels that are not SPD and enforces this condition on such voxels.  The tool "TVSPD" can be used as follows:
 
->[@ TVSPD -in tensor.nii.gz -out spd.nii.gz
to:
Diffusion tensors, by definition, are symmetric and positive-definite matrices, or SPD.  However, in practice, due to noises in the DWI images, the diffusion tensors estimated within a DTI volume are not always SPD.  The SPD condition is very important however to ensure DTI volumes behave properly after various image processing steps.  DTI-TK provides a simple tool that identifies the voxels that are not SPD and enforces this condition on such voxels.  The tool [[Documentation.TVtool|TVtool]] can be used as follows:
 
->[@ TVtool -in tensor.nii.gz -spd -out spd.nii.gz
Changed lines 62-63 from:
The tool will report the total number of voxels that are not SPD and These voxels will be flagged in a binary image called ''nonSPD.nii.gz''. These voxels are often around the boundary of the brain, usually an result of imperfect removal of non-brain tissues or incomplete correction of motion or eddy-current induced geometrical distortions.  If you find a large number of such voxels occurring within brain tissues, this is a good indication that the data is very noisy and you should perhaps investigate and understand why this is the case and if it is a wide-spread problem.
 
to:
which will report the total number of voxels that are not SPD. These voxels will be flagged in a binary image called ''nonSPD.nii.gz''. These voxels are often around the boundary of the brain, usually an result of imperfect removal of non-brain tissues or incomplete correction of motion or eddy-current induced geometrical distortions.  If you find a large number of such voxels occurring within brain tissues, this is a good indication that the data is very noisy and you should perhaps investigate and understand why this is the case and if it is a wide-spread problem.
 
Added lines 1-73:
(:noleft:) (:notitle:)(:title Before Registration:)
! Preprocessing of Volumes before Registration

!!Make Sure Your Data are not DWI Volumes but DTI Volumes
This is a common source of confusion.  Read [[Documentation.HomePage|the section]] named '''Data Format''' if you don't know the difference.

!!Make Sure DTI Volumes are in the NIfTI Tensor Format
DTI-TK provides a number of tools for converting DTI volumes computed using several major DTI tools to the NIfTI tensor format that is used by DTI-TK. The detailed instructions for these tools are given in the [[Interoperability.Interoperability|Interoperability page]].  After conversion, remember to check that the DTI volumes are converted correctly by using the tensor glyph viewing tool described [[Documentation.VisualizationTool|here]].

!!Make Sure DTI Volumes are Using the Correct Diffusivity Unit
This is the foremost important step to verify!  A detailed instruction on how to check and, if necessary, to correct the diffusivity unit is available here.  If you choose to use a public available DTI template for registration, make sure that you verify its diffusivity unit as well!

!!Remove Non-Brain Tissues
If your protocol for reconstructing DTI volumes from DWI images does not include the step of removing non brain tissues, you need to do this now, before proceeding to registration or spatial normalization.  To do this, our recommended protocol is to use the excellent '''Brain Extraction Tool''', aka '''BET''', available as part of the FSL suite.  Once you have computed the brain tissue mask and are satisfied with its quality, you can apply it to the corresponding DTI volume with the following command:

->[@ TVMask -in tensor.nii.gz -out mtensor.nii.gz -mask b0'_mask_'.nii.gz
@]

where '''b0_mask.nii.gz''' is the brain tissue mask.

Comment:
#A good quality brain mask should not remove any brain tissues and keep non-brain tissue at a minimum.
# DTI-TK expects b0'_mask_'.nii.gz to be 0 for the background and 1 for brain tissues.

!!Make Sure DTI Volumes Contain No Significant Outliers
Outliers often don't have any effect on image registration.  However, when the outliers are substantially outside the normal range, they will.  A good indicator that the outliers are worthy of concerns is when their existence distorts the mean significantly.  For analyzing DTI volumes, a good summary scalar that reflects the size of a tensor is the tensor norm.  A practical strategy of identifying outliers is by computing the tensor norm image and examining its intensity statistics.  This can be accomplished with the following two commands:

->[@ TVNorm -in tensor.nii.gz
@]

which outputs the tensor norm image as ''tensor_norm.nii.gz'', and

->[@SVStatistics -in tensor_norm.nii.gz
@]

which prints out the intensity statistics.

Several example outputs are:

# mean = 1.82275 min = 2.18145e-07 max = 48.668
# mean = 1.81474 min = 2.34247e-07 max = 1491.66
# mean = 78.2015 min = 1.15911e-07 max = 3.22062e+07

The first example shows there are some small outliers in the image.  There are some substantially larger outliers in the second image but it isn't significant enough to affect the mean by a lot.  The third case is an example of the outliers that should be removed prior to registration.  The outliers are so large, the mean value is significantly inflated.

The outlier voxels can be easily identified with binary thresholding and removed via masking.

Note: It is safe to set the outlier threshold at 100 (The estimate is in DTI-TK diffusivity unit).

->[@ BinaryThresholdImageFiler tensor_norm.nii.gz non_outliers.nii.gz 0 100 1 0
TVMask -in tensor.nii.gz -mask non_outliers.nii.gz -out mtensor.nii.gz
@]

Thanks to Stephen Meredith from University College Dublin for the suggestion.

!!Make Sure DTI Volumes are SPD
Diffusion tensors, by definition, are symmetric and positive-definite matrices, or SPD.  However, in practice, due to noises in the DWI images, the diffusion tensors estimated within a DTI volume are not always SPD.  The SPD condition is very important however to ensure DTI volumes behave properly after various image processing steps.  DTI-TK provides a simple tool that identifies the voxels that are not SPD and enforces this condition on such voxels.  The tool "TVSPD" can be used as follows:

->[@ TVSPD -in tensor.nii.gz -out spd.nii.gz
@]

The tool will report the total number of voxels that are not SPD and These voxels will be flagged in a binary image called ''nonSPD.nii.gz''. These voxels are often around the boundary of the brain, usually an result of imperfect removal of non-brain tissues or incomplete correction of motion or eddy-current induced geometrical distortions.  If you find a large number of such voxels occurring within brain tissues, this is a good indication that the data is very noisy and you should perhaps investigate and understand why this is the case and if it is a wide-spread problem.

!!Check Whether DTI Volumes Share one Common Voxel Space
By a voxel space, I mean the following three specifications of a 3D digital volume: the origin (the grid point that maps to the physical origin), the voxel dimensions (the number of grid points along each spatial direction), and the voxel spacings (the physical distance between adjacent grid points along each spatial direction).  Given a NIfTI or Analyzer volume, these specfications can be determined with [[Documentation.Volumeinfo|VolumeInfo]].

Having a comon voxel space is ideal for bootstrapping a reasonably good initial template estimate.
#It's recommended to set all the origin to [0, 0, 0] and this can be done with "TVAdjustVoxelspace".
->[@TVAdjustVoxelspace -in tensor.nii.gz -ox 0 -oy 0 -oz 0
@]

#It is important to resample the volumes that do not share the same voxel spacing as the rest of the volumes.  This is usually never an issue unless you are trying to combine data acquired with different protocols.  The tool for resampling tensor volumes is TVResample.
# It's ideal but not necessary that all the volumes have the same voxel dimensions.  This situation may arise when the same protocol is used if the operator decides to optimze the number of slices to acquire.  Not having the same voxel dimensions (z dimension in most cases) may reduce the initial bootstrapped template estimate. Visual inspection can be used to verify if this is a serious issue or not.
Page last modified on June 23, 2011, at 09:16 PM

    SourceForge.net Logo   Valid XHTML 1.0 Transitional