Re: [Freesurfer] recon-all-clinical synthseg error

2024-03-04 Thread Agata Wolna
External Email - Use Caution

Hi!

I've managed to debug the problem and it turns out that it was generated by
the mri_convert function - it produced a corrupted native.mgz image that
synthseg couldn't correctly read. I encounter this problem when pulling the
freesurfer:7.4.1 from dockerhub and when I was using a version downloaded
from the freesurfer website. Replacing the mri_convert script with a one
from a previous release (7.1.1) solved the problem, but I'm just letting
you know, in case that's a more general issue (and in all cases I was
running the script in a singularity containers).

Best wishes,
Agata

pon., 26 lut 2024 o 11:02 Agata Wolna  napisał(a):

> Hi!
>
> Thanks for getting back to me. I'm running it on CentOS Linux 7 in a
> singularity container. What I did is to pull the freesurfer container from
> the DockerHub 
> (https://secure-web.cisco.com/171ahSlRX4vDMQD6prCFbKOWLRaTb3TeYqaUPEw1RHNCsVe3tGhp2kLFzWK3DJBLSx-UgUbpykn2uadM_p35sDDmGGUu-97iv7xWk1uOF7fCA5zzinTnVGh-ThVdtMXCb9wrWbtVUluLHZqPDir9P61Y41lyQx6J8ExkHyMN3nDhsdJG3NKQ0YCbHpN6OXcbMXy6k6AGFamQP8CZo_1lxhCV5WCZD26w_wkehvkhvpWl7Dd8-79VHNEEopR-cjICmGSqmg7GHDHiBc1SkoGDf-Hrij5PrwTlD6yLqb5U83FrN3wzFoW9dq-kjChSC2PKLUxnb8MKiKmHqCpn6WhL36g/https%3A%2F%2Fhub.docker.com%2Fr%2Ffreesurfer%2Ffreesurfer%3A7.1.1)
>  and
> I replaced the /usr/local/freesurfer with this version:
> https://secure-web.cisco.com/1kTRkrixWgWU1iw8Qqe5X9q-Fz5Cs0dBxd03uelbVyK3aahbt-NDyUMFDpzSxsqPZKM2WUqoyOMnywfNkFMZP_5uzLcnYmhRlPJwt6eoOMbmo_-bFRvK9YV6H-tS6FGTlH7lZCDQw4Tr2_WlN4a-2ByEqPmRw_RHrKq8SU2Sk4aNDWHoS5lPwMqIs5td3Mpd2KWBbQCJ7f20xoIDdqxcxnMQ5K3m5nC2y5sS1QzfGMOTXHSLiC-7D-Dr218ggnoS6u3Eg-UqVFYGtZZm_ACvQ6OSAYJ7z7VdTRgX6PRuMv1mQLduPWJ1CXUv1RmUDCBI4mZKBJZd0GkBTpL_9yzF30w/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2Fdev%2F
>  (build-stamp
> is freesurfer-linux-centos7_x86_64-dev-20240209-8d5b885).
>
> Do you think that this might be an issue related to the differences in
> dependencies for the 7.1.1 and the dev version that I replaced the 7.1.1
> with? Also, if you happen to have a containerized version of the newest dev
> version (or any version higher than 7.4, as I assume they would all support
> the recon-all-clinical function, right?) maybe I could just pull the entire
> container from somewhere and see if it solves the problem?
>
> Best wishes,
> Agata
>
> niedz., 25 lut 2024 o 21:56 fsbuild  napisał(a):
>
>>
>> It could help to know what OS version and what Freesurfer version you are
>> running.  From your path /usr/local/freesurfer it looks like you are
>> running a Freesurfer release, e.g.., 7.4.1.
>>
>> - R.
>>
>> On Feb 25, 2024, at 21:45, Agata Wolna  wrote:
>>
>> External Email - Use Caution
>>
>> Hi!
>>
>> I'm trying to run recon-all-clinical but I'm running into an error with
>> the SynthSeg at the very beginning. Do you have any hints what the problem
>> might be here? Here's the full error message:
>>
>> the following problem occured with image [mypath]/mri/native..mgz :
>> Traceback (most recent call last):
>>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 303, in
>> predict
>> image, aff, h, im_res, shape, pad_idx, crop_idx =
>> preprocess(path_image=path_images[i],
>>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 554, in
>> preprocess
>> im, _, aff, n_dims, n_channels, h, im_res =
>> get_volume_info(path_image, True)
>>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1456, in
>> get_volume_info
>> im, aff, header = load_volume(path_volume, im_only=False)
>>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1377, in
>> load_volume
>> x = nib.load(path_volume)
>>   File
>> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/loadsave.py",
>> line 110, in load
>> img = image_klass.from_filename(filename, **kwargs)
>>   File
>> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/dataobj_images.py",
>> line 503, in from_filename
>> return klass.from_file_map(file_map, mmap=mmap,
>> keep_file_open=keep_file_open)
>>   File
>> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
>> line 526, in from_file_map
>> header = klass.header_class.from_fileobj(mghf)
>>   File
>> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
>> line 171, in from_fileobj
>> + int(klass._data_type_codes.bytespervox[tp]) *
>> np.prod(hdr_str_to_np['dims'])
>> KeyError: 10
>>
>> resuming program execution
>>
>>
>> ERROR: some problems occured for the following inputs (see corresponding
>> errors above):
>> [mypath]/mri/native..mgz
>> Error in SynthSeg
>>
>> Best,
>> Agata
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> 

Re: [Freesurfer] recon-all-clinical synthseg error

2024-02-26 Thread Agata Wolna
External Email - Use Caution

Hi!

Thanks for getting back to me. I'm running it on CentOS Linux 7 in a
singularity container. What I did is to pull the freesurfer container from
the DockerHub 
(https://secure-web.cisco.com/1mn_DXGJRkbRZaR60gIIXGTJuR-LMjZIaTJCeez5OyFU1R7CR20ybjGOUz4tzd1AxyLGwPEti0x8dbFUB84ln0O_02-s6U0uTIK8MKNSC2PQi8YfCoEy1p0wItYQUPIb5iUXIN6xmG1NisixJAmoRH2aeiF1Hp2ua8Vwv7N3sV2qz3yq-FulWe5CIozSDdVtKxL-8HDqKu5m6Qmq6GfHUwkb68AW0vPu6pVuINPmzlucZN1FMBI-oVzetjru-RxRd8CEUnQYS0kfVzJqg3J8RkaraRyC-2GgBwrxi-VPObQTTobQn8Ty4Vssycv8t2gGm0EGMq-eSNszHNtFSMXl9qw/https%3A%2F%2Fhub.docker.com%2Fr%2Ffreesurfer%2Ffreesurfer%3A7.1.1)
 and I
replaced the /usr/local/freesurfer with this version:
https://secure-web.cisco.com/1VhsOWK6YuynPJZSTzGZep_xoqWFKijIbzVFTJkUW7wK3Iy1o63M730diiMYWK024Swr3mw9BBOIoTghZHgsLX-zhfP6VJWPQXHIZMmwb38t5iynLb8UTlDh2ES7braGKK28KbwDzrtuKHr6KKC__ikcHay2_nyeyuJS4IwgMAiqy9kk1c_jRMvKIvmNtHZnGGZHc2CGMi8aPtk5G4xQDteY56lAA64yYnRe_Lps-504c6Cz_3e4Nn8HCIblzADgs-Wd5j6sMe98DjAVApWr795qdo3M4CC3109D_5-l10o8bPlPWv6GeKT8TnmDAKUfThVbrpLKOB8jq9QJ6Pm1jmQ/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2Fdev%2F
 (build-stamp
is freesurfer-linux-centos7_x86_64-dev-20240209-8d5b885).

Do you think that this might be an issue related to the differences in
dependencies for the 7.1.1 and the dev version that I replaced the 7.1.1
with? Also, if you happen to have a containerized version of the newest dev
version (or any version higher than 7.4, as I assume they would all support
the recon-all-clinical function, right?) maybe I could just pull the entire
container from somewhere and see if it solves the problem?

Best wishes,
Agata

niedz., 25 lut 2024 o 21:56 fsbuild  napisał(a):

>
> It could help to know what OS version and what Freesurfer version you are
> running.  From your path /usr/local/freesurfer it looks like you are
> running a Freesurfer release, e.g.., 7.4.1.
>
> - R.
>
> On Feb 25, 2024, at 21:45, Agata Wolna  wrote:
>
> External Email - Use Caution
>
> Hi!
>
> I'm trying to run recon-all-clinical but I'm running into an error with
> the SynthSeg at the very beginning. Do you have any hints what the problem
> might be here? Here's the full error message:
>
> the following problem occured with image [mypath]/mri/native..mgz :
> Traceback (most recent call last):
>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 303, in
> predict
> image, aff, h, im_res, shape, pad_idx, crop_idx =
> preprocess(path_image=path_images[i],
>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 554, in
> preprocess
> im, _, aff, n_dims, n_channels, h, im_res =
> get_volume_info(path_image, True)
>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1456, in
> get_volume_info
> im, aff, header = load_volume(path_volume, im_only=False)
>   File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1377, in
> load_volume
> x = nib.load(path_volume)
>   File
> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/loadsave.py",
> line 110, in load
> img = image_klass.from_filename(filename, **kwargs)
>   File
> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/dataobj_images.py",
> line 503, in from_filename
> return klass.from_file_map(file_map, mmap=mmap,
> keep_file_open=keep_file_open)
>   File
> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
> line 526, in from_file_map
> header = klass.header_class.from_fileobj(mghf)
>   File
> "/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
> line 171, in from_fileobj
> + int(klass._data_type_codes.bytespervox[tp]) *
> np.prod(hdr_str_to_np['dims'])
> KeyError: 10
>
> resuming program execution
>
>
> ERROR: some problems occured for the following inputs (see corresponding
> errors above):
> [mypath]/mri/native..mgz
> Error in SynthSeg
>
> Best,
> Agata
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1ErCkj9oNHbp_bA7yCLdfBWvX7scb1cY07IHh6AQwlr0Q3zCJ4IcHFkxbZr9N9-Fb3p_7f_Rj7fgU9VjWgvy2cYrVcVPY9I8bfHgnp_s07bPJZYfTWcnSF676gbZYnJ-f2K5HG5YZKutyFVDEwBpJIISXU6AF1SBCagt_FGxo2MUWESk7E1G5MUHxpJ8cIZraohAjo1bVt5Op9d7gogkHbEuKPr7ptaRm8u3Nd4cKu0sqeDH-mg6TeC4ouHRchhHjbyS1Jm1Q_H5phFu7QzCFmOA9oYVzyWulELZhSi1cXhutGdCqVx-4oaZoG4dsDb2gCW6Vk7SWImwBTop99lX4yg/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
>
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at 

Re: [Freesurfer] recon-all-clinical synthseg error

2024-02-25 Thread fsbuild
External Email - Use Caution

It could help to know what OS version and what Freesurfer version you are 
running. From your path /usr/local/freesurfer it looks like you are 
running a Freesurfer release, e.g., 7.4.1.
- R.

On Feb 25, 2024, at 21:45, Agata Wolna awo...@mit.edu 
wrote:External Email - Use 
CautionHi!I'm trying to run 
recon-all-clinical but I'm running into an error with the SynthSeg at the very 
beginning. Do you have any hints what the problem might be here? Here's the 
full error message:the following problem occured with 
image[mypath]/mri/native.mgz :Traceback (most recent call last): 
File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 303, in 
predict  image, aff, h, im_res, shape, pad_idx, crop_idx = 
preprocess(path_image=path_images[i], File 
"/usr/local/freesurfer/python/scripts/mri_synthseg", line 554, in 
preprocess  im, _, aff, n_dims, n_channels, h, im_res = 
get_volume_info(path_image, True) File 
"/usr/local/freesurfer/python/scripts/mri_synthseg", line 1456, in 
get_volume_info  im, aff, header = load_volume(path_volume, 
im_only=False) File "/usr/local/freesurfer/python/scripts/mri_synthseg", 
line 1377, in load_volume  x = nib.load(path_volume) File 
"/usr/local/freesurfer/python/lib/python3..8/site-packages/nibabel/loadsave.py",
 line 110, in load  img = image_klass.from_filename(filename, 
**kwargs) File 
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/dataobj_images.py",
 line 503, in from_filename  return klass.from_file_map(file_map, 
mmap=mmap, keep_file_open=keep_file_open) File 
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
 line 526, in from_file_map  header = 
klass.header_class.from_fileobj(mghf) File 
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
 line 171, in from_fileobj  + 
int(klass._data_type_codes.bytespervox[tp]) * 
np.prod(hdr_str_to_np['dims'])KeyError: 10resuming program executionERROR: some 
problems occured for the following inputs (see corresponding errors 
above):[mypath]/mri/native.mgzError in 
SynthSegBest,Agata___Freesurfer 
mailing 
listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


[Freesurfer] recon-all-clinical synthseg error

2024-02-25 Thread Agata Wolna
External Email - Use Caution

Hi!

I'm trying to run recon-all-clinical but I'm running into an error with the
SynthSeg at the very beginning. Do you have any hints what the problem
might be here? Here's the full error message:

the following problem occured with image [mypath]/mri/native.mgz :
Traceback (most recent call last):
  File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 303, in
predict
image, aff, h, im_res, shape, pad_idx, crop_idx =
preprocess(path_image=path_images[i],
  File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 554, in
preprocess
im, _, aff, n_dims, n_channels, h, im_res = get_volume_info(path_image,
True)
  File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1456, in
get_volume_info
im, aff, header = load_volume(path_volume, im_only=False)
  File "/usr/local/freesurfer/python/scripts/mri_synthseg", line 1377, in
load_volume
x = nib.load(path_volume)
  File
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/loadsave.py",
line 110, in load
img = image_klass.from_filename(filename, **kwargs)
  File
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/dataobj_images.py",
line 503, in from_filename
return klass.from_file_map(file_map, mmap=mmap,
keep_file_open=keep_file_open)
  File
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
line 526, in from_file_map
header = klass.header_class.from_fileobj(mghf)
  File
"/usr/local/freesurfer/python/lib/python3.8/site-packages/nibabel/freesurfer/mghformat.py",
line 171, in from_fileobj
+ int(klass._data_type_codes.bytespervox[tp]) *
np.prod(hdr_str_to_np['dims'])
KeyError: 10

resuming program execution


ERROR: some problems occured for the following inputs (see corresponding
errors above):
[mypath]/mri/native.mgz
Error in SynthSeg

Best,
Agata
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail.