[Freesurfer] Is the slice delay of each slice needed for slice time correction with preprocess-sess?

2024-02-26 Thread Maria Hakonen
External Email - Use Caution

Dear all,

Have I understood correctly that the slice delay of each slice is not
needed when performing slice time correction with preprocess-sess?

I am processing an open OASIS fMRI dataset. The dataset has fMRI data in
nifti format and JSON files that contain information about the data.
In the instructions they say: "Slice timing is included in the JSON when
available. Some original DICOM files did not have slice timing info. When
slice timing information is unavailable use the ratio TR/#slices."

The data is collected with a Siemens scanner.
If the slice timing is available it seems to be interleaved:

"SliceTiming": [
1.1025,
0,
1.165,
0.059998,
1.2251,
0.1225,
1.28750001,
0.1825,
1.3474,
0.245,
1.4099,
0.30499,
1.47,
0.36749,
1.5325,
0.42749,
1.595,
0.48999,
1.655,
0.55004,
1.7175,

Could I just run slice time correction with the siemens option?

Best regards,
Maria
___
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] Updated instructions for running Freesurfer in a Linux VM (virtual machine)

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

Instructions about how to setup a VM running Ubuntu 22.04 LTS Linux have 
been updated on the wiki page,
  
https://secure-web.cisco.com/1-hfMzPT3UMB77kyvVjV7UDTVoojwvFmLCgo5iFkfwXwZ25LXFS9Roz8W9yuwq3ZMgs5tjQSEKQlcqIQbRxJ1rps2AabjEIivAzU8ekg5AsJLT6mntG2Nc4NnzZYDPJZG2wf_aLnz6uKLNaustProbSHYKiMbskeae7cLki3u_nSnw4xu4chaYhm-Z5kLiuCwcqECsDkdCMoITT-JKqqCHPkmz-brMCz3F9oCcmaqFMirOwqvqcbah9n7ycsFnHd3RDgkGDoMo6zuiX8aecB8B0MO5X6QvJKUslOgGjkBUQ4W4ItrfjjElVnPeg2YV9CgmgVdxPZUx-arGQMnQ7ZyPg/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FVM_67The
 instructions include how to install and run the current Freesurfer release 
(7.4.1 from June 2023).
Please keep in mind that while the VirtualBox virtualization application runs 
on hosts with Intel processors, it does not run on arm64 machines (including 
silicon Macs with M1, M2, M3 chips).
- R.
___
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. 


Re: [Freesurfer] Segmentation White matter bad

2024-02-26 Thread Douglas N. Greve
I can't tell from those pics what is happening. Does it look like an 
imaging artifact? You can try putting control points


On 2/26/2024 12:58 PM, lejia2011411409 wrote:


External Email - Use Caution

Hi,
  I used command:  recon-all  -s subject1 -i subject1.nii   -all -sd  
/home/t1. I think it is FrreSurfer default method to segementation.


Lejia



At 2024-02-27 01:24:00, "Douglas N. Greve"  wrote:

what did you use the do the segmentation? Include command line and
terminal output

On 2/26/2024 10:46 AM, lejia2011411409 wrote:


External Email - Use Caution

Dear freesurfer experts,

A large amount of subjects got segmentation white matter bad
(some dark white matter cannot be recognition below 57 slices). 
Attachment show this problem.  I used 'kvlEMSegment brainmask.mgz
3 4 4 '  to segment white matter again.  while there reported   
 kvlEMSegment: command not found. Do you have any solutions for
this? Thanks in advance.

Best wishes,
Lejia

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://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
___
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. 


Re: [Freesurfer] Permission denied error from -localGI

2024-02-26 Thread Douglas N. Greve
That is weird -- ft_read_mri is not one of our files. Can you send the 
command line and the *full* terminal output? The lGI stuff is pretty old 
and does not have a maintainer.


On 2/26/2024 1:40 PM, Michael Ruvalcaba wrote:


External Email - Use Caution

Hi Douglas,

Yes I can definitely do that!

After I run the recon -all part for a specific subject using 
freesurfer 7.2.0 in MATALB, I then run the below code:


