barryrl% sct_deepseg_sc -i t2.nii -c t2 -brain 1 -kernel 2d Method: Centerline algorithm: svm Assumes brain section included in the image: True Dimension of the segmentation kernel convolutions: 2d Create temporary folder (/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082259.139081-ko23mp)... Reorient the image to RPI, if necessary... Finding the spinal cord centerline... Remove temporary files... rm -rf /var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082329.049602-puEj7p Resample the image to 0.5 mm isotropic resolution... Cropping the image around the spinal cord... Normalizing the intensity... Segmenting the spinal cord using deep learning on 2D patches... Reassembling the image... WARNING: To avoid intensity overflow due to convertion to uint8, intensity will be rescaled to the maximum quantization scale. Resampling the segmentation to the original image resolution... Binarizing the segmentation to avoid interpolation effects... Removing small objects above slice#624 Removing small objects above slice#624 Removing small objects above slice#624 Removing small objects above slice#624 Removing small objects above slice#624 Removing small objects above slice#624 Remove temporary files... rm -rf /var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082259.139081-ko23mp - - - - - barryrl% sct_label_vertebrae -i t2.nii -s t2_seg.nii -c t2 Create temporary folder (/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH)... Copying input data to tmp folder... Straighten spinal cord... sct_straighten_spinalcord -i data.nii -s segmentation.nii -r 1 # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH Resample to 0.5mm isotropic... sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH Apply straightening to segmentation... /Applications/SCT/ver_4_0_0_beta_2/bin/isct_antsApplyTransforms -d 3 -i segmentation.nii -r data_straightr.nii -t warp_curve2straight.nii.gz -o segmentation_straight.nii -n Linear # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH sct_maths -i segmentation_straight.nii -thr 0.5 -o segmentation_straight.nii # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH Create label to identify disc... Creating temporary folder... Run C2-C3 detector... C2-C3 detected... Remove temporary files... rm -rf /var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082807.365515-TPX3LK WARNING: File /var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH/labelz.nii.gz already exists. Will overwrite it. And apply straightening to label... /Applications/SCT/ver_4_0_0_beta_2/bin/isct_antsApplyTransforms -d 3 -i labelz.nii.gz -r data_straightr.nii -t warp_curve2straight.nii.gz -o labelz_straight.nii.gz -n NearestNeighbor # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH Get z and disc values from straight label... .. [23, 2] Look for template... Path template: /Applications/SCT/ver_4_0_0_beta_2/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=23). Direction: superior .. WARNING: Data contained zero. We probably hit the edge of the image. .. WARNING: Correlation vector only contains zeros. Using adjusted template distance. Current disc: 1 (z=54). Direction: superior .. correcting factor: 1.0 .. Switching to inferior direction. Adding top disc based on adjusted template distance: #0 .. approximate distance: 23 Un-straighten labeling... /Applications/SCT/ver_4_0_0_beta_2/bin/isct_antsApplyTransforms -d 3 -i segmentation_straight_labeled.nii -r segmentation.nii -t warp_straight2curve.nii.gz -o segmentation_labeled.nii -n NearestNeighbor # in /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH Clean labeled segmentation (correct interpolation errors)... WARNING: File /private/var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH/segmentation_labeled.nii already exists. Will overwrite it. Label discs... Generate output files... File created: ./t2_seg_labeled.nii File created: ./t2_seg_labeled_discs.nii File created: ./warp_curve2straight.nii.gz File created: ./warp_straight2curve.nii.gz File created: ./straight_ref.nii.gz Remove temporary files... rm -rf /var/folders/mf/5wv63z61295dcfvzm_l2llh8003jn9/T/sct-20190418082550.944241-label_vertebrae-C6DXpH