seg_tumor_t2

Segment an anatomical structure or pathologies according to the specified deep learning model.

usage: sct_deepseg -h [-i <file> [<file> ...]] [-c <str> [<str> ...]] [-o <str>]
                      [-task <str> [<str> ...]] [-list-tasks]
                      [-install {seg_sc_t2star,seg_mice_sc,seg_mice_gm,seg_tumor_t2,seg_tumor-edema-cavity_t1-t2,seg_exvivo_gm-wm_t2,seg_gm_sc_7t_t2star,seg_lumbar_sc_t2w,seg_sc_contrast_agnostic,seg_sc_lesion_t2w_sci,seg_spinal_rootlets_t2w,seg_mouse_gm_wm_t1w,seg_sc_epi,seg_ms_lesion_mp2rage,seg_ms_lesion,canal_t2w,totalspineseg}]
                      [-custom-url CUSTOM_URL [CUSTOM_URL ...]] [-thr <float>]
                      [-r {0,1}] [-largest KEEP_LARGEST] [-fill-holes {0,1}]
                      [-remove-small REMOVE_SMALL [REMOVE_SMALL ...]]
                      [-qc <folder>] [-qc-dataset <str>] [-qc-subject <str>]
                      [-v <int>] [-h] [-qc-plane <str>]

INPUT/OUTPUT

-i

Image to segment. Can be multiple images (separated with space).

Note: If choosing -task seg_ms_lesion_mp2rage, then the input data must be cropped around the spinal cord. (To crop the data you can first segment the spinal cord using the contrast agnostic model. This could be done using: “sct_deepseg -i IMAGE -task seg_sc_contrast_agnostic -o IMAGE_sc”, then crop the image with 30 mm of dilation on axial orientation around the spinal cord. This could be done using: “sct_crop_image -i IMAGE -m IMAGE_sc -dilate 30x30x5”. Note that 30 is only for 1mm isotropic resolution, for images with another resolution divide 30/your_axial_resolution.)

-c

Possible choices: t1, t2, t2star

Contrast of the input. The -c option is only relevant for the following tasks:

  • seg_tumor-edema-cavity_t1-t2: Specifies the contrast order of input images (e.g. -c t1 t2)

Because all other models have only a single input contrast, the -c option is ignored for them.

-o

Output file name. In case of multi-class segmentation, class-specific suffixes will be added. By default,the suffix specified in the packaged model will be added and output extension will be .nii.gz.

TASKS

-task

Task to perform. It could either be a pre-installed task, task that could be installed, or a custom task. To list available tasks, run: sct_deepseg -list-tasks. To use a custom task, indicate the path to the ivadomed packaged model (see https://ivadomed.org/en/latest/pretrained_models.html#packaged-model-format for more details). More than one path can be indicated (separated with space) for cascaded application of the models.

-list-tasks

Display a list of tasks, along with detailed descriptions (including information on how the model was trained, what data it was trained on, any performance evaluations, associated papers, etc.)

Default: False

-install, -install-task

Possible choices: seg_sc_t2star, seg_mice_sc, seg_mice_gm, seg_tumor_t2, seg_tumor-edema-cavity_t1-t2, seg_exvivo_gm-wm_t2, seg_gm_sc_7t_t2star, seg_lumbar_sc_t2w, seg_sc_contrast_agnostic, seg_sc_lesion_t2w_sci, seg_spinal_rootlets_t2w, seg_mouse_gm_wm_t1w, seg_sc_epi, seg_ms_lesion_mp2rage, seg_ms_lesion, canal_t2w, totalspineseg

Install models that are required for specified task.

-custom-url

URL(s) pointing to the .zip asset for a model release. This option can be used with -install to install a specific version of a model. To use this option, navigate to the ‘Releases’ page of the model, find release you wish to install, and right-click + copy the URL of the ‘.zip’ listed under ‘Assets’. NB: For multi-model tasks, provide multiple URLs. For single models, just provide one URL. Example: ‘sct_deepseg -install seg_spinal_rootlets_t2w -custom-url https://github.com/ivadomed/model-spinal-rootlets/releases/download/r20240523/model-spinal-rootlets_ventral_D106_r20240523.zip’ ‘sct_deepseg -i sub-amu01_T2w.nii.gz -task seg_spinal_rootlets_t2w’

PARAMETERS

-thr

Binarize segmentation with specified threshold. Set to 0 for no thresholding (i.e., soft segmentation). Default value is model-specific and was set during optimization (more info at https://github.com/sct-pipeline/deepseg-threshold).

-r

Possible choices: 0, 1

Remove temporary files.

Default: 1

-largest

Keep the largest connected-objects from the output segmentation. Specify the number of objects to keep.To keep all objects, set to 0

-fill-holes

Possible choices: 0, 1

Fill small holes in the segmentation.

-remove-small

Minimal object size to keep with unit (mm3 or vox). A single value can be provided or one value per prediction class. Single value example: 1mm3, 5vox. Multiple values example: 10 20 10vox (remove objects smaller than 10 voxels for class 1 and 3, and smaller than 20 voxels for class 2).

MISC

-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.

-v

Possible choices: 0, 1, 2

Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode

Default: 1

-qc-plane

Possible choices: Axial, Sagittal

Plane of the output QC. If Sagittal, you must also provide the -s option. Default: Axial.

Default: “Axial”