%% 4c. Load Freesurfer Pre-Op MRI (do not edit)
addpath('/usr/local/freesurfer_x86_64-7.2.0/matlab');
fsmri_pre_acpc = ft_read_mri([subdir 
'3D_Images/freesurfer_pre-op/freesurfer/mri/T1.mgz']);


Which gives me the following error:

/bin/bash: 
/scratch/tp0a8d7d21_790a_4945_a04d_b0cc7d38be4f.load_mgh.m.mgh: 
Permission denied


ERROR: could not open 
/scratch/tp0a8d7d21_790a_4945_a04d_b0cc7d38be4f.load_mgh.m.mgh for reading
ERROR: loading 
/home/knight/ecog/DATA_FOLDER/UCSD/SD11/3D_Images/freesurfer_pre-op/freesurfer/mri/T1.mgz 
as MGH

Dot indexing is not supported for variables of this type.

Error in ft_read_mri (line 401)
    ndims = numel(size(tmp.vol));

Error in SD11_Recon_Pipeline (line 197)
fsmri_pre_acpc = ft_read_mri([subdir 
'3D_Images/freesurfer_pre-op/freesurfer/mri/T1.mgz']);



I don't get this error when using freesurfer 6.0.0 and using those 
above commands. So I'm guessing it's because freesurfer 7.2.0 is 
trying to write something to a scratch file that doesn't even exist?


Thank you for your help!

Best,
Michael Ruvalcaba
Knight Lab
Helen Wills Neuroscience Institute
University of California, Berkeley


On Fri, Feb 23, 2024 at 10:26 AM Douglas N. Greve 
 wrote:


Can you send more info? Eg, command line, all terminal output,
version of FS you are using?

On 2/6/2024 6:18 PM, Michael Ruvalcaba wrote:


External Email - Use Caution

Hello,

I had a similar question you had in the past thread
(https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg72609.html

)
but I cannot seem to access the link where you solved this issue.
It looks like Tashrif helped you and he informed me to ask you

Can you help me with this by chance? I tried opening an account
and logging in but it says my account hasn't been approved yet :(
and I'm not sure who to contact to get it approved. It's been
months.

Thank you!

Best,
Michael Ruvalcaba


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 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. 


Re: [Freesurfer] Longitudinal Freesurfer in the presence of large tissue defects

2024-02-26 Thread Hoffmann, Malte,PhD
Hi Philip,

The deformable template was most beneficial when differences between time 
points (TPs) were largest. While this is perhaps not surprising, it meant that 
the long registration time of 8h/TP in the abstract was not time well spent 
since we were already certain of group differences.

We generally recommend the longitudinal stream for longitudinal data since much 
information is shared between the TPs. The median rigid template is typically a 
robust starting point for the processing of the individual TPs, sometimes even 
for developmental studies where you see the size of the brain increase.

In your specific case, non-linear registration (using an image-intensity 
objective like in the abstract) might be detrimental. The algorithm will likely 
move tissue from outside the resected area into this area since the scan before 
resection will have matching intensities there, but this won’t necessarily make 
for a good template.

Malte


From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Philip P 

Sent: Sunday, February 4, 2024 01:48
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Longitudinal Freesurfer in the presence of large  tissue 
defects

External Email - Use Caution

Dear Freesurfer Developers,

