sct_propseg¶
This program segments automatically the spinal cord on T1- and T2-weighted images, for any field of view. You must provide the type of contrast, the image as well as the output folder path. The segmentation follows the spinal cord centerline, which is provided by an automatic tool: Optic. The initialization of the segmentation is made on the median slice of the centerline, and can be adjusted using the -init
parameter. The initial radius of the tubular mesh that will be propagated should be adapted to size of the spinal cord on the initial propagation slice.
Primary output is the binary mask of the spinal cord segmentation. This method must provide VTK triangular mesh of the segmentation (option -mesh
). Spinal cord centerline is available as a binary image (-centerline-binary
) or a text file with coordinates in world referential (-centerline-coord
).
Cross-sectional areas along the spinal cord can be available (-cross
). Several tips on segmentation correction can be found on the ‘Correcting sct_propseg’ page in the Tutorials section of the documentation.
If the segmentation fails at some location (e.g. due to poor contrast between spinal cord and CSF), edit your anatomical image (e.g. with fslview) and manually enhance the contrast by adding bright values around the spinal cord for T2-weighted images (dark values for T1-weighted). Then, launch the segmentation again.
References:
usage: sct_propseg -i <file> -c {t1,t2,t2s,dwi} [-h] [-o <file>]
[-ofolder <folder>] [-down <int>] [-up <int>] [-r <int>]
[-v <int>] [-mesh] [-centerline-binary] [-CSF]
[-centerline-coord] [-cross] [-init-tube]
[-low-resolution-mesh] [-init-centerline <file>]
[-init <float>] [-init-mask <file>] [-mask-correction <file>]
[-rescale <float>] [-radius <float>] [-nbiter <int>]
[-max-area <float>] [-max-deformation <float>]
[-min-contrast <float>] [-d <float>]
[-distance-search <float>] [-alpha <float>] [-qc <folder>]
[-qc-dataset <str>] [-qc-subject <str>] [-correct-seg <int>]
MANDATORY ARGUMENTS¶
- -i
Input image. Example: ti.nii.gz
- -c
Possible choices: t1, t2, t2s, dwi
Type of image contrast. If your contrast is not in the available options (t1, t2, t2s, dwi), use t1 (cord bright / CSF dark) or t2 (cord dark / CSF bright)
OPTIONAL ARGUMENTS¶
- -o
Output filename. Example: spinal_seg.nii.gz
- -ofolder
Output folder.
- -down
Down limit of the propagation. Default is 0.
- -up
Up limit of the propagation. Default is the highest slice of the image.
- -r
Possible choices: 0, 1
Whether to remove temporary files. 0 = no, 1 = yes
Default: 1
- -v
Possible choices: 0, 1, 2
Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode
Default: 1
- -mesh
Output: mesh of the spinal cord segmentation
Default: False
- -centerline-binary
Output: centerline as a binary image.
Default: False
- -CSF
Output: CSF segmentation.
Default: False
- -centerline-coord
Output: centerline in world coordinates.
Default: False
- -cross
Output: cross-sectional areas.
Default: False
- -init-tube
Output: initial tubular meshes.
Default: False
- -low-resolution-mesh
Output: low-resolution mesh.
Default: False
- -init-centerline
Filename of centerline to use for the propagation. Use format
.txt
or.nii
; see file structure in documentation.Replace filename by
viewer
to use interactive viewer for providing centerline. Example:-init-centerline viewer
- -init
Axial slice where the propagation starts, default is middle axial slice.
- -init-mask
Mask containing three center of the spinal cord, used to initiate the propagation.
Replace filename by
viewer
to use interactive viewer for providing mask. Example:-init-mask viewer
- -mask-correction
mask containing binary pixels at edges of the spinal cord on which the segmentation algorithm will be forced to register the surface. Can be used in case of poor/missing contrast between spinal cord and CSF or in the presence of artefacts/pathologies.
- -rescale
Rescale the image (only the header, not the data) in order to enable segmentation on spinal cords with dimensions different than that of humans (e.g., mice, rats, elephants, etc.). For example, if the spinal cord is 2x smaller than that of human, then use
-rescale 2
Default: 1.0
- -radius
Approximate radius (in mm) of the spinal cord. Default is 4.
- -nbiter
Stop condition (affects only the Z propogation): number of iteration for the propagation for both direction. Default is 200.
- -max-area
[mm^2], stop condition (affects only the Z propogation): maximum cross-sectional area. Default is 120.
- -max-deformation
[mm], stop condition (affects only the Z propogation): maximum deformation per iteration. Default is 2.5
- -min-contrast
[intensity value], stop condition (affects only the Z propogation): minimum local SC/CSF contrast, default is 50
- -d
trade-off between distance of most promising point (d is high) and feature strength (d is low), default depend on the contrast. Range of values from 0 to 50. 15-25 values show good results. Default is 10.
- -distance-search
maximum distance of optimal points computation along the surface normals. Range of values from 0 to 30. Default is 15
- -alpha
Trade-off between internal (alpha is high) and external (alpha is low) forces. Range of values from 0 to 50. Default is 25.
- -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.
- -correct-seg
Possible choices: 0, 1
Enable (1) or disable (0) the algorithm that checks and correct the output segmentation. More specifically, the algorithm checks if the segmentation is consistent with the centerline provided by isct_propseg.
Default: 1