CSA question: missing './label/template/PAM50_levels.nii.gz'

Hi SCT team,

We were thinking of looking at some spinal cord area measurements in our subjects - we’ve gone through the usual steps, but appear to be missing something:

running:

sct_process_segmentation -i sanlm_structural_seg.nii.gz -p csa -vert 3:9 -perlevel 1 -o csa_perlevel.csv 

gives:

Compute CSA...
WARNING: Your segmentation does not seem continuous, which could cause wrong estimations at the problematic slices. Please check it, especially at the extremities.

Remove temporary files...
rm -rf /var/folders/y_/1ktpkszd3qqdqf18pv7qsrkh0000gn/T/sct-20190312195700.531761-p3TWJZ
Traceback (most recent call last):
  File "/Users/jon/sct_4.0.0-beta.1/scripts/sct_process_segmentation.py", line 256, in <module>
    main(sys.argv[1:])
  File "/Users/jon/sct_4.0.0-beta.1/scripts/sct_process_segmentation.py", line 223, in main
    group_funcs=group_funcs)
  File "/Users/jon/sct_4.0.0-beta.1/spinalcordtoolbox/aggregate_slicewise.py", line 79, in aggregate_per_slice_or_level
    im_vert_level = Image(vert_level).change_orientation('RPI')
  File "/Users/jon/sct_4.0.0-beta.1/spinalcordtoolbox/image.py", line 235, in __init__
    self.loadFromPath(param, verbose)
  File "/Users/jon/sct_4.0.0-beta.1/spinalcordtoolbox/image.py", line 318, in loadFromPath
    self.im_file = nibabel.load(path)
  File "/Users/jon/sct_4.0.0-beta.1/python/lib/python2.7/site-packages/nibabel/loadsave.py", line 40, in load
    raise FileNotFoundError("No such file: '%s'" % filename)
nibabel.py3k.FileNotFoundError: No such file: './label/template/PAM50_levels.nii.gz'
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
Total processing time: 0 min 4 s

Should the missing file ‘./label/template/PAM50_levels.nii.gz’ be generated automatically by sct_register_to_template or do we need to create it manually? I guess that pointing -vertfile to the PAM50_levels.nii.gz in $SCT_DIR/data/PAM50/template/ would be the wrong thing as it hasn’t been transformed into the space of the subject?

Any pointers to what I’m doing wrong?

Cheers, Jon

Seek and ye shall find:
https://sourceforge.net/p/spinalcordtoolbox/discussion/help/thread/b86287f3/#1775

sct_warp_template!!!

Should we be worried about the non-continuous segmentation - it looks continuous to me!

Cheers,
Jon

awesome! problem easily solved :slight_smile: