Biowulf High Performance Computing at the NIH
SCT: Spinal Cord Toolbox

Spinal Cord Toolbox (SCT), a comprehensive software dedicated to the processing of spinal cord MRI data. SCT builds on previously-validated methods and includes state-ofthe-art MRI templates and atlases of the spinal cord, algorithms to segment and register new data to the templates, and motion correction methods for diffusion and functional time series.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf]$ sinteractive 
[user@cn3104 ~]$ module load sct
[+] Loading gcc  6.4.0  ...
[+] Loading boost libraries v 5.11.3  ...
[+] Loading SCT 4.3  ...
[user@cn3104 ~]$ sct_check_dependencies

--
Spinal Cord Toolbox (4.3)

SCT info:
- version: 4.3
- path: /usr/local/apps/SCT/4.3/src
OS: linux (Linux-3.10.0-862.14.4.el7.x86_64-x86_64-with-centos-7.5.1804-Core)
CPU cores: Available: 56, Used by SCT: 56
RAM: MemTotal:       263836448 kB
total        used        free      shared  buff/cache   available
Mem:         257652       26782       97522           1      133348      229743
Swap:          2047          24        2023
Check Python executable.............................[OK]
  Using bundled python 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21)
[GCC 7.3.0] at /usr/local/apps/SCT/4.3/src/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if numpy is installed.........................[OK] (1.18.5)
Check if colored is installed.......................[OK] (1.4.2)
Check if dipy is installed..........................[OK] (1.1.1)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if ivadomed (1.2.1) is installed..............[OK] (1.2.1)
Check if Keras (2.1.5) is installed.................[OK] (2.1.5)
Check if matplotlib is installed....................[OK] (3.2.1)
Check if nibabel is installed.......................[OK] (3.1.0)
Check if pandas is installed........................[OK] (1.0.4)
Check if pyqt5 (5.11.3) is installed................[OK] (5.11.3)
Check if pytest is installed........................[OK] (5.4.3)
Check if pytest-cov is installed....................[OK] (2.9.0)
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.23.0)
Check if requirements-parser is installed...........[OK] (0.2.0)
Check if scipy is installed.........................[OK] (1.4.1)
Check if scikit-image is installed..................[OK] (0.17.2)
Check if scikit-learn is installed..................[OK] (0.23.1)
Check if tensorflow (1.5.0) is installed............[OK] (1.5.0)
Check if torch (1.5.0+cpu) is installed.............[OK] (1.5.0+cpu)
Check if torchvision (0.6.0+cpu) is installed.......[OK] (0.6.0+cpu)
Check if xlwt is installed..........................[OK] (1.3.0)
Check if tqdm is installed..........................[OK] (4.46.1)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3 is installed.......................[OK] (1.25.9)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if DISPLAY variable is set....................[OK]
...
Other executables sct_* available with the SCT can be listed by typing the command:
[user@cn3104 ~]$ ls $SCT_BIN
To get started, run the command:
[user@cn3104 ~]$ $SCT_DIR/batch_processing.sh
...
--
Spinal Cord Toolbox (4.3)

Trying URL: https://osf.io/kjcgs/?action=download
Downloading: 20180525_sct_example_data.zip
Status: 100%|██████████████████████████████████████████████████████| 44.3M/44.3M [00:01<00:00, 22.4MB/s]
Creating temporary folder (/tmp/sct-20200803173828.633996-djib9nx6)
Unzip data to: /tmp/sct-20200803173828.633996-djib9nx6
Destination folder: /usr/local/apps/SCT/4.3
Checking if folder already exists...
Removing temporary folders...
Done!
...
Look for template...
Path template: /usr/local/apps/SCT/4.3/src/data/PAM50

Open template and vertebral levels...

Disc values from template: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
Z-values for each disc: [962, 939, 908, 871, 834, 801, 770, 736, 693, 647, 601, 552, 501, 450, 397, 343, 290, 232, 169, 106, 56]
Distances between discs (in voxel): [23.0, 31.0, 37.0, 37.0, 33.0, 31.0, 34.0, 43.0, 46.0, 46.0, 49.0, 51.0, 51.0, 53.0, 54.0, 53.0, 58.0, 63.0, 63.0, 50.0]

Detect intervertebral discs...
Current disc: 2 (z=308). Direction: superior
.. Peak found: z=-1 (correlation = 0.5896971970624495)
Current disc: 1 (z=338). Direction: superior
.. correcting factor: 1.0
.. Switching to inferior direction.
Current disc: 3 (z=271). Direction: inferior
.. Peak found: z=-1 (correlation = 0.4784965058404901)
.. correcting factor: 1.0
...

Generate output files...
  File created: ./t2_seg_labeled.nii.gz
  File created: ./t2_seg_labeled_discs.nii.gz
  File created: ./warp_curve2straight.nii.gz
  File created: ./warp_straight2curve.nii.gz
  File created: ./straight_ref.nii.gz
...

# Display results (to easily compare integrity across SCT versions)
# ===========================================================================================
set +v
**4.3**
~~
Ran on:          Linux cn3146 3.10.0-862.14.4.el7.x86_64
Duration:        0hrs 33min 6sec
---
t2/CSA:          73.87711295363036
mt/MTR(WM):      54.418871068394935
t2s/CSA_GM:      12.487834828856178
t2s/CSA_WM:      64.93830702088246
dmri/FA(CST_r):  0.7756557415994955
dmri/FA(CST_l):  0.7801552123851562
~~
To open Quality Control (QC) report on a web-browser, run the following:
xdg-open /usr/local/apps/SCT/4.3/qc_example_data/index.html
End the interactive session:
[user@cn3104 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$