sct_fmri_moco¶
Motion correction of fMRI data. Some robust features include:
group-wise (
-g
)slice-wise regularized along z using polynomial function (
-p
). For more info about the method, type:isct_antsSliceRegularizedRegistration
masking (
-m
)iterative averaging of target volume
The outputs of the motion correction process are:
the motion-corrected fMRI volumes
the time average of the corrected fMRI volumes
a time-series with 1 voxel in the XY plane, for the X and Y motion direction (two separate files), as required for FSL analysis.
a TSV file with one row for each time point, with the slice-wise average of the motion correction magnitude for that time point, that can be used for Quality Control.
usage: sct_fmri_moco -i <file> [-g <int>] [-m <file>] [-param <list>]
[-ofolder <folder>] [-x {nn,linear,spline}] [-qc <folder>]
[-qc-seg <file>] [-qc-fps <float>] [-qc-dataset <str>]
[-qc-subject <str>] [-h] [-v <int>]
[-profile-time [<file>]] [-trace-memory [<folder>]]
[-r {0,1}]
MANDATORY ARGUMENTS¶
- -i
Input data (4D). Example:
fmri.nii.gz
OPTIONAL ARGUMENTS¶
- -g
Group nvols successive fMRI volumes for more robustness.
- -m
Binary mask to limit voxels considered by the registration metric. You may also provide a softmask (nonbinary, [0, 1]), and it will be binarized at 0.5.
- -param
Advanced parameters. Assign value with “=”; Separate arguments with “,”.
poly [int]: Degree of polynomial function used for regularization along Z. For no regularization set to 0. Default=2.
smooth [mm]: Smoothing kernel. Default=0.
iter [int]: Number of iterations. Default=10.
metric {MI, MeanSquares, CC}: Metric used for registration. Default=MeanSquares.
gradStep [float]: Searching step used by registration algorithm. The higher the more deformation allowed. Default=1.
sampling [None or 0-1]: Sampling rate used for registration metric. Default=None.
numTarget [int]: Target volume or group (starting with 0). Default=0.
iterAvg [int]: Iterative averaging: Target volume is a weighted average of the previously-registered volumes. Default=1.
- -ofolder
Output path.
Default: “.”
- -x
Possible choices: nn, linear, spline
Final interpolation.
Default: “linear”
- -qc
The path where the quality control generated content will be saved. (Note: Both
-qc
and-qc-seg
are required in order to generate a QC report.)- -qc-seg
Segmentation of spinal cord to improve cropping in qc report. (Note: Both
-qc
and-qc-seg
are required in order to generate a QC report.)- -qc-fps
This float number is the number of frames per second for the output gif images.
Default: 3
- -qc-dataset
If provided, this string will be mentioned in the QC report as the dataset the process was run on.
- -qc-subject
If provided, this string will be mentioned in the QC report as the subject the process was run on.
MISC ARGUMENTS¶
- -v
Possible choices: 0, 1, 2
Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode.
Default: 1
- -profile-time
Enables time-based profiling of the program, dumping the results to the specified file.
If no file is specified, human-readable results are placed into a ‘time_profiling_results.txt’ document in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). If the specified file is a
.prof
file, the file will instead be in binary format, ready for use with common post-profiler utilities (such assnakeviz
).- -trace-memory
Enables memory tracing of the program.
When active, a measure of the peak memory (in KiB) will be output to the file
peak_memory.txt
. Optionally, developers can also modify the SCT code to add additionalsnapshot_memory()
calls. These calls will ‘snapshot’ the memory usage at that moment, saving the memory trace at that point into a second file (memory_snapshots.txt
).By default, both outputs will be placed in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). Optionally, you may provide an alternative directory (
-trace-memory <dir_name>
), in which case all files will be placed in that directory instead. Note that this WILL incur an overhead to runtime, so it is generally advised that you do not run this in conjunction with the time profiler or in time-sensitive contexts.- -r
Possible choices: 0, 1
Remove temporary files.
Default: 1