I am currently running the Longitudinal Pipeline on a cohort with significant 
portions of brain tissue removed. The obtained base templates overall look 
reasonable, however, when overlaying the transformed session T1ws and flicking 
between them, there still are noticeable residual differences. This is not 
surprising, given the inevitable brain shift after tissue removal, which rigid 
registration cannot account for. In my search for a non-linear base template 
option I came across the "Longitudinal FreeSurfer with non-linear 
subject-specific template improves sensitivity to cortical thinning” ISMRM 
abstract (MailScanner has detected a possible fraud attempt from 
"secure-web.cisco.com" claiming to be 
https://archive.ismrm.org/2020/1050.html)
 as well as related code on Github (MailScanner has detected a possible fraud 
attempt from "secure-web.cisco.com" claiming to be 
https://github.com/mu40/freesurfer/tree/nf-long-nonlin).

I was wondering whether you could provide insights into what you think the best 
strategy for obtaining reliable longitudinal cortical thickness measurements in 
such a dataset. Do you have a feel for whether the Longitudinal Freesurfer 
processing stream still provides benefits over Cross-Sectional analysis in the 
presence of large defects? Would you recommend giving the above-mentioned 
non-linear implementation a shot or were there other reasons the feature has 
not been implemented yet in the official version?

Thanks already in advance!

Best

Philip

___
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. 



Re: [Freesurfer] Segmentation White matter bad

2024-02-26 Thread lejia2011411409
External Email - Use Caution

Hi, 
  I used command:  recon-all  -s  subject1 -i subject1.nii   -all -sd  
/home/t1. I think it is FrreSurfer default method to segementation.


Lejia







At 2024-02-27 01:24:00, "Douglas N. Greve"  wrote:

what did you use the do the segmentation? Include command line and terminal 
output


On 2/26/2024 10:46 AM, lejia2011411409 wrote:


External Email - Use Caution

Dear freesurfer experts,

A large amount of subjects got segmentation white matter bad (some dark white 
matter cannot be recognition below 57 slices).  Attachment show this problem.  
I used 'kvlEMSegment brainmask.mgz 3 4 4 '  to segment white matter again.  
while there reported kvlEMSegment: command not found. Do you have any 
solutions for this? Thanks in advance.


Best wishes,
Lejia


___
Freesurfer mailing list
freesur...@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. 


Re: [Freesurfer] Segmentation White matter bad

2024-02-26 Thread Douglas N. Greve
what did you use the do the segmentation? Include command line and 
terminal output


On 2/26/2024 10:46 AM, lejia2011411409 wrote:


External Email - Use Caution

Dear freesurfer experts,

A large amount of subjects got segmentation white matter bad (some 
dark white matter cannot be recognition below 57 slices). Attachment 
show this problem.  I used 'kvlEMSegment brainmask.mgz 3 4 4 '  to 
segment white matter again.  while there reported     kvlEMSegment: 
command not found. Do you have any solutions for this? Thanks in advance.


Best wishes,
Lejia

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://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. 


Re: [Freesurfer] Creating a custom registration template with FreeSurfer template

2024-02-26 Thread Douglas N. Greve

You need to specify a format for the output (eg, ...thickness.mgz)

On 2/26/2024 10:31 AM, Asuka Toyofuku wrote:


External Email - Use Caution

Hi, many thanks for your reply.
Here's the terminal output;

asuka@rigi:/media/.../FS7_Teen$ for d in Teen* EPK* epk*
> do mris_preproc --surfreg sphere.reg.teenheart_average_template --s 
$d --hemi lh --out lh.surfreg.teenheart_average_template.thickness 
--meas thickness

> done
ERROR: format for lh.surfreg.teenheart_average_template.thickness not 
recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not 
recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not 
recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not 
recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not 
recognized


Error continued so I stopped running at a certain point.
What do you think?

Best regards,
Asuka

*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 


*Sent:* 23 February 2024 19:30
*To:* freesurfer@nmr.mgh.harvard.edu 
*Subject:* Re: [Freesurfer] Creating a custom registration template 
with FreeSurfer template
Can you include the full terminal output for one of the mris_preproc 
commands that is failing?


On 2/22/2024 7:12 AM, Asuka Toyofuku wrote:

*External Email - Use Caution *

Dear Freesurfer experts,


I have issues with creating a custom registration template. (I'm
following this instruction: *MailScanner has detected a possible
fraud attempt from "secure-web.cisco.com" claiming to be

**MailScanner
has detected a possible fraud attempt from "secure-web.cisco.com"
claiming to be*
 https://surfer.nmr.mgh.harvard.edu/fswiki/SurfaceRegAndTemplates


 )


According to the instructions, we need to

1) Create an average subject (Creates $SUBJECTS_DIR/newtemplate)

2) Register each subject to the new template (do for both lh and
rh), resulting in lh.sphere.reg.newtemplate and
rh.sphere.reg.newtemplate
3) Get thickness values in the newtemplate space for GLM analysis
4) Create another average template based on the previous one:
(Creates $SUBJECTS_DIR/newnewtemplate)

