diff --git a/docs/generate_user_docs.sh b/docs/generate_user_docs.sh index 94170ffa42..8b0076d362 100755 --- a/docs/generate_user_docs.sh +++ b/docs/generate_user_docs.sh @@ -21,7 +21,7 @@ List of MRtrix3 commands filepath='getting_started/commands' filename=`basename $n` $n __print_usage_rst__ > $filepath/$filename.rst - sed -ie "1i$filename\n===========\n" $filepath/$filename.rst + sed -ie "1i.. _$filename:\n\n$filename\n===========\n" $filepath/$filename.rst echo " .. include:: commands/$filename.rst ....... @@ -36,7 +36,7 @@ Scripts for external libraries ################" > getting_started/scripts_list.rst mkdir -p getting_started/scripts - for n in `find ../scripts/ -type f -print0 | xargs -0 grep -l "lib.app.initParser"`; do + for n in `find ../scripts/ -type f -print0 | xargs -0 grep -l "lib.app.initParser" | sort`; do filepath='getting_started/scripts' filename=`basename $n` $n __print_usage_rst__ > $filepath/$filename.rst diff --git a/docs/getting_started/commands/5tt2gmwmi.rst b/docs/getting_started/commands/5tt2gmwmi.rst index e61e8a8550..37ae1697dc 100644 --- a/docs/getting_started/commands/5tt2gmwmi.rst +++ b/docs/getting_started/commands/5tt2gmwmi.rst @@ -1,3 +1,5 @@ +.. _5tt2gmwmi: + 5tt2gmwmi =========== diff --git a/docs/getting_started/commands/5tt2vis.rst b/docs/getting_started/commands/5tt2vis.rst index 5cff5b2410..81c8a5caf0 100644 --- a/docs/getting_started/commands/5tt2vis.rst +++ b/docs/getting_started/commands/5tt2vis.rst @@ -1,3 +1,5 @@ +.. _5tt2vis: + 5tt2vis =========== diff --git a/docs/getting_started/commands/5ttedit.rst b/docs/getting_started/commands/5ttedit.rst index e5903ab7dd..7bb66a51fc 100644 --- a/docs/getting_started/commands/5ttedit.rst +++ b/docs/getting_started/commands/5ttedit.rst @@ -1,3 +1,5 @@ +.. _5ttedit: + 5ttedit =========== diff --git a/docs/getting_started/commands/afdconnectivity.rst b/docs/getting_started/commands/afdconnectivity.rst index 9fd8323489..0106adb3b9 100644 --- a/docs/getting_started/commands/afdconnectivity.rst +++ b/docs/getting_started/commands/afdconnectivity.rst @@ -1,3 +1,5 @@ +.. _afdconnectivity: + afdconnectivity =========== diff --git a/docs/getting_started/commands/amp2sh.rst b/docs/getting_started/commands/amp2sh.rst index 0357c16d9d..d6b869ffd0 100644 --- a/docs/getting_started/commands/amp2sh.rst +++ b/docs/getting_started/commands/amp2sh.rst @@ -1,3 +1,5 @@ +.. _amp2sh: + amp2sh =========== diff --git a/docs/getting_started/commands/connectome2tck.rst b/docs/getting_started/commands/connectome2tck.rst index 16fd7e9536..ea222dc8fb 100644 --- a/docs/getting_started/commands/connectome2tck.rst +++ b/docs/getting_started/commands/connectome2tck.rst @@ -1,3 +1,5 @@ +.. _connectome2tck: + connectome2tck =========== diff --git a/docs/getting_started/commands/dcmedit.rst b/docs/getting_started/commands/dcmedit.rst index a4c641a601..9ccf21606a 100644 --- a/docs/getting_started/commands/dcmedit.rst +++ b/docs/getting_started/commands/dcmedit.rst @@ -1,3 +1,5 @@ +.. _dcmedit: + dcmedit =========== diff --git a/docs/getting_started/commands/dcminfo.rst b/docs/getting_started/commands/dcminfo.rst index 45de72c3cd..3674aa8629 100644 --- a/docs/getting_started/commands/dcminfo.rst +++ b/docs/getting_started/commands/dcminfo.rst @@ -1,3 +1,5 @@ +.. _dcminfo: + dcminfo =========== diff --git a/docs/getting_started/commands/dirflip.rst b/docs/getting_started/commands/dirflip.rst index 6bf7093fd1..43395cb683 100644 --- a/docs/getting_started/commands/dirflip.rst +++ b/docs/getting_started/commands/dirflip.rst @@ -1,3 +1,5 @@ +.. _dirflip: + dirflip =========== diff --git a/docs/getting_started/commands/dirgen.rst b/docs/getting_started/commands/dirgen.rst index c12c385215..42de09226c 100644 --- a/docs/getting_started/commands/dirgen.rst +++ b/docs/getting_started/commands/dirgen.rst @@ -1,3 +1,5 @@ +.. _dirgen: + dirgen =========== diff --git a/docs/getting_started/commands/dirmerge.rst b/docs/getting_started/commands/dirmerge.rst index 94e397da09..85b81b7aa4 100644 --- a/docs/getting_started/commands/dirmerge.rst +++ b/docs/getting_started/commands/dirmerge.rst @@ -1,3 +1,5 @@ +.. _dirmerge: + dirmerge =========== diff --git a/docs/getting_started/commands/dirorder.rst b/docs/getting_started/commands/dirorder.rst index 2323f19a18..8c67b2060f 100644 --- a/docs/getting_started/commands/dirorder.rst +++ b/docs/getting_started/commands/dirorder.rst @@ -1,3 +1,5 @@ +.. _dirorder: + dirorder =========== diff --git a/docs/getting_started/commands/dirsplit.rst b/docs/getting_started/commands/dirsplit.rst index 486a1c3eea..0ed185646c 100644 --- a/docs/getting_started/commands/dirsplit.rst +++ b/docs/getting_started/commands/dirsplit.rst @@ -1,3 +1,5 @@ +.. _dirsplit: + dirsplit =========== diff --git a/docs/getting_started/commands/dirstat.rst b/docs/getting_started/commands/dirstat.rst index e1597f9b3b..72c5ddca37 100644 --- a/docs/getting_started/commands/dirstat.rst +++ b/docs/getting_started/commands/dirstat.rst @@ -1,3 +1,5 @@ +.. _dirstat: + dirstat =========== diff --git a/docs/getting_started/commands/dwi2adc.rst b/docs/getting_started/commands/dwi2adc.rst index adb8c22e8f..3433f5bbda 100644 --- a/docs/getting_started/commands/dwi2adc.rst +++ b/docs/getting_started/commands/dwi2adc.rst @@ -1,3 +1,5 @@ +.. _dwi2adc: + dwi2adc =========== diff --git a/docs/getting_started/commands/dwi2fod.rst b/docs/getting_started/commands/dwi2fod.rst index 875e852f8e..2ad7fd30f0 100644 --- a/docs/getting_started/commands/dwi2fod.rst +++ b/docs/getting_started/commands/dwi2fod.rst @@ -1,3 +1,5 @@ +.. _dwi2fod: + dwi2fod =========== @@ -57,7 +59,7 @@ Spherical deconvolution options - **-threshold value** the threshold below which the amplitude of the FOD is assumed to be zero, expressed as an absolute amplitude (default = 0). -- **-niter number** the maximum number of iterations to perform for each voxel (default = 0). Use '-niter 0' for a linear unconstrained spherical deconvolution. +- **-niter number** the maximum number of iterations to perform for each voxel (default = 50). Use '-niter 0' for a linear unconstrained spherical deconvolution. Stride options ^^^^^^^^^^^^^^ diff --git a/docs/getting_started/commands/dwi2mask.rst b/docs/getting_started/commands/dwi2mask.rst index 4820b8173d..3600c6247c 100644 --- a/docs/getting_started/commands/dwi2mask.rst +++ b/docs/getting_started/commands/dwi2mask.rst @@ -1,3 +1,5 @@ +.. _dwi2mask: + dwi2mask =========== diff --git a/docs/getting_started/commands/dwi2noise.rst b/docs/getting_started/commands/dwi2noise.rst index b5bef763c4..dbee3d37da 100644 --- a/docs/getting_started/commands/dwi2noise.rst +++ b/docs/getting_started/commands/dwi2noise.rst @@ -1,3 +1,5 @@ +.. _dwi2noise: + dwi2noise =========== diff --git a/docs/getting_started/commands/dwi2tensor.rst b/docs/getting_started/commands/dwi2tensor.rst index 9d63e80326..30ec363433 100644 --- a/docs/getting_started/commands/dwi2tensor.rst +++ b/docs/getting_started/commands/dwi2tensor.rst @@ -1,3 +1,5 @@ +.. _dwi2tensor: + dwi2tensor =========== diff --git a/docs/getting_started/commands/dwiextract.rst b/docs/getting_started/commands/dwiextract.rst index 39ce928551..ba96d05a39 100644 --- a/docs/getting_started/commands/dwiextract.rst +++ b/docs/getting_started/commands/dwiextract.rst @@ -1,3 +1,5 @@ +.. _dwiextract: + dwiextract =========== diff --git a/docs/getting_started/commands/dwinormalise.rst b/docs/getting_started/commands/dwinormalise.rst index de6c041811..d115e04f01 100644 --- a/docs/getting_started/commands/dwinormalise.rst +++ b/docs/getting_started/commands/dwinormalise.rst @@ -1,3 +1,5 @@ +.. _dwinormalise: + dwinormalise =========== diff --git a/docs/getting_started/commands/fixel2sh.rst b/docs/getting_started/commands/fixel2sh.rst index bcf42cad05..224879491c 100644 --- a/docs/getting_started/commands/fixel2sh.rst +++ b/docs/getting_started/commands/fixel2sh.rst @@ -1,3 +1,5 @@ +.. _fixel2sh: + fixel2sh =========== diff --git a/docs/getting_started/commands/fixel2tsf.rst b/docs/getting_started/commands/fixel2tsf.rst index a93aadbe04..6dfdd01a2d 100644 --- a/docs/getting_started/commands/fixel2tsf.rst +++ b/docs/getting_started/commands/fixel2tsf.rst @@ -1,3 +1,5 @@ +.. _fixel2tsf: + fixel2tsf =========== diff --git a/docs/getting_started/commands/fixel2voxel.rst b/docs/getting_started/commands/fixel2voxel.rst index 07ed9265f0..1e0bfa89b4 100644 --- a/docs/getting_started/commands/fixel2voxel.rst +++ b/docs/getting_started/commands/fixel2voxel.rst @@ -1,3 +1,5 @@ +.. _fixel2voxel: + fixel2voxel =========== diff --git a/docs/getting_started/commands/fixelcfestats.rst b/docs/getting_started/commands/fixelcfestats.rst index cea9c74d5b..b904d1a377 100644 --- a/docs/getting_started/commands/fixelcfestats.rst +++ b/docs/getting_started/commands/fixelcfestats.rst @@ -1,3 +1,5 @@ +.. _fixelcfestats: + fixelcfestats =========== diff --git a/docs/getting_started/commands/fixelcorrespondence.rst b/docs/getting_started/commands/fixelcorrespondence.rst index 55c8ee6cc8..e2c557f530 100644 --- a/docs/getting_started/commands/fixelcorrespondence.rst +++ b/docs/getting_started/commands/fixelcorrespondence.rst @@ -1,3 +1,5 @@ +.. _fixelcorrespondence: + fixelcorrespondence =========== diff --git a/docs/getting_started/commands/fixeldivide.rst b/docs/getting_started/commands/fixeldivide.rst index 3729648189..5374eb4b78 100644 --- a/docs/getting_started/commands/fixeldivide.rst +++ b/docs/getting_started/commands/fixeldivide.rst @@ -1,3 +1,5 @@ +.. _fixeldivide: + fixeldivide =========== diff --git a/docs/getting_started/commands/fixelmult.rst b/docs/getting_started/commands/fixelmult.rst index e3b966fcdc..e80c36850c 100644 --- a/docs/getting_started/commands/fixelmult.rst +++ b/docs/getting_started/commands/fixelmult.rst @@ -1,3 +1,5 @@ +.. _fixelmult: + fixelmult =========== diff --git a/docs/getting_started/commands/fixelstats.rst b/docs/getting_started/commands/fixelstats.rst index 99b808828e..c1c8efb310 100644 --- a/docs/getting_started/commands/fixelstats.rst +++ b/docs/getting_started/commands/fixelstats.rst @@ -1,3 +1,5 @@ +.. _fixelstats: + fixelstats =========== diff --git a/docs/getting_started/commands/fixelthreshold.rst b/docs/getting_started/commands/fixelthreshold.rst index 8e872cb6a5..020b1a8345 100644 --- a/docs/getting_started/commands/fixelthreshold.rst +++ b/docs/getting_started/commands/fixelthreshold.rst @@ -1,3 +1,5 @@ +.. _fixelthreshold: + fixelthreshold =========== diff --git a/docs/getting_started/commands/fod2dec.rst b/docs/getting_started/commands/fod2dec.rst index 0819f89d81..e0faf098c8 100644 --- a/docs/getting_started/commands/fod2dec.rst +++ b/docs/getting_started/commands/fod2dec.rst @@ -1,3 +1,5 @@ +.. _fod2dec: + fod2dec =========== diff --git a/docs/getting_started/commands/fod2fixel.rst b/docs/getting_started/commands/fod2fixel.rst index a33d3947c3..a9b3bf83f3 100644 --- a/docs/getting_started/commands/fod2fixel.rst +++ b/docs/getting_started/commands/fod2fixel.rst @@ -1,3 +1,5 @@ +.. _fod2fixel: + fod2fixel =========== diff --git a/docs/getting_started/commands/label2colour.rst b/docs/getting_started/commands/label2colour.rst index 22010a3e40..df805c5d1a 100644 --- a/docs/getting_started/commands/label2colour.rst +++ b/docs/getting_started/commands/label2colour.rst @@ -1,3 +1,5 @@ +.. _label2colour: + label2colour =========== diff --git a/docs/getting_started/commands/label2mesh.rst b/docs/getting_started/commands/label2mesh.rst index 5829f950a8..e146620927 100644 --- a/docs/getting_started/commands/label2mesh.rst +++ b/docs/getting_started/commands/label2mesh.rst @@ -1,3 +1,5 @@ +.. _label2mesh: + label2mesh =========== diff --git a/docs/getting_started/commands/labelconfig.rst b/docs/getting_started/commands/labelconfig.rst index 0c3721b158..3f0911fd14 100644 --- a/docs/getting_started/commands/labelconfig.rst +++ b/docs/getting_started/commands/labelconfig.rst @@ -1,3 +1,5 @@ +.. _labelconfig: + labelconfig =========== diff --git a/docs/getting_started/commands/maskfilter.rst b/docs/getting_started/commands/maskfilter.rst index f509d4361f..27c53abf80 100644 --- a/docs/getting_started/commands/maskfilter.rst +++ b/docs/getting_started/commands/maskfilter.rst @@ -1,3 +1,5 @@ +.. _maskfilter: + maskfilter =========== diff --git a/docs/getting_started/commands/mesh2pve.rst b/docs/getting_started/commands/mesh2pve.rst index 7c2391b2fc..6bd3ede7db 100644 --- a/docs/getting_started/commands/mesh2pve.rst +++ b/docs/getting_started/commands/mesh2pve.rst @@ -1,3 +1,5 @@ +.. _mesh2pve: + mesh2pve =========== diff --git a/docs/getting_started/commands/meshconvert.rst b/docs/getting_started/commands/meshconvert.rst index 15ff9e9e73..23d77dcd6e 100644 --- a/docs/getting_started/commands/meshconvert.rst +++ b/docs/getting_started/commands/meshconvert.rst @@ -1,3 +1,5 @@ +.. _meshconvert: + meshconvert =========== diff --git a/docs/getting_started/commands/meshfilter.rst b/docs/getting_started/commands/meshfilter.rst index 4a510ea83e..06349d5f90 100644 --- a/docs/getting_started/commands/meshfilter.rst +++ b/docs/getting_started/commands/meshfilter.rst @@ -1,3 +1,5 @@ +.. _meshfilter: + meshfilter =========== diff --git a/docs/getting_started/commands/mrcalc.rst b/docs/getting_started/commands/mrcalc.rst index 83c937c016..eda8fc1bd3 100644 --- a/docs/getting_started/commands/mrcalc.rst +++ b/docs/getting_started/commands/mrcalc.rst @@ -1,3 +1,5 @@ +.. _mrcalc: + mrcalc =========== diff --git a/docs/getting_started/commands/mrcat.rst b/docs/getting_started/commands/mrcat.rst index 786f760e2d..05628c7b59 100644 --- a/docs/getting_started/commands/mrcat.rst +++ b/docs/getting_started/commands/mrcat.rst @@ -1,3 +1,5 @@ +.. _mrcat: + mrcat =========== diff --git a/docs/getting_started/commands/mrclusterstats.rst b/docs/getting_started/commands/mrclusterstats.rst index d643949f21..b22def677f 100644 --- a/docs/getting_started/commands/mrclusterstats.rst +++ b/docs/getting_started/commands/mrclusterstats.rst @@ -1,3 +1,5 @@ +.. _mrclusterstats: + mrclusterstats =========== diff --git a/docs/getting_started/commands/mrconvert.rst b/docs/getting_started/commands/mrconvert.rst index c8557889c2..974f65ea2b 100644 --- a/docs/getting_started/commands/mrconvert.rst +++ b/docs/getting_started/commands/mrconvert.rst @@ -1,3 +1,5 @@ +.. _mrconvert: + mrconvert =========== diff --git a/docs/getting_started/commands/mrcrop.rst b/docs/getting_started/commands/mrcrop.rst index 99a561e556..d5503d9ae3 100644 --- a/docs/getting_started/commands/mrcrop.rst +++ b/docs/getting_started/commands/mrcrop.rst @@ -1,3 +1,5 @@ +.. _mrcrop: + mrcrop =========== diff --git a/docs/getting_started/commands/mrfilter.rst b/docs/getting_started/commands/mrfilter.rst index cb07528c21..728c8d55e2 100644 --- a/docs/getting_started/commands/mrfilter.rst +++ b/docs/getting_started/commands/mrfilter.rst @@ -1,3 +1,5 @@ +.. _mrfilter: + mrfilter =========== diff --git a/docs/getting_started/commands/mrinfo.rst b/docs/getting_started/commands/mrinfo.rst index d799fea083..98b615546e 100644 --- a/docs/getting_started/commands/mrinfo.rst +++ b/docs/getting_started/commands/mrinfo.rst @@ -1,3 +1,5 @@ +.. _mrinfo: + mrinfo =========== diff --git a/docs/getting_started/commands/mrmath.rst b/docs/getting_started/commands/mrmath.rst index 318227909b..c3bdac16b6 100644 --- a/docs/getting_started/commands/mrmath.rst +++ b/docs/getting_started/commands/mrmath.rst @@ -1,3 +1,5 @@ +.. _mrmath: + mrmath =========== diff --git a/docs/getting_started/commands/mrmesh.rst b/docs/getting_started/commands/mrmesh.rst index 2085ba8cf0..a27de0936f 100644 --- a/docs/getting_started/commands/mrmesh.rst +++ b/docs/getting_started/commands/mrmesh.rst @@ -1,3 +1,5 @@ +.. _mrmesh: + mrmesh =========== diff --git a/docs/getting_started/commands/mrpad.rst b/docs/getting_started/commands/mrpad.rst index 969a254b28..de929990e6 100644 --- a/docs/getting_started/commands/mrpad.rst +++ b/docs/getting_started/commands/mrpad.rst @@ -1,3 +1,5 @@ +.. _mrpad: + mrpad =========== diff --git a/docs/getting_started/commands/mrresize.rst b/docs/getting_started/commands/mrresize.rst index cf72f688f5..aa36b1a537 100644 --- a/docs/getting_started/commands/mrresize.rst +++ b/docs/getting_started/commands/mrresize.rst @@ -1,3 +1,5 @@ +.. _mrresize: + mrresize =========== diff --git a/docs/getting_started/commands/mrstats.rst b/docs/getting_started/commands/mrstats.rst index 9fd7ca4ce1..a0899ea3dc 100644 --- a/docs/getting_started/commands/mrstats.rst +++ b/docs/getting_started/commands/mrstats.rst @@ -1,3 +1,5 @@ +.. _mrstats: + mrstats =========== diff --git a/docs/getting_started/commands/mrthreshold.rst b/docs/getting_started/commands/mrthreshold.rst index 275a50c8a8..306c73e928 100644 --- a/docs/getting_started/commands/mrthreshold.rst +++ b/docs/getting_started/commands/mrthreshold.rst @@ -1,3 +1,5 @@ +.. _mrthreshold: + mrthreshold =========== diff --git a/docs/getting_started/commands/mrtransform.rst b/docs/getting_started/commands/mrtransform.rst index d052c8e168..417df7b648 100644 --- a/docs/getting_started/commands/mrtransform.rst +++ b/docs/getting_started/commands/mrtransform.rst @@ -1,3 +1,5 @@ +.. _mrtransform: + mrtransform =========== diff --git a/docs/getting_started/commands/mrview.rst b/docs/getting_started/commands/mrview.rst index adfde8f466..c06a97c893 100644 --- a/docs/getting_started/commands/mrview.rst +++ b/docs/getting_started/commands/mrview.rst @@ -1,3 +1,5 @@ +.. _mrview: + mrview =========== diff --git a/docs/getting_started/commands/msdwi2fod.rst b/docs/getting_started/commands/msdwi2fod.rst index 641c9c6769..aad44a45a8 100644 --- a/docs/getting_started/commands/msdwi2fod.rst +++ b/docs/getting_started/commands/msdwi2fod.rst @@ -1,3 +1,5 @@ +.. _msdwi2fod: + msdwi2fod =========== diff --git a/docs/getting_started/commands/peaks2amp.rst b/docs/getting_started/commands/peaks2amp.rst index 6f2f686138..257e4e7975 100644 --- a/docs/getting_started/commands/peaks2amp.rst +++ b/docs/getting_started/commands/peaks2amp.rst @@ -1,3 +1,5 @@ +.. _peaks2amp: + peaks2amp =========== diff --git a/docs/getting_started/commands/sh2amp.rst b/docs/getting_started/commands/sh2amp.rst index f40899bc7d..d2eb01880a 100644 --- a/docs/getting_started/commands/sh2amp.rst +++ b/docs/getting_started/commands/sh2amp.rst @@ -1,3 +1,5 @@ +.. _sh2amp: + sh2amp =========== diff --git a/docs/getting_started/commands/sh2peaks.rst b/docs/getting_started/commands/sh2peaks.rst index 6c04312337..78a28fe1df 100644 --- a/docs/getting_started/commands/sh2peaks.rst +++ b/docs/getting_started/commands/sh2peaks.rst @@ -1,3 +1,5 @@ +.. _sh2peaks: + sh2peaks =========== diff --git a/docs/getting_started/commands/sh2power.rst b/docs/getting_started/commands/sh2power.rst index b3879cadc6..7ef0dd2ac0 100644 --- a/docs/getting_started/commands/sh2power.rst +++ b/docs/getting_started/commands/sh2power.rst @@ -1,3 +1,5 @@ +.. _sh2power: + sh2power =========== @@ -14,11 +16,15 @@ Synopsis Description ----------- -compute the power contained within each harmonic degree. +compute the total power of a spherical harmonics image. + +This command computes the sum of squared SH coefficients, which equals the mean-squared amplitude of the spherical function it represents. Options ------- +- **-spectrum** output the power spectrum, i.e., the power contained within each harmonic degree (l=0, 2, 4, ...) as a 4-D image. + Standard options ^^^^^^^^^^^^^^^^ diff --git a/docs/getting_started/commands/sh2response.rst b/docs/getting_started/commands/sh2response.rst index 46135f0d20..ad0c15c6dc 100644 --- a/docs/getting_started/commands/sh2response.rst +++ b/docs/getting_started/commands/sh2response.rst @@ -1,3 +1,5 @@ +.. _sh2response: + sh2response =========== diff --git a/docs/getting_started/commands/shbasis.rst b/docs/getting_started/commands/shbasis.rst index 286d14ae49..a93713f2fc 100644 --- a/docs/getting_started/commands/shbasis.rst +++ b/docs/getting_started/commands/shbasis.rst @@ -1,3 +1,5 @@ +.. _shbasis: + shbasis =========== diff --git a/docs/getting_started/commands/shconv.rst b/docs/getting_started/commands/shconv.rst index 0c584e43be..1f8fbcd99f 100644 --- a/docs/getting_started/commands/shconv.rst +++ b/docs/getting_started/commands/shconv.rst @@ -1,3 +1,5 @@ +.. _shconv: + shconv =========== diff --git a/docs/getting_started/commands/shview.rst b/docs/getting_started/commands/shview.rst index c49ff3e8d4..53100b6e52 100644 --- a/docs/getting_started/commands/shview.rst +++ b/docs/getting_started/commands/shview.rst @@ -1,3 +1,5 @@ +.. _shview: + shview =========== diff --git a/docs/getting_started/commands/tck2connectome.rst b/docs/getting_started/commands/tck2connectome.rst index cb001ee177..46df6c0083 100644 --- a/docs/getting_started/commands/tck2connectome.rst +++ b/docs/getting_started/commands/tck2connectome.rst @@ -1,3 +1,5 @@ +.. _tck2connectome: + tck2connectome =========== diff --git a/docs/getting_started/commands/tckconvert.rst b/docs/getting_started/commands/tckconvert.rst index 389fe544a0..b54be56f70 100644 --- a/docs/getting_started/commands/tckconvert.rst +++ b/docs/getting_started/commands/tckconvert.rst @@ -1,3 +1,5 @@ +.. _tckconvert: + tckconvert =========== diff --git a/docs/getting_started/commands/tckedit.rst b/docs/getting_started/commands/tckedit.rst index 85639cf3f7..d00d32d299 100644 --- a/docs/getting_started/commands/tckedit.rst +++ b/docs/getting_started/commands/tckedit.rst @@ -1,3 +1,5 @@ +.. _tckedit: + tckedit =========== diff --git a/docs/getting_started/commands/tckgen.rst b/docs/getting_started/commands/tckgen.rst index 960f9acdc9..ac299373f1 100644 --- a/docs/getting_started/commands/tckgen.rst +++ b/docs/getting_started/commands/tckgen.rst @@ -1,3 +1,5 @@ +.. _tckgen: + tckgen =========== diff --git a/docs/getting_started/commands/tckglobal.rst b/docs/getting_started/commands/tckglobal.rst index cf7b0cb998..e1df8b06b9 100644 --- a/docs/getting_started/commands/tckglobal.rst +++ b/docs/getting_started/commands/tckglobal.rst @@ -1,3 +1,5 @@ +.. _tckglobal: + tckglobal =========== diff --git a/docs/getting_started/commands/tckinfo.rst b/docs/getting_started/commands/tckinfo.rst index dd055305f5..d92f6cb2d5 100644 --- a/docs/getting_started/commands/tckinfo.rst +++ b/docs/getting_started/commands/tckinfo.rst @@ -1,3 +1,5 @@ +.. _tckinfo: + tckinfo =========== diff --git a/docs/getting_started/commands/tckmap.rst b/docs/getting_started/commands/tckmap.rst index e234e10cc4..e9f3bb9273 100644 --- a/docs/getting_started/commands/tckmap.rst +++ b/docs/getting_started/commands/tckmap.rst @@ -1,3 +1,5 @@ +.. _tckmap: + tckmap =========== diff --git a/docs/getting_started/commands/tcknormalise.rst b/docs/getting_started/commands/tcknormalise.rst index c369196e5d..f1925c6b87 100644 --- a/docs/getting_started/commands/tcknormalise.rst +++ b/docs/getting_started/commands/tcknormalise.rst @@ -1,3 +1,5 @@ +.. _tcknormalise: + tcknormalise =========== diff --git a/docs/getting_started/commands/tcksample.rst b/docs/getting_started/commands/tcksample.rst index bbb547d72c..f56e883d6e 100644 --- a/docs/getting_started/commands/tcksample.rst +++ b/docs/getting_started/commands/tcksample.rst @@ -1,3 +1,5 @@ +.. _tcksample: + tcksample =========== diff --git a/docs/getting_started/commands/tcksift.rst b/docs/getting_started/commands/tcksift.rst index 8d481c10c5..b6b84bbfc2 100644 --- a/docs/getting_started/commands/tcksift.rst +++ b/docs/getting_started/commands/tcksift.rst @@ -1,3 +1,5 @@ +.. _tcksift: + tcksift =========== diff --git a/docs/getting_started/commands/tcksift2.rst b/docs/getting_started/commands/tcksift2.rst index b81e5083e4..c1b0f20872 100644 --- a/docs/getting_started/commands/tcksift2.rst +++ b/docs/getting_started/commands/tcksift2.rst @@ -1,3 +1,5 @@ +.. _tcksift2: + tcksift2 =========== diff --git a/docs/getting_started/commands/tckstats.rst b/docs/getting_started/commands/tckstats.rst index a2198b19b0..0689d09c55 100644 --- a/docs/getting_started/commands/tckstats.rst +++ b/docs/getting_started/commands/tckstats.rst @@ -1,3 +1,5 @@ +.. _tckstats: + tckstats =========== diff --git a/docs/getting_started/commands/tensor2metric.rst b/docs/getting_started/commands/tensor2metric.rst index a68711680d..dd6e9bd9db 100644 --- a/docs/getting_started/commands/tensor2metric.rst +++ b/docs/getting_started/commands/tensor2metric.rst @@ -1,3 +1,5 @@ +.. _tensor2metric: + tensor2metric =========== diff --git a/docs/getting_started/commands/transformcalc.rst b/docs/getting_started/commands/transformcalc.rst index c1d9b586aa..64e0de9593 100644 --- a/docs/getting_started/commands/transformcalc.rst +++ b/docs/getting_started/commands/transformcalc.rst @@ -1,3 +1,5 @@ +.. _transformcalc: + transformcalc =========== diff --git a/docs/getting_started/commands/tsfdivide.rst b/docs/getting_started/commands/tsfdivide.rst index b4774d02a7..430f062389 100644 --- a/docs/getting_started/commands/tsfdivide.rst +++ b/docs/getting_started/commands/tsfdivide.rst @@ -1,3 +1,5 @@ +.. _tsfdivide: + tsfdivide =========== diff --git a/docs/getting_started/commands/tsfinfo.rst b/docs/getting_started/commands/tsfinfo.rst index a384cd0843..9acdf4a255 100644 --- a/docs/getting_started/commands/tsfinfo.rst +++ b/docs/getting_started/commands/tsfinfo.rst @@ -1,3 +1,5 @@ +.. _tsfinfo: + tsfinfo =========== diff --git a/docs/getting_started/commands/tsfmult.rst b/docs/getting_started/commands/tsfmult.rst index d04aedcb47..2face0e351 100644 --- a/docs/getting_started/commands/tsfmult.rst +++ b/docs/getting_started/commands/tsfmult.rst @@ -1,3 +1,5 @@ +.. _tsfmult: + tsfmult =========== diff --git a/docs/getting_started/commands/tsfsmooth.rst b/docs/getting_started/commands/tsfsmooth.rst index 89c03fdb1a..ffd2927c95 100644 --- a/docs/getting_started/commands/tsfsmooth.rst +++ b/docs/getting_started/commands/tsfsmooth.rst @@ -1,3 +1,5 @@ +.. _tsfsmooth: + tsfsmooth =========== diff --git a/docs/getting_started/commands/tsfthreshold.rst b/docs/getting_started/commands/tsfthreshold.rst index 1e5478fab2..968ecf7380 100644 --- a/docs/getting_started/commands/tsfthreshold.rst +++ b/docs/getting_started/commands/tsfthreshold.rst @@ -1,3 +1,5 @@ +.. _tsfthreshold: + tsfthreshold =========== diff --git a/docs/getting_started/commands/voxel2fixel.rst b/docs/getting_started/commands/voxel2fixel.rst index 883194d1e1..3b2ad6387a 100644 --- a/docs/getting_started/commands/voxel2fixel.rst +++ b/docs/getting_started/commands/voxel2fixel.rst @@ -1,3 +1,5 @@ +.. _voxel2fixel: + voxel2fixel =========== diff --git a/docs/getting_started/commands/warpcorrect.rst b/docs/getting_started/commands/warpcorrect.rst index d7da18558c..6c17a66ea1 100644 --- a/docs/getting_started/commands/warpcorrect.rst +++ b/docs/getting_started/commands/warpcorrect.rst @@ -1,3 +1,5 @@ +.. _warpcorrect: + warpcorrect =========== diff --git a/docs/getting_started/commands/warpinit.rst b/docs/getting_started/commands/warpinit.rst index 708e0e170c..9a4a9b075e 100644 --- a/docs/getting_started/commands/warpinit.rst +++ b/docs/getting_started/commands/warpinit.rst @@ -1,3 +1,5 @@ +.. _warpinit: + warpinit =========== diff --git a/docs/getting_started/image_data.rst b/docs/getting_started/image_data.rst index 55725968ae..a51c75bd7d 100644 --- a/docs/getting_started/image_data.rst +++ b/docs/getting_started/image_data.rst @@ -1,5 +1,8 @@ Images and other data -##################### +===================== + +Format handling in *MRtrix3* +---------------------------- *MRtrix3* provides a flexible data input/output back-end in the shared library, which is used across all applications. This means that all @@ -64,11 +67,9 @@ Multi-file numbered image support ''''''''''''''''''''''''''''''''' It is possible to access a numbered series of images as a single -multi-dimensional dataset, using a syntax specific to *MRtrix*. For example: - -.. code:: +multi-dimensional dataset, using a syntax specific to *MRtrix*. For example:: - mrinfo MRI-volume-[].nii.gz + $ mrinfo MRI-volume-[].nii.gz will collate all images that match the pattern ``MRI-volume-.nii.gz``, sort them in ascending numerical order, @@ -77,11 +78,9 @@ that contained in the images. In other words, assuming there are 10 ``MRI-volume-0.nii.gz`` to ``MRI-volume-9.nii.gz``, and each volume is a 3D image, the result will be a 4D dataset with 10 volumes. -Note that this isn't limited to one level of numbering: - -.. code:: +Note that this isn't limited to one level of numbering:: - mrconvert data-[]-[].nii combined.mif + $ mrconvert data-[]-[].nii combined.mif will collate all images that match the ``data-number-number.nii`` pattern and generate a single dataset with dimensionality two larger @@ -89,11 +88,9 @@ than its constituents. Finally, it is also possible to explicitly request specific numbers, using a :ref:`number_sequences` -within the square brackets: +within the square brackets:: -.. code:: - - mrconvert data-[10:20].nii combined.mif + $ mrconvert data-[10:20].nii combined.mif @@ -102,12 +99,18 @@ within the square brackets: Data types '''''''''' -*MRtrix* applications can read and write data in any of the common data -types. Moreover the *MRtrix* image file format can be used to store images in any -of these formats, while other image formats may only support a subset of -these data types. When a data type is requested that isn't supported by -the image format, a hopefully suitable alternative data type will be -used instead. +*MRtrix* applications can read and write data in any of the common data types. +Many *MRtrix3* commands also support the ``-datatype`` option to specify the +data type for the output image. For example:: + + $ mrconvert DICOM_images/ -datatype float32 output.nii + +.. NOTE:: + Not all image formats support all possible datatypes. The *MRtrix* image file + formats are designed to handle all of the possibilities listed below, while + other image formats may only support of subset. When a data type is requested + that isn't supported by the image format, a hopefully suitable alternative + data type will be used instead. Below is a list of the supported data types and their specifiers for use on the command-line. Note that *MRtrix* is not sensitive to the case of @@ -171,6 +174,57 @@ the specifier: ``uint16le`` will work just as well as ``UInt16LE``. | CFloat64BE | complex 64-bit (double) floating-point (big-endian) | +--------------+---------------------------------------------------------------+ + + +.. _transform: + +The image transfom +'''''''''''''''''' + +The orientation of the image with respect to the scanner axes is determined by +the combination of the *image axes* and the *location of the corner voxel*. This +information is encapsulated in the *transformation matrix*, commonly referred +to simply as the *transform*. You can view the transform for any image using +:ref:`mrinfo`, for example:: + + $ mrinfo dwi.mif + ************************************************ + Image: "dwi.mif" + ************************************************ + Dimensions: 104 x 104 x 54 x 167 + Voxel size: 2.30769 x 2.30769 x 2.3 x ? + Data strides: [ -1 -2 3 4 ] + Format: MRtrix + Data type: unsigned 16 bit integer (little endian) + Intensity scaling: offset = 0, multiplier = 1 + Transform: 0.9999 6.887e-09 -0.01564 -116.1 + -0.001242 0.9968 -0.07943 -89.44 + 0.01559 0.07944 0.9967 -64.27 + comments: TOURNIER DONALD (BRI) [MR] diff60_b3000_2.3_iPat2+ADC + study: BRI_Temp_backup Donald + DOB: 09/03/1977 + DOS: 03/10/2007 15:58:40 + dw_scheme: [ 167 entries ] + +The 'transform' field above shows the first 3 rows of the transformation matrix +(technically, this is a 4×4 matrix, but the last row is always set to ``[ 0 0 0 +1 ]``). The first 3 columns correspond to the *x*, *y* & *z* image axes +respectively, while the last column corresponds to the location *in real +(scanner/world) space* of the corner voxel (i.e. the voxel at index ``[ 0 0 0 ]``). + +In *MRtrix3*, the transform shown always corresponds to the transformation from +image coordinates *in millimeters* to scanner coordinates *in millimeters* - +the voxel size is not taken into account, and the image axes are always +normalised to unit amplitude. This may differ from other packages. + +Furthermore, *MRtrix3* will always present the transform that best matches the +real space. If the transform of the image on file represents a large rotation, +such that for example the image *x* axis is more closely with the scanner's *z* +axis, this transform will be modified by permutation or inversion of the axes +to bring it in alignment with the expected coordinate system, so that the first +axis genuinely can be interpreted as approximately left-right, etc. To achieve +this, *MRtrix3* will also modify the image :ref:`strides` to match. + .. _strides: Strides @@ -228,47 +282,73 @@ for applications that need to process all values for a given voxel concurrently (as is often the case in diffusion MRI), by allowing the hardware to make better use of resources (tractography is one such example). +Many *MRtrix3* commands accept the ``-stride`` option, which is used to specify +the strides for the output image. For example, to generate a LAS (radiological) +NIfTI image for use with FSL (along with the corresponding bvecs/bvals), you +can use :ref:`mrconvert` along with the ``-stride -1,2,3,4`` option:: + + $ mrconvert dwi.mif -stride -1,2,3,4 -export_grad_fsl bvecs bvals dwi.nii + +Likewise, if you need to ensure the orientation is neurological (RAS), you can +specify strides ``1,2,3,4`` (or use the ``1:4`` shorthand). You can also specify +other combinations if required: for example ``-stride -2,-1,3,4`` would +correspond to a PLS coordinate system, ``-stride 2,3,4,1`` would correspond to +volume-contiguous storage (with RAS for the spatial axes), etc. + The different formats supported by *MRtrix3* differ in the range of strides -that they support. The :ref:`_mrtrix_image_formats` are the only formats to +that they support. The :ref:`mrtrix_image_formats` are the only formats to support arbitrary combinations. - .. NOTE:: - There is an interaction between strides and the image transform: if the - transform matrix corresponds to a 90° rotation, this can be viewed as - changing the *strides* without affecting the transform. Relative to the - anatomical labels typically used to refer to the ordering (e.g. RAS, LAS, - etc), the order of storage has been changed by such a large rotation. For - example, if a RAS image is modified such that its transform rotates the - image axes by 90° around the *y* axis, this in effect implies that voxels - are now ordered IAR. - - The *MRtrix3* back-end will interpret such large rotations as affecting the - strides, so that when the strides are ``1,2,3``, the order of storage will - always be left->right, posterior->anterior, inferior->superior *relative to - the scanner axes*. Note that this also implies that the transform matrix will - always be modified as necessary to bring it close to the standard coordinate - system, so that the first image axis is close to the *x* axis, etc. This - allows *MRtrix3* applications to operate on images in the knowledge that - these axes are always anatomically as expected, without worrying about the - details of *how* this information was actually stored on file. - - It is important to bear this in mind when interpreting for output of - `mrinfo`_ for example, since this produces the strides and transform *as - interpreted by MRtrix3*, rather than those actually stored on file - although - the two representations should be strictly equivalent. If you need to inspect - the information as stored on file, use `mrinfo`_'s ``-norealign`` option. + Not all image formats support all possible datatypes. The + :ref:`mrtrix_image_formats` are designed to handle arbitrary strides, while + other image formats may only support a limited subset. When strides are + requested that are not supported by the image format, a hopefully suitable + alternative will be used instead. + + +Interaction between strides and transform +......................................... + +There is an interaction between the strides and the image transform: if the +transform matrix corresponds to a 90° rotation, this can be viewed as changing +the *strides* without affecting the transform. Such a large rotation has +changed the order of storage relative to the anatomical labels typically used +to refer to the ordering (e.g. RAS, LAS, etc). For example, if a RAS image is +modified such that its transform rotates the image axes by 90° around the *y* +axis, this in effect implies that voxels are now ordered IAR (i.e. +*right* becomes *inferior*, *anterior* remains as-is, and *superior* becomes +*right*). + +The *MRtrix3* back-end will indeed interpret such large rotations as affecting +the strides, so that if the strides are stated as ``1,2,3``, the order of +storage will always be left->right, posterior->anterior, inferior->superior +*relative to the scanner axes*. Note that this also implies that the transform +matrix will always be modified as necessary to bring it close to the standard +coordinate system, so that the first image axis is close to the *x* axis, etc. +This allows *MRtrix3* applications to operate on images in the knowledge that +these axes are always anatomically as expected, without worrying about the +details of *how* this information was actually stored on file. + +It is important to bear this in mind when interpreting for output of +:ref:`mrinfo` for example, since this produces the strides and transform *as +interpreted by MRtrix3*, rather than those actually stored on file - although +the two representations should be strictly equivalent. If you need to inspect +the information as stored on file, use :ref:`mrinfo`'s ``-norealign`` option. .. _supported_image_formats: -Supported image formats -======================= +Supported formats +------------------ + +This lists the various file formats currently supported by *MRtrix3*. + .. _mrtrix_image_formats: MRtrix image formats (``.mih / .mif``) ------------------------------------- +'''''''''''''''''''''''''''''''''''''' These MRtrix-specific image formats are closely related. They consist of a text header, with data stored in binary format, either within the same @@ -291,7 +371,7 @@ image files, and to load MRtrix tracks files. These are located in the ``matlab`` subfolder. Compressed MRtrix image format (``.mif.gz``) -'''''''''''''''''''''''''''''''''''''''''''' +............................................ *MRtrix3* also supports the compressed version of the single-file ``.mif`` format, both for reading and writing. @@ -309,7 +389,7 @@ format, both for reading and writing. manually before invoking the relevant *MRtrix3* command). Header structure -'''''''''''''''' +................ The header is the first (and possibly only) data stored in the file, as ASCII-encoded text (although other encodings such as UTF8 may work @@ -415,7 +495,7 @@ example: ``dim: 192,256,256`` specifies a 192×256×256 image. .. _mrtrix_sparse_format: MRtrix sparse image formats (``.msh / .msf``) -------------------------------------------- +''''''''''''''''''''''''''''''''''''''''''''' These new image formats are designed for applications where the number of discrete elements within a voxel may vary between voxels. The most @@ -441,7 +521,7 @@ location within the sparse image field, where the sparse data relevant for that image element can be found. Additional image header features -'''''''''''''''''''''''''''''''' +................................ These image formats have some features within the image header that differ from the standard MRtrix image formats: @@ -471,7 +551,7 @@ differ from the standard MRtrix image formats: the header. Sparse data storage -''''''''''''''''''' +................... Within the sparse data field, there is no delimiting information or identifying features; the image format relies on the integers stored in @@ -490,7 +570,7 @@ written using a straight memory copy. .. _dicom_format: DICOM (folder or ``.dcm``) ----------------- +'''''''''''''''''''''''''' DICOM format is only supported for reading. *MRtrix3* applications will assume an image is in DICOM format if the image specifier provided corresponds to a @@ -502,7 +582,7 @@ Otherwise, the user will be prompted to select the series of interest. *MRtrix3* supports data from all major manufacturers, including Siemens mosaics and the newer single-file multi-frame format. -A separate application, `dcminfo`_, is provided to view all DICOM header +A separate application, :ref:`dcminfo`, is provided to view all DICOM header elements within a particular DICOM file, including Siemens' custom shadow attributes (CSA). @@ -518,7 +598,7 @@ not match the case of the files found on the CD or DVD. .. _nifti_format: NIfTI (``.nii``) ------ +'''''''''''''''' This file format is supported both for reading and writing, and allows interoperation with other packages such as `SPM `__ @@ -531,7 +611,7 @@ own. Compressed NIfTI (``.nii.gz``) -'''''''''''''''''''''''''''''' +.............................. *MRtrix3* also supports compressed NIfTI images both for reading and writing. @@ -551,7 +631,7 @@ Compressed NIfTI (``.nii.gz``) .. _mgh_formats: FreeSurfer formats (``.mgh / .mgz``) ---------------------------------------- +'''''''''''''''''''''''''''''''''''' *MRtrix3* supports both of these formats for reading and writing. @@ -560,7 +640,7 @@ FreeSurfer formats (``.mgh / .mgz``) .. _analyze_format: Analyse format (``.img / .hdr``) ------------------------------------- +'''''''''''''''''''''''''''''''' This file format is supported both for reading and writing. However, when writing, the newer NIfTI standard will be used, since the Analyse format cannot @@ -582,10 +662,10 @@ appropriately according to the standard. .. _mrtrix_tracks_format: Tracks file format (``.tck``) -============================= +----------------------------- -The format for track files is similar to that for MRtrix-format images. -It consists of a text header in the same key: value format, ending with +The format for track files is similar to that for :ref:`mrtrix_image_formats`. +It consists of a text header in the same ``key: value`` format, ending with a single 'END' statement, and followed by binary data. The first line of the header should read ``mrtrix tracks`` to indicate diff --git a/docs/getting_started/scripts_list.rst b/docs/getting_started/scripts_list.rst index c0ed861d95..6fae14e962 100644 --- a/docs/getting_started/scripts_list.rst +++ b/docs/getting_started/scripts_list.rst @@ -3,7 +3,7 @@ Scripts for external libraries ################ -.. include:: scripts/dwipreproc.rst +.. include:: scripts/5ttgen.rst ....... @@ -15,10 +15,10 @@ Scripts for external libraries ....... -.. include:: scripts/labelsgmfix.rst +.. include:: scripts/dwipreproc.rst ....... -.. include:: scripts/5ttgen.rst +.. include:: scripts/labelsgmfix.rst .......