External Email - Use Caution
Hi,
I am passing synthstrip an nii.gz file, and it keeps giving the error "ValueError: cannot determine file format from extension for test " (full error below). Any suggestions on how to fix this issue? The nifti files was made from dicom images using dcm2nnix.
Thanks!
Salil
Configuring model on the CPU Running SynthStrip model version 1 Input image read from: test.nii.gz Traceback (most recent call last): File "/usr/local/freesurfer/7.3.2//python/scripts/mri_synthstrip", line 245, in <module> image.save(args.out) File "/usr/local/freesurfer/7.3.2/python/lib/python3.8/site-packages/surfa/core/framed.py", line 274, in save save_framed_array(self, filename, fmt=fmt) File "/usr/local/freesurfer/7.3.2/python/lib/python3.8/site-packages/surfa/io/framed.py", line 136, in save_framed_array raise ValueError(f'cannot determine file format from extension for {filename}') ValueError: cannot determine file format from extension for test
Hmmm, trying mri_convert file.nii.gz file.mgz
Then give file.mgz to synthstrip. I thought it would work with nifty, but maybe not?
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Salil Soman Sent: Wednesday, April 5, 2023 8:11 PM To: free surfer freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] synthstrip error
External Email - Use Caution Hi,
I am passing synthstrip an nii.gz file, and it keeps giving the error "ValueError: cannot determine file format from extension for test " (full error below). Any suggestions on how to fix this issue? The nifti files was made from dicom images using dcm2nnix.
Thanks!
Salil
Configuring model on the CPU Running SynthStrip model version 1 Input image read from: test.nii.gz Traceback (most recent call last): File "/usr/local/freesurfer/7.3.2//python/scripts/mri_synthstrip", line 245, in <module> image.save(args.out) File "/usr/local/freesurfer/7.3.2/python/lib/python3.8/site-packages/surfa/core/framed.py", line 274, in save save_framed_array(self, filename, fmt=fmt) File "/usr/local/freesurfer/7.3.2/python/lib/python3.8/site-packages/surfa/io/framed.py", line 136, in save_framed_array raise ValueError(f'cannot determine file format from extension for {filename}') ValueError: cannot determine file format from extension for test
freesurfer@nmr.mgh.harvard.edu