I'm stuck with the 3) command.
Instruction suggests:
mris_preproc --surfreg sphere.reg.newtemplate --s subj1 --s subj2
--s subj3 ...

and this is my code:
for d in Teen*
do mris_preproc --surfreg sphere.reg.teenheart_average_template
--s $d --hemi lh --out
lh.surfreg.teenheart_average_template.thickness --meas thickness
done

( I specified hemi and output because, without it, I got ERROR: no
source hemi specified)

My command led to an error saying:

ERROR: format for lh.surfreg.teenheart_average_template.thickness
not recognized

So my questions are:

a) what does it mean that "format for
lh.surfreg.average_template.thickness not recognised"? Any ideas
on how to fix this?

b) Does this mris_preproc --surfreg command produce different
smoothing mgh files? (e.g., fwhm10, fwhm15, fwhm20...?)

Because standard mris_preproc before GLM analysis(*MailScanner has
detected a possible fraud attempt from "secure-web.cisco.com"
claiming to be

**MailScanner
has detected a possible fraud attempt from "secure-web.cisco.com"
claiming to be*
 https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis


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] Creating a custom registration template with FreeSurfer template

2024-02-26 Thread Asuka Toyofuku
External Email - Use Caution

Hi, many thanks for your reply.
Here's the terminal output;

asuka@rigi:/media/.../FS7_Teen$ for d in Teen* EPK* epk*
> do mris_preproc --surfreg sphere.reg.teenheart_average_template --s $d --hemi 
> lh --out lh.surfreg.teenheart_average_template.thickness --meas thickness
> done
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized

Error continued so I stopped running at a certain point.
What do you think?

Best regards,
Asuka

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 

Sent: 23 February 2024 19:30
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] Creating a custom registration template with 
FreeSurfer template

Can you include the full terminal output for one of the mris_preproc commands 
that is failing?

On 2/22/2024 7:12 AM, Asuka Toyofuku wrote:
External Email - Use Caution

Dear Freesurfer experts,


I have issues with creating a custom registration template. (I'm following this 
instruction: MailScanner has detected a possible fraud attempt from 
"secure-web.cisco.com" claiming to 
be
 
https://secure-web.cisco.com/14OtCqttBqWbYfCMoChsBvplhJCm7DA2sZ2-eErVNHV_OGYKSMTYomS5-MKzc9smNvjmbLFDxPbiXqCpxna-AEp0j7CdalRRmlrmAtR1b6_kL17vl7ig9z-4jQNbOsxWkb1vtpkaf34KiKlbNFKXPZfB-ckg0Oy8VPigj7BG3M3ruIEOncIkWgsAHzcW3PzaQifRZrQMe7GErLPfCnvyrrxwRKRHspJjz8_ZANkmUeOMOZbvvCIemLI3RTSIxmt9MhdpB3lJqfrQ6AZas7103xqUPeogxsq3VBSD6ILXqk7TVU9cnDpGoE7YLio_5AinktX0JD8odbBBm7blLAhvZwg/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FSurfaceRegAndTemplates
 )


According to the instructions, we need to

1) Create an average subject (Creates $SUBJECTS_DIR/newtemplate)

2) Register each subject to the new template (do for both lh and rh), resulting 
in lh.sphere.reg.newtemplate and rh.sphere.reg.newtemplate
3) Get thickness values in the newtemplate space for GLM analysis
4) Create another average template based on the previous one: (Creates 
$SUBJECTS_DIR/newnewtemplate)

I'm stuck with the 3) command.
Instruction suggests:
mris_preproc --surfreg sphere.reg.newtemplate --s subj1 --s subj2 --s subj3 ...

and this is my code:
for d in Teen*
do mris_preproc --surfreg sphere.reg.teenheart_average_template --s $d --hemi 
lh --out lh.surfreg.teenheart_average_template.thickness --meas thickness
done


( I specified hemi and output because, without it, I got ERROR: no source hemi 
specified)

My command led to an error saying:

ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized

So my questions are:

a) what does it mean that "format for lh.surfreg.average_template.thickness not 
recognised"? Any ideas on how to fix this?

