sct_compute_compression¶
C o m p u t e n o r m a l i z e d m o r p h o m e t r i c m e t r i c s t o a s s e s s : Compute normalized morphometric metrics to assess:
s p i n a l c o r d c o m p r e s s i o n u s i n g M S C C ( m a x i m u m s p i n a l c o r d c o m p r e s s i o n ) spinal cord compression using MSCC (maximum spinal cord compression)
s p i n a l c a n a l s t e n o s i s u s i n g M C C ( m a x i m u m c a n a l c o m p r o m i s e ) spinal canal stenosis using MCC (maximum canal compromise)
M e t r i c s a r e n o r m a l i z e d u s i n g t h e n o n - c o m p r e s s e d l e v e l s a b o v e a n d b e l o w t h e c o m p r e s s i o n s i t e ( o r i n j u r y s i t e w i t h l e s i o n ) u s i n g t h e f o l l o w i n g e q u a t i o n : Metrics are normalized using the non-compressed levels above and below the compression site (or injury site with lesion) using the following equation:
ratio = (1 - mi/((ma+mb)/2))
W h e r e m i : m e t r i c a t t h e c o m p r e s s i o n l e v e l , m a : m e t r i c a b o v e t h e c o m p r e s s i o n l e v e l , m b : m e t r i c b e l o w t h e c o m p r e s s i o n l e v e l . Where mi: metric at the compression level, ma: metric above the compression level, mb: metric below the compression level.
A d d i t i o n a l l y , i f t h e ` - n o r m a l i z e - h c ` f l a g i s u s e d , m e t r i c s a r e n o r m a l i z e d u s i n g a d a t a b a s e b u i l t f r o m h e a l t h y c o n t r o l s u b j e c t s . T h i s d a t a b a s e u s e s t h e P A M 5 0 t e m p l a t e a s a n a n a t o m i c a l r e f e r e n c e s y s t e m .
Additionally, if the -normalize-hc flag is used, metrics are normalized using a database built from healthy control subjects. This database uses the PAM50 template as an anatomical reference system.
R e f e r e n c e s : References:
S a n d r i n e B é d a r d , J a n V a l o š e k , M a r y a m S e i f , A r m i n C u r t , S i m o n S c h a d i n g , N i k o l a i P f e n d e r , P a t r i c k F r e u n d , M a r k u s H u p p , J u l i e n C o h e n - A d a d . N o r m a l i z i n g S p i n a l C o r d C o m p r e s s i o n M o r p h o m e t r i c M e a s u r e s : A p p l i c a t i o n i n D e g e n e r a t i v e C e r v i c a l M y e l o p a t h y . m e d R x i v 2 0 2 4 . 0 3 . 1 3 . 2 4 3 0 4 1 7 7 h t t p s : / / d o i . o r g / 1 0 . 1 1 0 1 / 2 0 2 4 . 0 3 . 1 3 . 2 4 3 0 4 1 7 7 Sandrine Bédard, Jan Valošek, Maryam Seif, Armin Curt, Simon Schading, Nikolai Pfender, Patrick Freund, Markus Hupp, Julien Cohen-Adad. Normalizing Spinal Cord Compression Morphometric Measures: Application in Degenerative Cervical Myelopathy. medRxiv 2024.03.13.24304177 https://doi.org/10.1101/2024.03.13.24304177
M i y a n j i F , F u r l a n J C , A a r a b i B , A r n o l d P M , F e h l i n g s M G . A c u t e c e r v i c a l t r a u m a t i c s p i n a l c o r d i n j u r y : M R i m a g i n g f i n d i n g s c o r r e l a t e d w i t h n e u r o l o g i c o u t c o m e - - p r o s p e c t i v e s t u d y w i t h 1 0 0 c o n s e c u t i v e p a t i e n t s . R a d i o l o g y 2 0 0 7 ; 2 4 3 [ 3 ] : 8 2 0 - 8 2 7 . h t t p s : / / d o i . o r g / 1 0 . 1 1 4 8 / r a d i o l . 2 4 3 3 0 6 0 5 8 3 Miyanji F, Furlan JC, Aarabi B, Arnold PM, Fehlings MG. Acute cervical traumatic spinal cord injury: MR imaging findings correlated with neurologic outcome–prospective study with 100 consecutive patients. Radiology 2007;243[3]:820-827. https://doi.org/10.1148/radiol.2433060583
` - n o r m a l i z e - h c ` f l a g : V a l o š e k J , B é d a r d S , K e ř k o v s k ý M , R o h a n T , C o h e n - A d a d J . A d a t a b a s e o f t h e h e a l t h y h u m a n s p i n a l c o r d m o r p h o m e t r y i n t h e P A M 5 0 t e m p l a t e s p a c e . I m a g i n g N e u r o s c i e n c e 2 0 2 4 ; 2 1 – 1 5 . h t t p s : / / d o i . o r g / 1 0 . 1 1 6 2 / i m a g _ a _ 0 0 0 7 5
-normalize-hcflag: Valošek J, Bédard S, Keřkovský M, Rohan T, Cohen-Adad J. A database of the healthy human spinal cord morphometry in the PAM50 template space. Imaging Neuroscience 2024; 2 1–15. https://doi.org/10.1162/imag_a_00075
usage: sct_compute_compression -i <file> -l <file> [-vertfile <file>]
[-mode {compression,lesion}] [-extent <float>]
[-distance <float>] [-o <file>]
[-normalize-hc <int>]
[-metric {diameter_AP,area,diameter_RL,eccentricity,solidity}]
[-sex {F,M}] [-age [0 100] [0 100]] [-h]
[-v <int>]
MANDATORY ARGUMENTS¶
- -i
S p i n a l c o r d o r s p i n a l c a n a l s e g m e n t a t i o n m a s k t o c o m p u t e m o r p h o m e t r i c s f r o m . I f s p i n a l c o r d s e g m e n t a t i o n i s p r o v i d e d , M S C C i s c o m p u t e d . I f s p i n a l c a n a l s e g m e n t a t i o n ( s p i n a l c o r d + C S F ) i s p r o v i d e d , M C C i s c o m p u t e d . E x a m p l e : ` s u b - 0 0 1 _ T 2 w _ s e g . n i i . g z ` Spinal cord or spinal canal segmentation mask to compute morphometrics from. If spinal cord segmentation is provided, MSCC is computed. If spinal canal segmentation (spinal cord + CSF) is provided, MCC is computed. Example:
sub-001_T2w_seg.nii.gzN o t e : I f n o n o r m a l i z a t i o n i s w a n t e d ( i . e . , i f t h e ` - n o r m a l i z e - h c ` f l a g i s n o t s p e c i f i e d ) , m e t r i c r a t i o w i l l t a k e t h e a v e r a g e a l o n g t h e s e g m e n t a t i o n c e n t e r l i n e . Note: If no normalization is wanted (i.e., if the
-normalize-hcflag is not specified), metric ratio will take the average along the segmentation centerline.- -l
A N I f T I f i l e t h a t i n c l u d e s e i t h e r i ) c o m p r e s s i o n l a b e l s o r i i ) l e s i o n m a s k . i ) c o m p r e s s i o n l a b e l s = l a b e l s a t t h e c o m p r e s s i o n s i t e s . E a c h c o m p r e s s i o n s i t e i s d e n o t e d b y a s i n g l e v o x e l o f v a l u e ` 1 ` . E x a m p l e : ` s u b - 0 0 1 _ T 2 w _ c o m p r e s s i o n _ l a b e l s . n i i . g z ` . U s e t h e ` - m o d e c o m p r e s s i o n ` f l a g w h e n p r o v i d i n g t h i s i n p u t . i i ) l e s i o n m a s k = b i n a r y m a s k o f t h e l e s i o n . C u r r e n t l y o n l y a s i n g l e l e s i o n i s s u p p o r t e d . E x a m p l e : ` s u b - 0 0 1 _ T 2 w _ l e s i o n . n i i . g z ` . U s e t h e ` - m o d e l e s i o n ` f l a g w h e n p r o v i d i n g t h i s i n p u t . A NIfTI file that includes either i) compression labels or ii) lesion mask. i) compression labels = labels at the compression sites. Each compression site is denoted by a single voxel of value
1. Example:sub-001_T2w_compression_labels.nii.gz. Use the-mode compressionflag when providing this input. ii) lesion mask = binary mask of the lesion. Currently only a single lesion is supported. Example:sub-001_T2w_lesion.nii.gz. Use the-mode lesionflag when providing this input.N o t e : T h e ‘ - i ‘ a n d ‘ - l ‘ f i l e s m u s t b e i n t h e s a m e v o x e l c o o r d i n a t e s y s t e m a n d m u s t m a t c h t h e d i m e n s i o n s b e t w e e n e a c h o t h e r . Note: The ‘-i’ and ‘-l’ files must be in the same voxel coordinate system and must match the dimensions between each other.
OPTIONAL ARGUMENTS¶
- -vertfile
V e r t e b r a l l a b e l i n g f i l e . E x a m p l e : ` s u b - 0 0 1 _ T 2 w _ s e g _ l a b e l e d . n i i . g z ` Vertebral labeling file. Example:
sub-001_T2w_seg_labeled.nii.gzN o t e : T h e ‘ - i ‘ a n d ‘ - v e r t f i l e ‘ f i l e s m u s t b e i n t h e s a m e v o x e l c o o r d i n a t e s y s t e m a n d m u s t m a t c h t h e d i m e n s i o n s b e t w e e n e a c h o t h e r . Note: The ‘-i’ and ‘-vertfile’ files must be in the same voxel coordinate system and must match the dimensions between each other.
- -mode
P o s s i b l e c h o i c e s : c o m p r e s s i o n , l e s i o n Possible choices: compression, lesion
C h o o s e b e t w e e n : Choose between:
c o m p r e s s i o n : u s e c o m p r e s s i o n l a b e l s ( p r o v i d e d b y t h e ‘ - l ‘ a r g ) . compression: use compression labels (provided by the ‘-l’ arg).
l e s i o n : u s e l e s i o n m a s k ( p r o v i d e d b y t h e ‘ - l ‘ a r g ) . I n t h i s c a s e , t h e l e v e l o f m a x i m u m i n j u r y i s a u t o m a t i c a l l y d e t e r m i n e d a s t h e a x i a l s l i c e w i t h i n t h e l e s i o n m a s k t h a t h a s t h e m i n i m u m s p i n a l c o r d A P d i a m e t e r . lesion: use lesion mask (provided by the ‘-l’ arg). In this case, the level of maximum injury is automatically determined as the axial slice within the lesion mask that has the minimum spinal cord AP diameter.
D e f a u l t : ` ` ‘ c o m p r e s s i o n ‘ ` ` Default:
'compression'- -extent
E x t e n t ( i n m m ) t o a v e r a g e m e t r i c s o f h e a l t h y l e v e l s i n s u p e r i o r - i n f e r i o r d i r e c t i o n . Extent (in mm) to average metrics of healthy levels in superior-inferior direction.
D e f a u l t : ` ` 2 0 . 0 ` ` Default:
20.0- -distance
D i s t a n c e ( i n m m ) i n t h e s u p e r i o r - i n f e r i o r d i r e c t i o n f r o m t h e c o m p r e s s i o n t o a v e r a g e h e a l t h y s l i c e s . Distance (in mm) in the superior-inferior direction from the compression to average healthy slices.
D e f a u l t : ` ` 1 0 . 0 ` ` Default:
10.0- -o
O u t p u t C S V f i l e n a m e . I f n o t p r o v i d e d , t h e s u f f i x ` _ c o m p r e s s i o n _ m e t r i c s ` i s a d d e d t o t h e f i l e n a m e p r o v i d e d b y t h e f l a g ` - i ` . Output CSV file name. If not provided, the suffix
_compression_metricsis added to the file name provided by the flag-i.
NORMALIZATION ARGUMENTS¶
- -normalize-hc
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
S e t t o 1 t o n o r m a l i z e t h e m e t r i c s u s i n g a d a t a b a s e o f h e a l t h y c o n t r o l s . D e f a u l t : 0 . Set to 1 to normalize the metrics using a database of healthy controls. Default: 0.
N o t e : T h i s f l a g s h o u l d n o t b e s e t t o 1 w h e n c o m p u t i n g t h e M C C ( i . e . u s i n g s p i n a l c a n a l s e g m e n t a t i o n ) , a n d s h o u l d o n l y b e u s e d w h e n c o m p u t i n g t h e M S C C ( i . e . u s i n g s p i n a l c o r d s e g m e n t a t i o n ) . Note: This flag should not be set to 1 when computing the MCC (i.e. using spinal canal segmentation), and should only be used when computing the MSCC (i.e. using spinal cord segmentation).
- -metric
P o s s i b l e c h o i c e s : d i a m e t e r _ A P , a r e a , d i a m e t e r _ R L , e c c e n t r i c i t y , s o l i d i t y Possible choices: diameter_AP, area, diameter_RL, eccentricity, solidity
M e t r i c t o n o r m a l i z e . Metric to normalize.
D e f a u l t : ` ` ‘ d i a m e t e r _ A P ‘ ` ` Default:
'diameter_AP'- -sex
P o s s i b l e c h o i c e s : F , M Possible choices: F, M
S e x o f h e a l t h y s u b j e c t t o u s e f o r t h e n o r m a l i z a t i o n . B y d e f a u l t , b o t h s e x e s a r e u s e d . Sex of healthy subject to use for the normalization. By default, both sexes are used.
- -age
A g e r a n g e o f h e a l t h y s u b j e c t s t o u s e f o r t h e n o r m a l i z a t i o n . E x a m p l e : ` - a g e 6 0 8 0 ` . B y d e f a u l t , a l l a g e s a r e c o n s i d e r e d . Age range of healthy subjects to use for the normalization. Example:
-age 60 80. By default, all ages are considered.
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