rosella@vivi:~$ sct_testing
--
Spinal Cord Toolbox (4.2.1)
Will run through the following tests:
- sequentially: sct_deepseg_gm sct_deepseg_lesion sct_deepseg_sc
- in parallel with 8 jobs: sct_analyze_lesion sct_analyze_texture sct_apply_transfo sct_convert sct_compute_ernst_angle sct_compute_hausdorff_distance sct_compute_mtr sct_compute_mscc sct_compute_snr sct_concat_transfo sct_create_mask sct_crop_image sct_dice_coefficient sct_detect_pmj sct_dmri_compute_dti sct_dmri_concat_b0_and_dwi sct_dmri_concat_bvals sct_dmri_concat_bvecs sct_dmri_create_noisemask sct_dmri_compute_bvalue sct_dmri_moco sct_dmri_separate_b0_and_dwi sct_dmri_transpose_bvecs sct_extract_metric sct_flatten_sagittal sct_fmri_compute_tsnr sct_fmri_moco sct_get_centerline sct_image sct_label_utils sct_label_vertebrae sct_maths sct_merge_images sct_process_segmentation sct_propseg sct_qc sct_register_multimodal sct_register_to_template sct_resample sct_smooth_spinalcord sct_straighten_spinalcord sct_warp_template
Checking sct_deepseg_gm.............................[OK]
Checking sct_deepseg_lesion.........................[OK]
Checking sct_deepseg_sc.............................[OK]
Checking sct_analyze_lesion.........................[OK]
Checking sct_analyze_texture........................[OK]
Checking sct_apply_transfo..........................[OK]
Checking sct_convert................................[OK]
Checking sct_compute_ernst_angle....................[OK]
Checking sct_compute_hausdorff_distance.............[OK]
Checking sct_compute_mtr............................[OK]
Checking sct_compute_mscc...........................[OK]
Checking sct_compute_snr............................[OK]
Checking sct_concat_transfo.........................[OK]
Checking sct_create_mask............................[OK]
Checking sct_crop_image.............................[OK]
Checking sct_dice_coefficient.......................[OK]
Checking sct_detect_pmj.............................[OK]
Checking sct_dmri_compute_dti.......................[OK]
Checking sct_dmri_concat_b0_and_dwi.................[OK]
Checking sct_dmri_concat_bvals......................[OK]
Checking sct_dmri_concat_bvecs......................[OK]
Checking sct_dmri_create_noisemask..................[OK]
Checking sct_dmri_compute_bvalue....................[OK]
Checking sct_dmri_moco..............................[OK]
Checking sct_dmri_separate_b0_and_dwi...............[OK]
Checking sct_dmri_transpose_bvecs...................[OK]
Checking sct_extract_metric.........................[OK]
Checking sct_flatten_sagittal.......................[OK]
Checking sct_fmri_compute_tsnr......................[OK]
Checking sct_fmri_moco..............................[OK]
Checking sct_get_centerline.........................[OK]
Checking sct_image..................................[OK]
Checking sct_label_utils............................[OK]
Checking sct_label_vertebrae........................[FAIL]
====================================================================================================
sct_label_vertebrae -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -c t2 -initfile t2/init_label_vertebrae.txt -t template -qc testing-qc
====================================================================================================
--
Spinal Cord Toolbox (4.2.1)
Folder testing-qc has been created.
Create temporary folder (/tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i)...
Copying input data to tmp folder...
Straighten spinal cord...
Reusing existing warping field which seems to be valid
cp /home/rosella/sct_testing_data/warp_curve2straight.nii.gz warp_curve2straight.nii.gz
cp /home/rosella/sct_testing_data/warp_straight2curve.nii.gz warp_straight2curve.nii.gz
cp /home/rosella/sct_testing_data/straight_ref.nii.gz straight_ref.nii.gz
sct_apply_transfo -i data.nii -w warp_curve2straight.nii.gz -d straight_ref.nii.gz -o data_straight.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
Resample to 0.5mm isotropic...
sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
Apply straightening to segmentation...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i segmentation.nii -r data_straightr.nii -t warp_curve2straight.nii.gz -o segmentation_straight.nii -n Linear # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
sct_maths -i segmentation_straight.nii -thr 0.5 -o segmentation_straight.nii # in /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
Create label to identify disc...
Label #0: 26,29,34 --> 3
WARNING: File /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i/labelz.nii.gz already exists. Will overwrite it.
Done! To view results, type:
fsleyes /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i/labelz.nii.gz &
And apply straightening to label...
/home/rosella/sct_4.2.1/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 /tmp/sct-20200226154157.985916-label_vertebrae-d4yad18i
Get z and disc values from straight label...
.. [68, 3]
Look for template...
Path template: /home/rosella/sct_testing_data/template
Traceback (most recent call last):
File "/home/rosella/sct_4.2.1/scripts/sct_label_vertebrae.py", line 427, in <module>
main()
File "/home/rosella/sct_4.2.1/scripts/sct_label_vertebrae.py", line 372, in main
verbose=verbose, path_template=path_template, path_output=path_output, scale_dist=scale_dist)
File "/home/rosella/sct_4.2.1/spinalcordtoolbox/vertebrae/core.py", line 68, in vertebral_detection
fname_template = get_file_label(os.path.join(path_template, 'template'), id_label=id_label_dct[contrast.upper()], output='filewithpath') # label = *-weighted template
File "/home/rosella/sct_4.2.1/spinalcordtoolbox/metadata.py", line 212, in get_file_label
raise RuntimeError("Label ID {} not found in {}".format(id_label, fname_label))
RuntimeError: Label ID 1 not found in /home/rosella/sct_testing_data/template/template/info_label.txt
====================================================================================================
sct_label_vertebrae -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -c t2 -discfile t2/labels.nii.gz
====================================================================================================
--
Spinal Cord Toolbox (4.2.1)
Create temporary folder (/tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f)...
Copying input data to tmp folder...
Straighten spinal cord...
Reusing existing warping field which seems to be valid
cp /home/rosella/sct_testing_data/warp_curve2straight.nii.gz warp_curve2straight.nii.gz
cp /home/rosella/sct_testing_data/warp_straight2curve.nii.gz warp_straight2curve.nii.gz
cp /home/rosella/sct_testing_data/straight_ref.nii.gz straight_ref.nii.gz
sct_apply_transfo -i data.nii -w warp_curve2straight.nii.gz -d straight_ref.nii.gz -o data_straight.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Resample to 0.5mm isotropic...
sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Apply straightening to segmentation...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i segmentation.nii -r data_straightr.nii -t warp_curve2straight.nii.gz -o segmentation_straight.nii -n Linear # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
sct_maths -i segmentation_straight.nii -thr 0.5 -o segmentation_straight.nii # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Apply straightening to disc labels...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i /home/rosella/sct_testing_data/t2/labels.nii.gz -r data_straightr.nii -t warp_curve2straight.nii.gz -o labeldisc_straight.nii.gz -n NearestNeighbor # in /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Un-straighten labeling...
/home/rosella/sct_4.2.1/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 /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Clean labeled segmentation (correct interpolation errors)...
WARNING: File /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled.nii already exists. Will overwrite it.
Label discs...
Generate output files...
WARNING: File ./t2_seg_labeled.nii.gz already exists. Deleting it...
sct_convert -i /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled.nii -o ./t2_seg_labeled.nii.gz
File created: ./t2_seg_labeled.nii.gz
WARNING: File ./t2_seg_labeled_discs.nii.gz already exists. Deleting it...
sct_convert -i /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f/segmentation_labeled_disc.nii -o ./t2_seg_labeled_discs.nii.gz
File created: ./t2_seg_labeled_discs.nii.gz
WARNING: File ./warp_curve2straight.nii.gz already exists. Deleting it...
File created: ./warp_curve2straight.nii.gz
WARNING: File ./warp_straight2curve.nii.gz already exists. Deleting it...
File created: ./warp_straight2curve.nii.gz
WARNING: File ./straight_ref.nii.gz already exists. Deleting it...
File created: ./straight_ref.nii.gz
Remove temporary files...
rm -rf /tmp/sct-20200226154204.018783-label_vertebrae-x6lev80f
Done! To view results, type:
fsleyes /home/rosella/sct_testing_data/t2/t2.nii.gz -a 100.0 ./t2_seg_labeled.nii.gz -cm subcortical -a 50.0 &
====================================================================================================
INTEGRITY TESTING
====================================================================================================
Not implemented.
Checking sct_maths..................................[OK]
Checking sct_merge_images...........................[OK]
Checking sct_process_segmentation...................[OK]
Checking sct_propseg................................[OK]
Checking sct_qc.....................................[OK]
Checking sct_register_multimodal....................[OK]
Checking sct_register_to_template...................[FAIL]
====================================================================================================
sct_register_to_template -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -l t2/labels.nii.gz -param step=1,type=seg,algo=centermassrot,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=5,metric=MeanSquares -t template -qc qc-testing
====================================================================================================
--
Spinal Cord Toolbox (4.2.1)
Folder qc-testing has been created.
Traceback (most recent call last):
File "/home/rosella/sct_4.2.1/scripts/sct_register_to_template.py", line 807, in <module>
main()
File "/home/rosella/sct_4.2.1/scripts/sct_register_to_template.py", line 265, in main
file_template = get_file_label(os.path.join(path_template, 'template'), id_label=id_label_dct[contrast_template.upper()]) # label = *-weighted template
File "/home/rosella/sct_4.2.1/spinalcordtoolbox/metadata.py", line 212, in get_file_label
raise RuntimeError("Label ID {} not found in {}".format(id_label, fname_label))
RuntimeError: Label ID 1 not found in template/template/info_label.txt
====================================================================================================
sct_register_to_template -i t2/t2.nii.gz -s t2/t2_seg.nii.gz -ldisc t2/labels.nii.gz -ref subject
====================================================================================================
--
Spinal Cord Toolbox (4.2.1)
Estimate cord angle for each slice: 0%| | 0/55 [00:00<?, ?iter/s]
Estimate cord angle for each slice: 11%|██▊ | 6/55 [00:00<00:00, 59.82iter/s]
Estimate cord angle for each slice: 35%|████████▋ | 19/55 [00:00<00:00, 70.58iter/s]
Estimate cord angle for each slice: 64%|███████████████▉ | 35/55 [00:00<00:00, 84.78iter/s]
Estimate cord angle for each slice: 95%|███████████████████████▋ | 52/55 [00:00<00:00, 99.50iter/s]
Estimate cord angle for each slice: 100%|████████████████████████| 55/55 [00:00<00:00, 128.66iter/s]
Build 3D deformation field: 0%| | 0/55 [00:00<?, ?iter/s]
Build 3D deformation field: 11%|███▋ | 6/55 [00:00<00:00, 53.60iter/s]
Build 3D deformation field: 18%|██████ | 10/55 [00:00<00:00, 47.43iter/s]
Build 3D deformation field: 29%|█████████▌ | 16/55 [00:00<00:00, 49.76iter/s]
Build 3D deformation field: 40%|█████████████▏ | 22/55 [00:00<00:00, 51.81iter/s]
Build 3D deformation field: 51%|████████████████▊ | 28/55 [00:00<00:00, 53.36iter/s]
Build 3D deformation field: 62%|████████████████████▍ | 34/55 [00:00<00:00, 54.53iter/s]
Build 3D deformation field: 73%|████████████████████████ | 40/55 [00:00<00:00, 55.34iter/s]
Build 3D deformation field: 84%|███████████████████████████▌ | 46/55 [00:00<00:00, 55.81iter/s]
Build 3D deformation field: 95%|███████████████████████████████▏ | 52/55 [00:00<00:00, 56.26iter/s]
Build 3D deformation field: 100%|█████████████████████████████████| 55/55 [00:01<00:00, 54.62iter/s]
Check template files...
OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_t2.nii.gz
OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_levels.nii.gz
OK: /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_cord.nii.gz
Check parameters:
Data: t2/t2.nii.gz
Landmarks: t2/labels.nii.gz
Segmentation: t2/t2_seg.nii.gz
Path template: /home/rosella/sct_4.2.1/data/PAM50
Remove temp files: 1
Check input labels...
Create temporary folder (/tmp/sct-20200226154206.779172-register_to_template-60y0kbpl)...
Copying input data to tmp folder and convert to nii...
WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/template_label.nii.gz already exists. Will overwrite it.
Check if provided labels are available in the template
Binarize segmentation
Done! To view results, type:
fsleyes seg_bin.nii.gz &
Change orientation of input images to RPI...
Remove unused label on template. Keep only label present in the input label image...
sct_label_utils -i template_label.nii.gz -o template_label.nii.gz -remove-reference /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/label_projected_rpi.nii.gz # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/label_projected_rpi.nii.gz already exists. Will overwrite it.
WARNING: File /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl/template_label.nii.gz already exists. Will overwrite it.
Create temporary folder (/tmp/sct-20200226154212.995768-register-k5r630on)...
Copying input data to tmp folder and convert to nii...
--
ESTIMATE TRANSFORMATION FOR STEP #0
Registration parameters:
type ........... label
algo ........... syn
slicewise ...... 0
metric ......... MeanSquares
iter ........... 10
smooth ......... 0
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
deformation .... 1x1x0
init ...........
poly ........... 5
filter_size .... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz_Sz
smoothWarpXY ... 2
rot_method ..... pca
Labels src: [[-0.0, 46.220001220703125, -107.84002685546875], [-0.0, 46.220001220703125, -144.84002685546875], [5.0, 46.220001220703125, -107.84002685546875]]
Labels dest: [[7.2192840576171875, -1.7866058349609375, 24.678329467773438], [7.2192840576171875, -0.7866058349609375, -10.321670532226562], [12.219284057617188, -1.7866058349609375, 24.678329467773438]]
Degrees of freedom (dof): Tx_Ty_Tz_Rx_Ry_Rz_Sz
Optimization terminated successfully.
Current function value: 0.000000
Iterations: 8
Function evaluations: 870
Matrix:
[[ 1.00000000e+00 -1.11442507e-12 -9.53408633e-14]
[ 1.11669340e-12 9.99592086e-01 2.85597739e-02]
[ 6.34742443e-14 -2.85597739e-02 9.99592086e-01]]
Center:
[ 8.88595072 -1.4532725 13.0116628 ]
Translation:
[[ -7.21928406 47.67327372 -133.18502299]]
--
ESTIMATE TRANSFORMATION FOR STEP #1
Apply transformation from previous step
Parse list of warping fields...
Get dimensions of data...
141 x 141 x 991 x 1
Apply transformation...
Apply transformation and resample to destination space...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_forward_0.txt -r dest_RPI.nii -n 'BSpline[3]' # in /tmp/sct-20200226154212.995768-register-k5r630on
Copy affine matrix from destination space to make sure qform/sform are the same.
WARNING: the resulting image could have wrong apparent results. You should use an affine transformation as last transformation...
Done! To view results, type:
fsleyes dest_RPI.nii src_reg.nii &
Parse list of warping fields...
Get dimensions of data...
141 x 141 x 991 x 1
Apply transformation...
Apply transformation and resample to destination space...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src_seg.nii -o src_seg_reg.nii -t warp_forward_0.txt -r dest_seg_RPI.nii -n NearestNeighbor # in /tmp/sct-20200226154212.995768-register-k5r630on
Copy affine matrix from destination space to make sure qform/sform are the same.
WARNING: the resulting image could have wrong apparent results. You should use an affine transformation as last transformation...
Done! To view results, type:
fsleyes dest_seg_RPI.nii src_seg_reg.nii &
Registration parameters:
type ........... imseg
algo ........... centermassrot
slicewise ...... 0
metric ......... MeanSquares
iter ........... 10
smooth ......... 0
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
deformation .... 1x1x0
init ...........
poly ........... 5
filter_size .... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz
smoothWarpXY ... 2
rot_method ..... pcahog
Create temporary folder (/tmp/sct-20200226154216.417014-register-tzc546hh)...
Copy input data to temp folder...
sct_convert -i src_reg.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/src.nii
sct_convert -i src_seg_reg.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/src_seg.nii
sct_convert -i dest_RPI.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/dest.nii
sct_convert -i dest_seg_RPI.nii -o /tmp/sct-20200226154216.417014-register-tzc546hh/dest_seg.nii
Get image dimensions of destination image...
matrix size: 52 x 60 x 55
voxel size: 1.0mm x 1.0mm x 1.0mm
Split input segmentation...
Split destination segmentation...
Split input image...
Split destination image...
Generate warping field...
--> step1Warp.nii.gz
Generate warping field...
--> step1InverseWarp.nii.gz
Move warping fields...
cp step1Warp.nii.gz /tmp/sct-20200226154212.995768-register-k5r630on
cp step1InverseWarp.nii.gz /tmp/sct-20200226154212.995768-register-k5r630on
rm -rf /tmp/sct-20200226154216.417014-register-tzc546hh
--
ESTIMATE TRANSFORMATION FOR STEP #2
Apply transformation from previous step
Parse list of warping fields...
Get dimensions of data...
141 x 141 x 991 x 1
Apply transformation...
Apply transformation and resample to destination space...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src_seg.nii -o src_seg_reg.nii -t warp_forward_1.nii.gz warp_forward_0.txt -r dest_seg_RPI.nii -n NearestNeighbor # in /tmp/sct-20200226154212.995768-register-k5r630on
Copy affine matrix from destination space to make sure qform/sform are the same.
Done! To view results, type:
fsleyes dest_seg_RPI.nii src_seg_reg.nii &
Registration parameters:
type ........... seg
algo ........... bsplinesyn
slicewise ...... 0
metric ......... MeanSquares
iter ........... 3
smooth ......... 1
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
deformation .... 1x1x0
init ...........
poly ........... 5
filter_size .... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz
smoothWarpXY ... 2
rot_method ..... pca
sct_image -i dest_seg_RPI.nii -o dest_seg_RPI_pad.nii -pad 0,0,10 # in /tmp/sct-20200226154212.995768-register-k5r630on
Estimate transformation
/home/rosella/sct_4.2.1/bin/isct_antsRegistration --dimensionality 3 --transform 'bsplinesyn[0.5,1,3]' --metric 'MeanSquares[dest_seg_RPI_pad.nii,src_seg_reg.nii,1,4]' --convergence 3 --shrink-factors 1 --smoothing-sigmas 1mm --restrict-deformation 1x1x0 --output '[step2,src_seg_reg_regStep2.nii]' --interpolation 'BSpline[3]' --verbose 1 # in /tmp/sct-20200226154212.995768-register-k5r630on
Concatenate transformations...
Parse list of warping fields...
Check file existence...
OK: dest.nii
OK: warp_forward_0.txt
OK: warp_forward_1.nii.gz
OK: warp_forward_2.nii.gz
/home/rosella/sct_4.2.1/bin/isct_ComposeMultiTransform 3 warp_final.nii.gz -R dest.nii warp_forward_2.nii.gz warp_forward_1.nii.gz warp_forward_0.txt # in /tmp/sct-20200226154212.995768-register-k5r630on
Generate output files...
File created: warp_src2dest.nii.gz
Parse list of warping fields...
Check file existence...
OK: src.nii
OK: warp_inverse_2.nii.gz
OK: warp_inverse_1.nii.gz
OK: warp_forward_0.txt
/home/rosella/sct_4.2.1/bin/isct_ComposeMultiTransform 3 warp_final.nii.gz -R src.nii -i warp_forward_0.txt warp_inverse_1.nii.gz warp_inverse_2.nii.gz # in /tmp/sct-20200226154212.995768-register-k5r630on
Generate output files...
File created: warp_dest2src.nii.gz
Apply transfo source --> dest...
Parse list of warping fields...
Get dimensions of data...
141 x 141 x 991 x 1
Apply transformation...
Apply transformation and resample to destination space...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_src2dest.nii.gz -r dest.nii -n Linear # in /tmp/sct-20200226154212.995768-register-k5r630on
Copy affine matrix from destination space to make sure qform/sform are the same.
Done! To view results, type:
fsleyes dest.nii src_reg.nii &
Apply transfo dest --> source...
Parse list of warping fields...
Get dimensions of data...
52 x 60 x 55 x 1
Apply transformation...
Apply transformation and resample to destination space...
/home/rosella/sct_4.2.1/bin/isct_antsApplyTransforms -d 3 -i dest.nii -o dest_reg.nii -t warp_dest2src.nii.gz -r src.nii -n Linear # in /tmp/sct-20200226154212.995768-register-k5r630on
Copy affine matrix from destination space to make sure qform/sform are the same.
Done! To view results, type:
fsleyes src.nii dest_reg.nii &
Generate output files...
File created: template_reg.nii
File created: data_rpi_reg.nii
File created: warp_template2data_rpi.nii.gz
File created: warp_data_rpi2template.nii.gz
Remove temporary files...
rm -rf /tmp/sct-20200226154212.995768-register-k5r630on
sct_apply_transfo -i template.nii -o template2anat.nii.gz -d data.nii -w warp_template2anat.nii.gz -crop 0 # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
sct_apply_transfo -i data.nii -o anat2template.nii.gz -d template.nii -w warp_anat2template.nii.gz -crop 0 # in /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
Generate output files...
WARNING: File warp_template2anat.nii.gz already exists. Deleting it...
File created: warp_template2anat.nii.gz
WARNING: File warp_anat2template.nii.gz already exists. Deleting it...
File created: warp_anat2template.nii.gz
WARNING: File template2anat.nii.gz already exists. Deleting it...
File created: template2anat.nii.gz
WARNING: File anat2template.nii.gz already exists. Deleting it...
File created: anat2template.nii.gz
Delete temporary files...
rm -rf /tmp/sct-20200226154206.779172-register_to_template-60y0kbpl
Finished! Elapsed time: 33s
Done! To view results, type:
fsleyes t2/t2.nii.gz template2anat.nii.gz &
Done! To view results, type:
fsleyes /home/rosella/sct_4.2.1/data/PAM50/template/PAM50_t2.nii.gz anat2template.nii.gz &
====================================================================================================
INTEGRITY TESTING
====================================================================================================
Dice[seg,template_seg_reg]: 0.970088122129825
--> PASSED
Dice[seg_reg,template_seg]: 0.9427385120689121
--> PASSED
Checking sct_resample...............................[OK]
Checking sct_smooth_spinalcord......................[OK]
Checking sct_straighten_spinalcord..................[OK]
Checking sct_warp_template..........................[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
Failures: sct_label_vertebrae sct_register_to_template
Finished! Elapsed time: 86s