b) Does this mris_preproc --surfreg command produce different smoothing mgh 
files? (e.g., fwhm10, fwhm15, fwhm20...?)

Because standard mris_preproc before GLM analysis(MailScanner has detected a 
possible fraud attempt from "secure-web.cisco.com" claiming to 
be
 

Re: [Freesurfer] Too large volumes thalamus segmentation in version 7.2

2024-02-26 Thread Iglesias Gonzalez, Juan E.
Dear Katharina,
First of all, and to avoid any confusion, the bug only affected the script to 
gather the volumes from different subjects (“quantifyThalamicNuclei.sh”), and 
not the segmentations themselves.
Would you mind sharing some images, showing how/where the LGN is oversegmented, 
please? It would be very helpful to better understand the problem.
Kind regards,
/Eugenio

--
Juan Eugenio Iglesias
http://www.jeiglesias.com

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Katharina von Kriegstein 

Date: Monday, February 26, 2024 at 5:16 AM
To: freesurfer@nmr.mgh.harvard.edu 
Cc: Chelsea Jarrett , Hannes Ruge 

Subject: [Freesurfer] Too large volumes thalamus segmentation in version 7.2
Dear List,

We are using the thalamic segmentation and have encountered too large nuclei
volumes. We are aware of the bug in previous Freesurfer versions reported
here
https://secure-web.cisco.com/1IbBjsoyLKSxbo51anCmnlGJ7AZlAHQC-iMHoutsQKt5emosDTMTW0h4Zr4x8Fc3T9saf02_wRcDR4wCu6Bbm5CK3KosJDQPCWk4MW2zsevWOrjnSh5jM2PW-7jyJglBbcd_IBcCbhj_w5aPS8oA8bdObZ2aQtO0bkdTaFt-ZXIN_6DMcK3rdono_RSBISep330s0lC-NWLL2L995DdOML88nS0YAsEYEHjhvIbvRvggLG_elezRlsrqWsMD5NxHP-plyRmABs74rTKJp7VaC_-aW9rIG1-vzaz7ad-hqGB27LbybsrMc4ojdXtNr86G-/https%3A%2F%2Ffreesurfer.net%2Ffswiki%2FThalamicNuclei
 . In version 7.2 this bug is
fixed.

Does someone else have similar difficulties with too large volumes? For
example, our LGN is 259 mm3 (left) and 304 mm3 (right), while in the
original paper for the thalamus segmentation (Iglesias et al. 2018), it is
124 mm3, which is close to the size reported by histological studies.

Thanks for reading!
Katharina

_ _

Katharina von Kriegstein

Professor of Cognitive and Clinical Neuroscience
Vice-Dean Faculty of Psychology

TUD Dresden University of Technology
Chemnitzer Str. 48b, 01187 Dresden

Phone +49 (0) 351-463-43145

https://secure-web.cisco.com/1gJ3pcdCtydEP4JcYC_B04s_xcYKuSS0r7VoHh7Z0azmyON_SOw9d7jFsHvxZnQbDLToHs7ih4CjHKdZD-Epj7z6RUkQhkzm4TfzeashKffMLIkhK_AcL7TU2A6XgvGjSsmu8ILnQVdymDWmtg7TbbqCwn-5dFhXcUFDlZ29ROUAY1RbhbCtjwV03w8FQLZFq796CYFYeLFq3Hbto4al8LO0zLFqwNUgEMw-INgT02g6jSxVoWU2qEWsaprGKAv9XJb5SdMappHS8eZqllbx_zohEs4ypmVRtqeOpgQpgfRLWEPWq8si77YV_au9xVW0v/https%3A%2F%2Ftu-dresden.de%2Fmn%2Fpsychologie%2Fifap%2Fkknw
https://secure-web.cisco.com/12zaO7jd5zPchZlNamn2OOwsicMw7Cg6FNxaL13gnPuKZwQ30XI9-8Ip0KsBo7r_BKfON8WP-YzW49Aa-LqPoPo-A8zF0q9pYN4b4MrGl_jP9me9h5lgp4-c0X6dX9M2GouB7NYbZHVyChWUizy2CDyBxGW2ytYWpVmHsL_Yl48XqOPd7RRrD5_VubAYPTw57jG_Id1ixEfKRa3JVLCuG9ldaITVPZW72IIQxoc2VCuLI9F8TZuCgOWi0fBwgYTAW6J7oyYjlnVznnGeUvu4fTyQfrtqcMiZWawpftG7sQ4Ql9z2Mjx2RK9ssj48uOw0o/https%3A%2F%2Fbsky.app%2Fprofile%2Fkvonkriegstein.bsky.social
___
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. 


Re: [Freesurfer] mris_convert reading surf.gii files?

2024-02-26 Thread Huang, Yujing
Your mris_convert command looks correct. I'm able to do the conversion like 
this with dev version:

mris_convert --annot label/rh.aparc.annot.gii surf/rh.white.gii rh.aparc.annot

I'm wondering which Freesurfer you are running. If you do 'mris_info surf.gii', 
what does it report?

Best,

Yujing

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Westin, Karin
Sent: Saturday, February 24, 2024 6:10 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] mris_convert reading surf.gii files?


