sct_get_centerline¶
T h i s f u n c t i o n e x t r a c t s t h e s p i n a l c o r d c e n t e r l i n e . T h r e e m e t h o d s a r e a v a i l a b l e : ‘ o p t i c ‘ ( a u t o m a t i c ) , ‘ v i e w e r ‘ ( m a n u a l ) , a n d ‘ f i t s e g ‘ ( a p p l i e d o n s e g m e n t e d i m a g e ) . T h e s e f u n c t i o n s o u t p u t ( i ) a N I F T I f i l e w i t h l a b e l s c o r r e s p o n d i n g t o t h e d i s c r e t e c e n t e r l i n e , a n d ( i i ) a c s v f i l e c o n t a i n i n g t h e f l o a t ( m o r e p r e c i s e ) c o o r d i n a t e s o f t h e c e n t e r l i n e i n t h e R P I o r i e n t a t i o n . 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.
R e f e r e n c e : C G r o s , B D e L e e n e r , e t a l . A u t o m a t i c s p i n a l c o r d l o c a l i z a t i o n , r o b u s t t o M R I c o n t r a s t u s i n g g l o b a l c u r v e o p t i m i z a t i o n ( 2 0 1 7 ) . d o i . o r g / 1 0 . 1 0 1 6 / j . m e d i a . 2 0 1 7 . 1 2 . 0 0 1 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
I n p u t i m a g e . E x a m p l e : ` t 1 . n i i . g z ` Input image. Example:
t1.nii.gz
OPTIONAL ARGUMENTS¶
- -method
P o s s i b l e c h o i c e s : o p t i c , v i e w e r , f i t s e g Possible choices: optic, viewer, fitseg
M e t h o d u s e d f o r e x t r a c t i n g t h e c e n t e r l i n e . Method used for extracting the centerline.
` o p t i c ` : a u t o m a t i c s p i n a l c o r d d e t e c t i o n m e t h o d
optic: automatic spinal cord detection method` v i e w e r ` : m a n u a l s e l e c t i o n a f e w p o i n t s f o l l o w e d b y i n t e r p o l a t i o n
viewer: manual selection a few points followed by interpolation` f i t s e g ` : f i t a r e g u l a r i z e d c e n t e r l i n e o n a n a l r e a d y - e x i s t i n g c o r d s e g m e n t a t i o n . T h i s m e t h o d w i l l i n t e r p o l a t e i f a n y s l i c e s a r e m i s s i n g . A l s o , i f ` - e x t r a p o l a t i o n 1 ` i s s p e c i f i e d , t h i s m e t h o d w i l l e x t r a p o l a t e b e y o n d t h e s e g m e n t a t i o n b o u n d a r i e s ( i . e . , e v e r y a x i a l s l i c e w i l l e x h i b i t a c e n t e r l i n e p i x e l ) .
fitseg: 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).
D e f a u l t : ` ` ‘ o p t i c ‘ ` ` Default:
'optic'- -c
P o s s i b l e c h o i c e s : t 1 , t 2 , t 2 s , d w i Possible choices: t1, t2, t2s, dwi
T y p e o f i m a g e c o n t r a s t . O n l y r e l e v a n t w i t h ` - m e t h o d o p t i c ` . Type of image contrast. Only relevant with
-method optic.- -centerline-algo
P o s s i b l e c h o i c e s : p o l y f i t , b s p l i n e , l i n e a r , n u r b s Possible choices: polyfit, bspline, linear, nurbs
A l g o r i t h m f o r c e n t e r l i n e f i t t i n g . O n l y r e l e v a n t w i t h ` - m e t h o d f i t s e g ` . Algorithm for centerline fitting. Only relevant with
-method fitseg.D e f a u l t : ` ` ‘ b s p l i n e ‘ ` ` Default:
'bspline'- -centerline-smooth
D e g r e e o f s m o o t h i n g f o r c e n t e r l i n e f i t t i n g . O n l y r e l e v a n t w i t h ` - c e n t e r l i n e - a l g o { b s p l i n e , l i n e a r } ` . Degree of smoothing for centerline fitting. Only relevant with
-centerline-algo {bspline, linear}.D e f a u l t : ` ` 3 0 ` ` Default:
30- -centerline-soft
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
B i n a r y o r s o f t c e n t e r l i n e . ` 0 ` = b i n a r i z e d , ` 1 ` = s o f t . O n l y r e l e v a n t w i t h ` - m e t h o d f i t s e g ` . Binary or soft centerline.
0= binarized,1= soft. Only relevant with-method fitseg.D e f a u l t : ` ` 0 ` ` Default:
0- -space
P o s s i b l e c h o i c e s : p i x , p h y s Possible choices: pix, phys
T h e c o o r d i n a t e s p a c e t o u s e f o r u n i t s w h e n o u t p u t t i n g t h e c e n t e r l i n e c o o r d i n a t e s t o a . c s v f i l e . ‘ p i x ‘ = p i x e l d i m e n s i o n s , ‘ p h y s ‘ = p h y s i c a l d i m e n s i o n s . The coordinate space to use for units when outputting the centerline coordinates to a .csv file.’pix’=pixel dimensions, ‘phys’=physical dimensions.
D e f a u l t : ` ` ‘ p i x ‘ ` ` Default:
'pix'- -extrapolation
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
E x t r a p o l a t e b e y o n d t h e s e g m e n t a t i o n b o u n d a r i e s . ` 0 ` = n o e x t r a p o l a t i o n , ` 1 ` = e x t r a p o l a t i o n . O n l y r e l e v a n t w i t h ` - m e t h o d f i t s e g ` . N o t e : ` - e x t r a p o l a t i o n 1 ` w o r k s b e s t w i t h l o w e r - o r d e r ( l i n e a r , n u r b s ) c e n t e r l i n e f i t t i n g a l g o r i t h m s 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 algorithmsD e f a u l t : ` ` 0 ` ` Default:
0- -o
F i l e n a m e f o r t h e c e n t e r l i n e o u t p u t f i l e . I f f i l e e x t e n s i o n i s n o t p r o v i d e d , ` . n i i . g z ` w i l l b e u s e d b y d e f a u l t . I f ` - o ` i s n o t p r o v i d e d , t h e n t h e o u t p u t f i l e w i l l b e t h e i n p u t w i t h s u f f i x ` _ c e n t e r l i n e ` . E x a m p l e : ` c e n t e r l i n e _ o p t i c . n i i . g z ` 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
G a p i n m m b e t w e e n m a n u a l l y s e l e c t e d p o i n t s . O n l y w i t h m e t h o d = v i e w e r . Gap in mm between manually selected points. Only with method=viewer.
D e f a u l t : ` ` 2 0 . 0 ` ` Default:
20.0- -qc
T h e p a t h w h e r e t h e q u a l i t y c o n t r o l g e n e r a t e d c o n t e n t w i l l b e s a v e d . The path where the quality control generated content will be saved.
- -qc-dataset
I f p r o v i d e d , t h i s s t r i n g w i l l b e m e n t i o n e d i n t h e Q C r e p o r t a s t h e d a t a s e t t h e p r o c e s s w a s r u n o n . If provided, this string will be mentioned in the QC report as the dataset the process was run on.
- -qc-subject
I f p r o v i d e d , t h i s s t r i n g w i l l b e m e n t i o n e d i n t h e Q C r e p o r t a s t h e s u b j e c t t h e p r o c e s s w a s r u n o n . If provided, this string will be mentioned in the QC report as the subject the process was run on.
MISC ARGUMENTS¶
- -v
P o s s i b l e c h o i c e s : 0 , 1 , 2 Possible choices: 0, 1, 2
V e r b o s i t y . 0 : D i s p l a y o n l y e r r o r s / w a r n i n g s , 1 : E r r o r s / w a r n i n g s + i n f o m e s s a g e s , 2 : D e b u g m o d e . Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode.
D e f a u l t : ` ` 1 ` ` Default:
1- -r
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
R e m o v e t e m p o r a r y f i l e s . Remove temporary files.
D e f a u l t : ` ` 1 ` ` Default:
1