sct_get_centerline¶
This function extracts the spinal cord centerline. Three methods are available: ‘optic’ (automatic), ‘viewer’ (manual), and ‘fitseg’ (applied on segmented image). These functions output (i) a NIFTI file with labels corresponding to the discrete centerline, and (ii) a csv file containing the float (more precise) coordinates of the centerline in the RPI orientation.
Reference: C Gros, B De Leener, et al. Automatic spinal cord localization, robust to MRI contrast using global curve optimization (2017). doi.org/10.1016/j.media.2017.12.001
usage: sct_get_centerline -i <file> [-method {optic,viewer,fitseg}]
[-c {t1,t2,t2s,dwi}]
[-centerline-algo {polyfit,bspline,linear,nurbs}]
[-centerline-smooth <int>] [-centerline-soft <int>]
[-space <str>] [-extrapolation <int>] [-o <file>]
[-gap <float>] [-qc <folder>] [-qc-dataset <str>]
[-qc-subject <str>] [-h] [-v <int>] [-r {0,1}]
MANDATORY ARGUMENTS¶
- -i
Input image. Example:
t1.nii.gz
OPTIONAL ARGUMENTS¶
- -method
Possible choices: optic, viewer, fitseg
Method used for extracting the centerline.
optic: automatic spinal cord detection methodviewer: manual selection a few points followed by interpolationfitseg: fit a regularized centerline on an already-existing cord segmentation. This method will interpolate if any slices are missing. Also, if-extrapolation 1is specified, this method will extrapolate beyond the segmentation boundaries (i.e., every axial slice will exhibit a centerline pixel).
Default:
'optic'- -c
Possible choices: t1, t2, t2s, dwi
Type of image contrast. Only relevant with
-method optic.- -centerline-algo
Possible choices: polyfit, bspline, linear, nurbs
Algorithm for centerline fitting. Only relevant with
-method fitseg.Default:
'bspline'- -centerline-smooth
Degree of smoothing for centerline fitting. Only relevant with
-centerline-algo {bspline, linear}.Default:
30- -centerline-soft
Possible choices: 0, 1
Binary or soft centerline.
0= binarized,1= soft. Only relevant with-method fitseg.Default:
0- -space
Possible choices: pix, phys
The coordinate space to use for units when outputting the centerline coordinates to a .csv file.’pix’=pixel dimensions, ‘phys’=physical dimensions.
Default:
'pix'- -extrapolation
Possible choices: 0, 1
Extrapolate beyond the segmentation boundaries.
0= no extrapolation,1= extrapolation. Only relevant with-method fitseg.Note:-extrapolation 1works best with lower-order (linear, nurbs) centerline fitting algorithmsDefault:
0- -o
File name for the centerline output file. If file extension is not provided,
.nii.gzwill be used by default. If-ois not provided, then the output file will be the input with suffix_centerline. Example:centerline_optic.nii.gz- -gap
Gap in mm between manually selected points. Only with method=viewer.
Default:
20.0- -qc
The path where the quality control generated content will be saved.
- -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- -r
Possible choices: 0, 1
Remove temporary files.
Default:
1