External Email - Use Caution

Hi



I'm trying to create an .annot file from a label.gii file using an HCP 
fsavarage.surf.gii file (eg mris_convert --annot my_label.label.gii 
fsaverage_template.L.surf.gii lh.my_annot.annot). However I keep getting the 
error



** failed to open GIFTI XML file 
'fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii'

mrisReadGIFTIdanum: gifti_read_image() returned NULL

Is there a better way to read/open CIFTI files using mris_convert?

Best and thanks
Karin

___
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. 


Re: [Freesurfer] Freesurfer white matter overestimated

2024-02-26 Thread Douglas N. Greve
It looks like the volume has very poor contrast. What volume are you 
displaying it on? Can you take a pic on the nu.mgz?


On 2/26/2024 2:53 AM, Luisa Klahn wrote:


External Email - Use Caution

Dear Douglas,
Please find attached the pictures for the following issue:
I am processing structural data from a 3T scanner using Freesurfer
version 7.3.2. For some subjects, the grey matter looks very thin, and
the white matter looks overestimated. I'll attach screenshots of the
brainmask, wm mask, and T1 including wm and pial surface lines.
I have tried to set control points into the wm but this did not change
the results.
Does anyone have an idea? Would it be possible to change the intensity
settings in the recon-all command?

Thanks for helping!
Best,
Luisa
___
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. 


Re: [Freesurfer] Fwd: Vertex / voxel lesion symptom mapping

2024-02-26 Thread Douglas N. Greve
Can you be even more specific? Operationally, what does it entail? Are 
you just trying to correlate, say, cognitive deficits to, say, thickenss?


On 2/25/2024 9:12 PM, Martin Juneja wrote:


External Email - Use Caution

Hi Doug,

Sorry for not elaborating in my previous email.

Voxel lesion symptom mapping (VLSM) is a method to calculate symptom 
localization by estimating statistical relationships between damage to 
specific brain regions (it could be stroke lesion, tumor lesion or TBI 
lesion etc.) and resulting deficits (e.g., *MailScanner has detected a 
possible fraud attempt from "secure-web.cisco.com" claiming to be* 
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4724038/ 
 
and *MailScanner has detected a possible fraud attempt from 
"secure-web.cisco.com" claiming to be* 
https://academic.oup.com/brain/article/137/9/2532/2848278 
). 
This method can guide the development of targeted interventions and 
rehabilitation strategies aimed at improving symptoms by targeting 
specific brain regions (or networks, if we use network lesion symptom 
mapping: *MailScanner has detected a possible fraud attempt from 
"secure-web.cisco.com" claiming to be* 
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9724189/ 
).


On Fri, Feb 23, 2024 at 10:27 AM Douglas N. Greve 
 wrote:


Sorry, don't know what VLSM is. Can you elaborate?

On 2/6/2024 3:19 PM, Martin Juneja wrote:


External Email - Use Caution

Dear FreeSurfer community and experts,

I would greatly appreciate any help/response with the following.

Thanks.

-- Forwarded message -
From: *Martin Juneja* 
Date: Wed, Jan 31, 2024 at 7:51 PM
Subject: Vertex / voxel lesion symptom mapping
To: Freesurfer support list 


