DTI_Register
Register DTI to the fixed volume using DTI-Reg (ANTs) or the diffeomorphic tensor registration TensorSVF
- Command:
dmriprep- Module version:
0.1
- Module type:
prep- Attributes:
utility,indentity- Notes:
- Source:
Global variables
Values this module shares with the other modules of the pipeline (dmriprep run -g <name>=<value> sets one).
dti_pathdisplacement_field_pathinverse_displacement_field_pathregistered_dti_pathinitial_affine_pathregistered_metric_pathsreference_dti_pathtensor_flip_applied
Command line variables
Values this module shares with the other modules of the pipeline (dmriprep run -g <name>=<value> sets one).
reference_dtireference_normative_modelagetensor_flip
Protocol options
methodMethod to register the DTI: TensorSVF (default) or ANTs (DTI-Reg). TensorSVF aligns the principal directions better (white matter angle 7.2 vs 10.5 deg on 139 scans of 0-12 years) and, with the free water term, the ventricles (Dice 0.81 vs 0.70); use it with a referenceNormativeModel (the mean tensor of the age bin of the subject)
- Type:
list- Default:
TensorSVF- Choices:
ANTs– DTI-Reg - diffeomorphic ANTS registration of the scalar images (FA), tensors resampled with reorientationTensorSVF– Diffeomorphic registration of the tensors (orientation and shape) with a free water term when a free water fraction map is available (multi-shell); GPU when available, otherwise CPU (about 1.5 min on a GPU, 12 min on 4 CPU cores)
referenceImageReference (Fixed Image)
- Type:
string- Default:
not set
referenceNormativeModelNormative model of the reference atlas (folder with manifest.json and <age bin>/DTI_mean.nrrd, written by ‘dmrifiberprofile qc-registration –build-normative’). The DTI is then registered to the mean tensor of the age bin of the subject instead of the reference image; without an age, or a matching bin, the reference image is used
- Type:
dirpath-remote- Default:
not set
ageAge of the subject in the unit of the age bins of the normative model (months); taken from ageCSV, or read from the image path with ageRegex, if not set (then ageFallback, if set). It overrides the others, so use ageFallback for an age of the images that have none
- Type:
float- Default:
not set
ageCSVCSV/TSV with the age of each scan (as ‘dmrifiberprofile qc-registration –age-csv’), for cohorts whose session names don’t carry the age. Subject and session columns are detected (participant_id/session_id and variants); one row per subject applies to all of its sessions. The subject and session of the scan are read from its path (sub-<id>, ses-<id>), else from the IBIS organization (a 6 digit id folder followed by a visit folder starting with V - …/999434/VSA-CVD/… is subject 999434, session SA-CVD; the table may name the session SA-CVD or VSA-CVD)
- Type:
filepath-remote- Default:
not set
ageColumnName of the ageCSV column holding the age (default - auto-detect - age, age_months, candidate_age, …)
- Type:
string- Default:
not set
ageSubjectColumnName of the ageCSV column holding the subject id (default - auto-detect - participant_id, subject_id, subject, id, candid, …)
- Type:
string- Default:
not set
ageSessionColumnName of the ageCSV column holding the session / visit (default - auto-detect - session_id, session, visit, visit_label, …)
- Type:
string- Default:
not set
ageUnitsUnits of the age column of ageCSV and of ageFallback (converted to the months of the age bins); age and ageRegex are in months
- Type:
list- Default:
months- Choices:
months– Ages of ageCSV and ageFallback are in monthsyears– Ages of ageCSV and ageFallback are in yearsweeks– Ages of ageCSV and ageFallback are in weeksdays– Ages of ageCSV and ageFallback are in days
ageRegexRegular expression for the age in the path of the input image (group 1), used when neither age nor ageCSV gives one
- Type:
string- Default:
ses-(\d+)m
ageFallbackAge of an image that neither age, ageCSV nor ageRegex gives one, in ageUnits (months by default), with a warning in the log; without it such an image is registered to the reference image
- Type:
float- Default:
not set
ANTsPathANTs installation directory (default is dtiplayground-tools/ANTs)
- Type:
dirpath-remote- Default:
$ANTSDIR
ANTsMethodANTS method
- Type:
string- Default:
useScalar-ANTS
registrationTypeRegistration Type
- Type:
list- Default:
GreedyDiffeo- Choices:
GreedyDiffeo– Greedy Diffeo
similarityMetricSimilarity Metric
- Type:
list- Default:
CC- Choices:
CC– Cross Correlation
similarityParameterSimilarity Parameter (radius of the CC metric)
- Type:
number- Default:
2
ANTsIterationsIteration parameter for ANTS
- Type:
string- Default:
100x50x20
gaussianSigmaGaussian Sigma
- Type:
number- Default:
1
ANTsTransformationStepGradient step of the ANTS transformation
- Type:
number- Default:
0.25
ANTsUseHistogramMatchingMatch the histograms of the scalar images before the ANTS registration
- Type:
boolean- Default:
true
scalarMeasurementScalar image of the tensors used for the registration (DTI-Reg and BRAINSFit)
- Type:
list- Default:
FA- Choices:
FA– Register the FA images of the tensorsMD– Register the MD images of the tensors
tensorCorrectionCorrection of tensors with negative eigenvalues when computing the scalar images and resampling
- Type:
list- Default:
abs- Choices:
abs– Negative eigenvalues are replaced by their absolute valuezero– Negative eigenvalues are set to zeronearest– Nearest positive definite tensornone– No correction
initialAffineInitial affine transform of the DTI to the reference, refined by the ANTS registration
- Type:
list- Default:
BRAINSFit- Choices:
BRAINSFit– Affine registration of the scalar images with BRAINSFit (fixed = reference, moving = DTI)file– Use the transform given in initialAffineFilenone– No initial affine transform
initialAffineFileITK transform file (fixed = reference, moving = DTI), used if initialAffine is ‘file’
- Type:
string- Default:
not set
tensorFlipCorrection of the tensor frame applied to the DTI before the registration. When empty (default): the global variable tensor_flip, else rotation (auto without an initial affine). none, auto (detected: agreement of the principal directions with the reference after the initial affine, or their coherence along the tracts without an initial affine), the axes to flip (e.g. x or x,z), voxel for components in the frame of the voxel axes (rotated into the space of the header; with flips e.g. voxel,x), or rotation (any rotation of the frame, flips and axis swaps included, that best aligns the principal directions with the reference after the initial affine; the default)
- Type:
string- Default:
not set
freeWaterFree water term of TensorSVF (aligns the ventricles; for multi-shell data with a free water fraction map)
- Type:
list- Default:
auto- Choices:
auto– The FW-tensor free water fraction (<prefix>FWf) of the DTI folder, else the NODDI fraction (<prefix>NODDI_FWF), each when the folder of the reference tensor has its mean map (FWF_mean, NODDI_FWF_mean - the age bins of the normative model have them); otherwise the tensors only (single shell data)FWf– Free water fraction of the FW-tensor fit (<prefix>FWf, reference FWF_mean); an error when missingNODDI_FWF– Free water fraction of NODDI (<prefix>NODDI_FWF, reference NODDI_FWF_mean); an error when missingnone– Register the tensors only
freeWaterImageFree water fraction map of the DTI (default - found in the folder of the input DTI, see freeWater)
- Type:
filepath-remote- Default:
not set
referenceFreeWaterMean free water fraction map of the reference (default - FWF_mean / NODDI_FWF_mean in the folder of the reference tensor)
- Type:
filepath-remote- Default:
not set
freeWaterWeightWeight of the free water term (1 - larger weights overlap the ventricles slightly more but align the white matter of small ventricles worse)
- Type:
number- Default:
1.0
tensorRegRegularizationWeight of the smoothness of the velocity field (0.15; below 0.1 the deformation may fold)
- Type:
number- Default:
0.15
tensorRegSmoothingGaussian sigma (voxels) of the velocity field at each level
- Type:
number- Default:
0.5
tensorRegLevelsDownsampling factors of the resolution levels, coarse to fine
- Type:
string- Default:
4x2x1
tensorRegIterationsIterations at each resolution level
- Type:
string- Default:
200x150x100
tensorRegDevicePyTorch device - auto (the GPU when available, otherwise the CPU), cpu, cuda or cuda:<n>
- Type:
string- Default:
auto
tensorFlipFAThresholdFA threshold of the white matter voxels used by the automatic flip detection
- Type:
number- Default:
0.3
BRAINSFitTransformsComma delimited BRAINSFit transform stages (Rigid, ScaleVersor3D, ScaleSkewVersor3D, Affine), run in this order
- Type:
string- Default:
Rigid,Affine
BRAINSFitInitializeTransformModeInitialization of the BRAINSFit registration
- Type:
list- Default:
useCenterOfHeadAlign- Choices:
useCenterOfHeadAlign– Align the centers of the headsuseMomentsAlign– Align the centers of mass and principal axesuseGeometryAlign– Align the image centersOff– No initialization
BRAINSFitSamplingPercentageFraction (0-1) of the voxels sampled for the BRAINSFit metric. Default 0.5; smaller values are faster but less reproducible (BRAINSFit default 0.002 gave initial affines several mm apart between repeated runs)
- Type:
number- Default:
0.5
registerMetricsApply the displacement field to the diffusion metrics in the folder of the input DTI that share its file name prefix (e.g. <scan>_dwi_QCed_FA.nii.gz for <scan>_dwi_QCed_tensor.nrrd). Tensor images (e.g. free-water corrected tensors) are resampled log-Euclidean with reorientation like the DTI, scalar images linearly. Written as registered_<name>
- Type:
boolean- Default:
true
metricExcludeComma delimited parts of file names that are not registered (e.g. brain masks); integer images and images that are neither scalar nor tensor are not registered either
- Type:
string- Default:
mask