sct_detect_pmj

Detection of the Ponto-Medullary Junction (PMJ). This method is based on a machine-learning algorithm published in (Gros et al. 2018, Medical Image Analysis, https://doi.org/10.1016/j.media.2017.12.001). Two models are available: one for T1w-like and another for T2w-like images. If the PMJ is detected from the input image, a NIfTI mask is output (”*_pmj.nii.gz”) with one voxel (value=50) located at the predicted PMJ position. If the PMJ is not detected, nothing is output.

usage: sct_detect_pmj -i <file> -c {t1,t2} [-s <file>] [-ofolder <folder>]
                      [-o <file>] [-qc <str>] [-qc-dataset <str>]
                      [-qc-subject <str>] [-h] [-v <int>]
                      [-profile-time [<file>]] [-trace-memory [<folder>]]
                      [-r {0,1}]

MANDATORY ARGUMENTS

-i

Input image. Example: t2.nii.gz

-c

Possible choices: t1, t2

Type of image contrast, if your contrast is not in the available options (t1, t2), use t1 (cord bright/ CSF dark) or t2 (cord dark / CSF bright)

OPTIONAL ARGUMENTS

-s

SC segmentation or centerline mask. Provide this mask helps the detection of the PMJ by indicating the position of the SC in the Right-to-Left direction. Example: t2_seg.nii.gz

-ofolder

Output folder. Example: My_Output_Folder

-o

Output filename. Example: pmj.nii.gz

-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

-profile-time

Enables time-based profiling of the program, dumping the results to the specified file.

If no file is specified, human-readable results are placed into a ‘time_profiling_results.txt’ document in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). If the specified file is a .prof file, the file will instead be in binary format, ready for use with common post-profiler utilities (such as snakeviz).

-trace-memory

Enables memory tracing of the program.

When active, a measure of the peak memory (in KiB) will be output to the file peak_memory.txt. Optionally, developers can also modify the SCT code to add additional snapshot_memory() calls. These calls will ‘snapshot’ the memory usage at that moment, saving the memory trace at that point into a second file (memory_snapshots.txt).

By default, both outputs will be placed in the current directory (’/home/docs/checkouts/readthedocs.org/user_builds/spinalcordtoolbox/checkouts/stable/documentation/source’). Optionally, you may provide an alternative directory (-trace-memory <dir_name>), in which case all files will be placed in that directory instead. Note that this WILL incur an overhead to runtime, so it is generally advised that you do not run this in conjunction with the time profiler or in time-sensitive contexts.

-r

Possible choices: 0, 1

Remove temporary files.

Default: 1