Greetings FreeSurfer community,

I was just wondering if it's possible to perform vertex/voxel
lesion symptom mapping (VLSM) using FreeSurfer? In other words, I
would like to assess the impact of lesion topography (of course,
heterogenous locations across patients) on
neurocognitive function in brain tumor patients.

I would greatly appreciate any help/response.

Thanks!

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer  



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The 

[Freesurfer] Too large volumes thalamus segmentation in version 7.2

2024-02-26 Thread Katharina von Kriegstein
Dear List,

We are using the thalamic segmentation and have encountered too large nuclei
volumes. We are aware of the bug in previous Freesurfer versions reported
here 
https://secure-web.cisco.com/1IbBjsoyLKSxbo51anCmnlGJ7AZlAHQC-iMHoutsQKt5emosDTMTW0h4Zr4x8Fc3T9saf02_wRcDR4wCu6Bbm5CK3KosJDQPCWk4MW2zsevWOrjnSh5jM2PW-7jyJglBbcd_IBcCbhj_w5aPS8oA8bdObZ2aQtO0bkdTaFt-ZXIN_6DMcK3rdono_RSBISep330s0lC-NWLL2L995DdOML88nS0YAsEYEHjhvIbvRvggLG_elezRlsrqWsMD5NxHP-plyRmABs74rTKJp7VaC_-aW9rIG1-vzaz7ad-hqGB27LbybsrMc4ojdXtNr86G-/https%3A%2F%2Ffreesurfer.net%2Ffswiki%2FThalamicNuclei
 . In version 7.2 this bug is
fixed.

Does someone else have similar difficulties with too large volumes? For
example, our LGN is 259 mm3 (left) and 304 mm3 (right), while in the
original paper for the thalamus segmentation (Iglesias et al. 2018), it is
124 mm3, which is close to the size reported by histological studies. 

Thanks for reading!
Katharina

_ _ 

Katharina von Kriegstein 

Professor of Cognitive and Clinical Neuroscience
Vice-Dean Faculty of Psychology

TUD Dresden University of Technology 
Chemnitzer Str. 48b, 01187 Dresden

Phone +49 (0) 351-463-43145 

https://secure-web.cisco.com/1gJ3pcdCtydEP4JcYC_B04s_xcYKuSS0r7VoHh7Z0azmyON_SOw9d7jFsHvxZnQbDLToHs7ih4CjHKdZD-Epj7z6RUkQhkzm4TfzeashKffMLIkhK_AcL7TU2A6XgvGjSsmu8ILnQVdymDWmtg7TbbqCwn-5dFhXcUFDlZ29ROUAY1RbhbCtjwV03w8FQLZFq796CYFYeLFq3Hbto4al8LO0zLFqwNUgEMw-INgT02g6jSxVoWU2qEWsaprGKAv9XJb5SdMappHS8eZqllbx_zohEs4ypmVRtqeOpgQpgfRLWEPWq8si77YV_au9xVW0v/https%3A%2F%2Ftu-dresden.de%2Fmn%2Fpsychologie%2Fifap%2Fkknw
https://secure-web.cisco.com/12zaO7jd5zPchZlNamn2OOwsicMw7Cg6FNxaL13gnPuKZwQ30XI9-8Ip0KsBo7r_BKfON8WP-YzW49Aa-LqPoPo-A8zF0q9pYN4b4MrGl_jP9me9h5lgp4-c0X6dX9M2GouB7NYbZHVyChWUizy2CDyBxGW2ytYWpVmHsL_Yl48XqOPd7RRrD5_VubAYPTw57jG_Id1ixEfKRa3JVLCuG9ldaITVPZW72IIQxoc2VCuLI9F8TZuCgOWi0fBwgYTAW6J7oyYjlnVznnGeUvu4fTyQfrtqcMiZWawpftG7sQ4Ql9z2Mjx2RK9ssj48uOw0o/https%3A%2F%2Fbsky.app%2Fprofile%2Fkvonkriegstein.bsky.social



smime.p7s
Description: S/MIME cryptographic signature
External Email - Use Caution___
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.