[Freesurfer] Extract coordinates from .mgh file

2017-07-25 Thread Redwan Maatoug
Hi experts,

I just want to know a way to extract the coordinates from a ROI mgh file.

I know that I can load the file with tksurfer but I have 100 .mgh files so
if I could run a command line to have the coordinates in a .txt file or in
a .m it would be helpful.

Thank you,
Redwan
___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Douglas N Greve
you can just

mri_convert lh.template_angle.mgz lh.template_angle_MW.nii

not, mri_convert, not mris_convert

On 07/25/2017 04:16 PM, Yagmur Ozdemir 19 wrote:
> mris_convert -c lh.template_angle.mgz lh.template_angle.mgz 
> lh.template_angle_MW.nii
>
> Thank you for the help,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Douglas N Greve 
> [gr...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 11:00 PM
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> what is your command line?
>
>
> On 07/25/2017 03:52 PM, Yagmur Ozdemir 19 wrote:
>> When I do either of the conversions with mris_convert, the system gives 
>> freadFloat: fread failed / No such file or directory then a Segmentation 
>> fault error.
>>
>> Best,
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Tuesday, July 25, 2017 10:21 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> you can convert the overlays directly to nifti, but they aren't surfaces
>> - they are scalar fields over the surface  (that is, they are one
>> value/location with no neighborhood info). Not sure what Brainvoyager
>> supports, but you could convert the surfaces to gifti
>>
>> cheers
>> Bruce
>>
>>
>> On
>> Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:
>>
>>> I am trying to export the overlays in .mgz format to Brainvoyager which 
>>> recognizes nifti or its native .vmr format. However the mri_convert command 
>>> gives error when I try to convert the templates. I thought if I could save 
>>> the overlays directly onto the inflated surface files I could convert then 
>>> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
>>> you for the help!
>>>
>>> Idil
>>> 
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>>> [fis...@nmr.mgh.harvard.edu]
>>> Sent: Tuesday, July 25, 2017 7:47 PM
>>> To: Freesurfer support list
>>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>>
>>> Hi Idil
>>>
>>> I'm not sure what you mean. If you give us a better idea of your overall
>>> goal we can give you more helpful answers I expect
>>> Bruce
>>> On Tue, 25 Jul 2017,
>>> Yagmur Ozdemir 19 wrote:
>>>
 Bruce,

 Thank you so much for the help! I guess then the way to export these 
 overlays to other softwares is writing them on the subject's inflated 
 surface file.

 Best,
 Idil
 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
 [fis...@nmr.mgh.harvard.edu]
 Sent: Monday, July 24, 2017 10:36 PM
 To: Freesurfer support list
 Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

 Hi Idil,

 we only store surface overlays in .mgz not surfaces themselves. Try loading
 a surface (like lh.inflated) then load whatever you were looking at as an
 overlay on the surface
 cheers
 Bruce
On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:

> Hello freesurfer experts,
>
> I am trying to use an occipital lobe template adapted to my data as 
> several
> surface and volume files, and there seems to be a problem with the surface
> files. Whenever I try to open a surface overlay (in .mgz format) in 
> freeview
> this error comes up;
>
> freadFloat: fread failed
> freadFloat: fread failed
> ...
> [0]PETSC ERROR:
> 
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> ...
>
> When I try to convert this file to nifti format a seemingly similar error
> comes up;
>
> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
> reading from rh.template_areas.mgz...
> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
> i_ras = (1, 0, 0)
> j_ras = (0, 1, 0)
> k_ras = (0, 0, 1)
> writing to AU_areas_template_rh.nii.gz...
> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>
> I have tried to debug but failed so far. Has anyone come across a similar
> problem and do you have an opinion onto what might be causing this? The 
> same
> adapted template's volume files work just fine.
>
> --I am using Ubuntu 16.04& freesurfer v.6
>>>

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Yagmur Ozdemir 19
I just realized I needed lh.inflated in the command. I think it works now. 
Thank you for all the help!

Idil

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Douglas N Greve 
[gr...@nmr.mgh.harvard.edu]
Sent: Tuesday, July 25, 2017 11:00 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

what is your command line?


On 07/25/2017 03:52 PM, Yagmur Ozdemir 19 wrote:
> When I do either of the conversions with mris_convert, the system gives 
> freadFloat: fread failed / No such file or directory then a Segmentation 
> fault error.
>
> Best,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 10:21 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> you can convert the overlays directly to nifti, but they aren't surfaces
> - they are scalar fields over the surface  (that is, they are one
> value/location with no neighborhood info). Not sure what Brainvoyager
> supports, but you could convert the surfaces to gifti
>
> cheers
> Bruce
>
>
> On
> Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:
>
>> I am trying to export the overlays in .mgz format to Brainvoyager which 
>> recognizes nifti or its native .vmr format. However the mri_convert command 
>> gives error when I try to convert the templates. I thought if I could save 
>> the overlays directly onto the inflated surface files I could convert then 
>> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
>> you for the help!
>>
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Tuesday, July 25, 2017 7:47 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> Hi Idil
>>
>> I'm not sure what you mean. If you give us a better idea of your overall
>> goal we can give you more helpful answers I expect
>> Bruce
>> On Tue, 25 Jul 2017,
>> Yagmur Ozdemir 19 wrote:
>>
>>> Bruce,
>>>
>>> Thank you so much for the help! I guess then the way to export these 
>>> overlays to other softwares is writing them on the subject's inflated 
>>> surface file.
>>>
>>> Best,
>>> Idil
>>> 
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>>> [fis...@nmr.mgh.harvard.edu]
>>> Sent: Monday, July 24, 2017 10:36 PM
>>> To: Freesurfer support list
>>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>>
>>> Hi Idil,
>>>
>>> we only store surface overlays in .mgz not surfaces themselves. Try loading
>>> a surface (like lh.inflated) then load whatever you were looking at as an
>>> overlay on the surface
>>> cheers
>>> Bruce
>>>   On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>>>
 Hello freesurfer experts,

 I am trying to use an occipital lobe template adapted to my data as several
 surface and volume files, and there seems to be a problem with the surface
 files. Whenever I try to open a surface overlay (in .mgz format) in 
 freeview
 this error comes up;

 freadFloat: fread failed
 freadFloat: fread failed
 ...
 [0]PETSC ERROR:
 
 [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
 probably memory access out of range
 ...

 When I try to convert this file to nifti format a seemingly similar error
 comes up;

 (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
 mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
 $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
 reading from rh.template_areas.mgz...
 TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
 i_ras = (1, 0, 0)
 j_ras = (0, 1, 0)
 k_ras = (0, 0, 1)
 writing to AU_areas_template_rh.nii.gz...
 NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768

 I have tried to debug but failed so far. Has anyone come across a similar
 problem and do you have an opinion onto what might be causing this? The 
 same
 adapted template's volume files work just fine.

 --I am using Ubuntu 16.04& freesurfer v.6

 Thank you so much!
 Idil


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

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Yagmur Ozdemir 19
mris_convert -c lh.template_angle.mgz lh.template_angle.mgz 
lh.template_angle_MW.nii

Thank you for the help,
Idil

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Douglas N Greve 
[gr...@nmr.mgh.harvard.edu]
Sent: Tuesday, July 25, 2017 11:00 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

what is your command line?


On 07/25/2017 03:52 PM, Yagmur Ozdemir 19 wrote:
> When I do either of the conversions with mris_convert, the system gives 
> freadFloat: fread failed / No such file or directory then a Segmentation 
> fault error.
>
> Best,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 10:21 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> you can convert the overlays directly to nifti, but they aren't surfaces
> - they are scalar fields over the surface  (that is, they are one
> value/location with no neighborhood info). Not sure what Brainvoyager
> supports, but you could convert the surfaces to gifti
>
> cheers
> Bruce
>
>
> On
> Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:
>
>> I am trying to export the overlays in .mgz format to Brainvoyager which 
>> recognizes nifti or its native .vmr format. However the mri_convert command 
>> gives error when I try to convert the templates. I thought if I could save 
>> the overlays directly onto the inflated surface files I could convert then 
>> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
>> you for the help!
>>
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Tuesday, July 25, 2017 7:47 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> Hi Idil
>>
>> I'm not sure what you mean. If you give us a better idea of your overall
>> goal we can give you more helpful answers I expect
>> Bruce
>> On Tue, 25 Jul 2017,
>> Yagmur Ozdemir 19 wrote:
>>
>>> Bruce,
>>>
>>> Thank you so much for the help! I guess then the way to export these 
>>> overlays to other softwares is writing them on the subject's inflated 
>>> surface file.
>>>
>>> Best,
>>> Idil
>>> 
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>>> [fis...@nmr.mgh.harvard.edu]
>>> Sent: Monday, July 24, 2017 10:36 PM
>>> To: Freesurfer support list
>>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>>
>>> Hi Idil,
>>>
>>> we only store surface overlays in .mgz not surfaces themselves. Try loading
>>> a surface (like lh.inflated) then load whatever you were looking at as an
>>> overlay on the surface
>>> cheers
>>> Bruce
>>>   On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>>>
 Hello freesurfer experts,

 I am trying to use an occipital lobe template adapted to my data as several
 surface and volume files, and there seems to be a problem with the surface
 files. Whenever I try to open a surface overlay (in .mgz format) in 
 freeview
 this error comes up;

 freadFloat: fread failed
 freadFloat: fread failed
 ...
 [0]PETSC ERROR:
 
 [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
 probably memory access out of range
 ...

 When I try to convert this file to nifti format a seemingly similar error
 comes up;

 (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
 mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
 $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
 reading from rh.template_areas.mgz...
 TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
 i_ras = (1, 0, 0)
 j_ras = (0, 1, 0)
 k_ras = (0, 0, 1)
 writing to AU_areas_template_rh.nii.gz...
 NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768

 I have tried to debug but failed so far. Has anyone come across a similar
 problem and do you have an opinion onto what might be causing this? The 
 same
 adapted template's volume files work just fine.

 --I am using Ubuntu 16.04& freesurfer v.6

 Thank you so much!
 Idil


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

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Douglas N Greve
what is your command line?


On 07/25/2017 03:52 PM, Yagmur Ozdemir 19 wrote:
> When I do either of the conversions with mris_convert, the system gives 
> freadFloat: fread failed / No such file or directory then a Segmentation 
> fault error.
>
> Best,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 10:21 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> you can convert the overlays directly to nifti, but they aren't surfaces
> - they are scalar fields over the surface  (that is, they are one
> value/location with no neighborhood info). Not sure what Brainvoyager
> supports, but you could convert the surfaces to gifti
>
> cheers
> Bruce
>
>
> On
> Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:
>
>> I am trying to export the overlays in .mgz format to Brainvoyager which 
>> recognizes nifti or its native .vmr format. However the mri_convert command 
>> gives error when I try to convert the templates. I thought if I could save 
>> the overlays directly onto the inflated surface files I could convert then 
>> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
>> you for the help!
>>
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Tuesday, July 25, 2017 7:47 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> Hi Idil
>>
>> I'm not sure what you mean. If you give us a better idea of your overall
>> goal we can give you more helpful answers I expect
>> Bruce
>> On Tue, 25 Jul 2017,
>> Yagmur Ozdemir 19 wrote:
>>
>>> Bruce,
>>>
>>> Thank you so much for the help! I guess then the way to export these 
>>> overlays to other softwares is writing them on the subject's inflated 
>>> surface file.
>>>
>>> Best,
>>> Idil
>>> 
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>>> [fis...@nmr.mgh.harvard.edu]
>>> Sent: Monday, July 24, 2017 10:36 PM
>>> To: Freesurfer support list
>>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>>
>>> Hi Idil,
>>>
>>> we only store surface overlays in .mgz not surfaces themselves. Try loading
>>> a surface (like lh.inflated) then load whatever you were looking at as an
>>> overlay on the surface
>>> cheers
>>> Bruce
>>>   On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>>>
 Hello freesurfer experts,

 I am trying to use an occipital lobe template adapted to my data as several
 surface and volume files, and there seems to be a problem with the surface
 files. Whenever I try to open a surface overlay (in .mgz format) in 
 freeview
 this error comes up;

 freadFloat: fread failed
 freadFloat: fread failed
 ...
 [0]PETSC ERROR:
 
 [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
 probably memory access out of range
 ...

 When I try to convert this file to nifti format a seemingly similar error
 comes up;

 (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
 mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
 $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
 reading from rh.template_areas.mgz...
 TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
 i_ras = (1, 0, 0)
 j_ras = (0, 1, 0)
 k_ras = (0, 0, 1)
 writing to AU_areas_template_rh.nii.gz...
 NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768

 I have tried to debug but failed so far. Has anyone come across a similar
 problem and do you have an opinion onto what might be causing this? The 
 same
 adapted template's volume files work just fine.

 --I am using Ubuntu 16.04& freesurfer v.6

 Thank you so much!
 Idil


>>> ___
>>> 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 Partners Compliance 
>>> HelpLine at
>>> http://www.partners.org/complianceline . If the e-mail was sent to you in 
>>> error
>>> but does not contain patient information, please contact the sender and 
>>> properly
>>> dispose of the e-mail.
>>>
>>>
>>> ___
>

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Yagmur Ozdemir 19
When I do either of the conversions with mris_convert, the system gives 
freadFloat: fread failed / No such file or directory then a Segmentation fault 
error. 

Best,
Idil 

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
[fis...@nmr.mgh.harvard.edu]
Sent: Tuesday, July 25, 2017 10:21 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

you can convert the overlays directly to nifti, but they aren't surfaces
- they are scalar fields over the surface  (that is, they are one
value/location with no neighborhood info). Not sure what Brainvoyager
supports, but you could convert the surfaces to gifti

cheers
Bruce


On
Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:

> I am trying to export the overlays in .mgz format to Brainvoyager which 
> recognizes nifti or its native .vmr format. However the mri_convert command 
> gives error when I try to convert the templates. I thought if I could save 
> the overlays directly onto the inflated surface files I could convert then 
> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
> you for the help!
>
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 7:47 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> Hi Idil
>
> I'm not sure what you mean. If you give us a better idea of your overall
> goal we can give you more helpful answers I expect
> Bruce
> On Tue, 25 Jul 2017,
> Yagmur Ozdemir 19 wrote:
>
>> Bruce,
>>
>> Thank you so much for the help! I guess then the way to export these 
>> overlays to other softwares is writing them on the subject's inflated 
>> surface file.
>>
>> Best,
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Monday, July 24, 2017 10:36 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> Hi Idil,
>>
>> we only store surface overlays in .mgz not surfaces themselves. Try loading
>> a surface (like lh.inflated) then load whatever you were looking at as an
>> overlay on the surface
>> cheers
>> Bruce
>>  On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>>
>>> Hello freesurfer experts,
>>>
>>> I am trying to use an occipital lobe template adapted to my data as several
>>> surface and volume files, and there seems to be a problem with the surface
>>> files. Whenever I try to open a surface overlay (in .mgz format) in freeview
>>> this error comes up;
>>>
>>> freadFloat: fread failed
>>> freadFloat: fread failed
>>> ...
>>> [0]PETSC ERROR:
>>> 
>>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>>> probably memory access out of range
>>> ...
>>>
>>> When I try to convert this file to nifti format a seemingly similar error
>>> comes up;
>>>
>>> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
>>> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
>>> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
>>> reading from rh.template_areas.mgz...
>>> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
>>> i_ras = (1, 0, 0)
>>> j_ras = (0, 1, 0)
>>> k_ras = (0, 0, 1)
>>> writing to AU_areas_template_rh.nii.gz...
>>> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>>>
>>> I have tried to debug but failed so far. Has anyone come across a similar
>>> problem and do you have an opinion onto what might be causing this? The same
>>> adapted template's volume files work just fine.
>>>
>>> --I am using Ubuntu 16.04& freesurfer v.6
>>>
>>> Thank you so much!
>>> Idil
>>>
>>>
>> ___
>> 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 Partners Compliance 
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in 
>> error
>> but does not contain patient information, please contact the sender and 
>> properly
>> dispose of the e-mail.
>>
>>
>> ___
>> 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
> htt

Re: [Freesurfer] reducing a matrix

2017-07-25 Thread Douglas N Greve
Add another 0 after the register.lta


On 07/25/2017 02:46 PM, Linda Eva Heidinger wrote:
> The -gcam command requires 7 arguments. What would the seventh be? Please let 
> me know. I really appreciate all your help!
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  on behalf of Douglas N Greve 
> 
> Sent: Tuesday, July 18, 2017 3:31 PM
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] reducing a matrix
>
> try
>
>
> mri_vol2vol --gcam 005.mc.nii boldregister.dat
> $SUBJECTS_DIR/$subject/cvs/final_CVSmorph_tocvs_avg35_inMNI152.m3z
> $FREESURFER_HOME/subjects/cvs_avg35_inMNI152/mri.2mm/register.lta 0
> output.nii.gz
>
>
> This will sample it down to a 2mm space within the CVS atlas (should
> overlap pretty well with the MNI152 2mm space)
>
>
>
> On 07/18/2017 03:48 PM, Linda Eva Heidinger wrote:
>> Dear experts in freesurfer,
>>
>> I myself am a very beginner in freesurfer but I come with a difficult
>> question to answer. As you can see from the script below, I am trying
>> to obtain the Bold in CVS35MNI152 template space which hopefully has
>> better properties for accuracy and determination of location of a
>> voxel for targeting in use with TMS. One can see that bbregister and
>> mri_cvs_register were used followed by mri_vol2vol to register the
>> Bold and transform it from subject space to the above template.
>> Unfortunately, the template space is in freesurfer space (1mm^3,256^3)
>> . When we try to run the result that we obtain after transformation in
>> our AFNI programs, they couldn't run on our computers because of the
>> size of the Bold matrix being too large. I am wondering if it is
>> possible for mri_cvs_register to use a template that is of the same
>> size as the T1? or really we should just somehow reformulate the
>> transformation matrix resulting from mri_cvs_register which I believe
>> is: final_CVSmorph_tocvs_avg35_MNI152.m3z to allow for a reduced final
>> Bold matrix from mri_vol2vol which will have the same dimensions as
>> the subject space which the original Bold had?
>>
>> I appreciate the time and attention you give this question.
>>
>> Thanks,
>>
>> -Linda
>>
>>  
>>
>> # FreeSurfer commands
>>
>> nmr-std-env
>>
>> setenv SUBJECTS_DIR > study reside>
>>
>> setenv SUBJECT 
>>
>> cd $SUBJECTS_DIR
>>
>> # First, run FS recon-all on the T1 (MEMPRAGE) anatomical as usual.
>>
>> recon-all -subjid $SUBJECT -i temp_${SUBJECT}/001.mgz -all -openmp 4
>>
>> # Second, do co-registration at the individual level between the hires
>> anatomical and the bold (functional) image.
>> # In the below example the already motion corrected (and otherwise
>> preprocessed) bold data for run 005 are in
>> # $SUBJECTS_DIR/$SUBJECT/bold/005/005.mc.nii
>> # Use boundary-based registration (bbregister) - this by far the most
>> accurate tool.
>> # Note: This is rigid 6 DOF. It is almost always best to use rigid DOF
>> 6 for within-subject registration.
>>
>> bbregister
>> --mov $SUBJECT/bold/005/005.mc.nii
>> --frame 0
>> --bold
>> --s $SUBJECT
>> --init-fsl
>> --reg boldregister.dat
>> --fslmat ${SUBJECT}_anat2bold.mat
>>
>> # Just in case, let us make FSL type coregistration matrices as well.
>>
>> convert_xfm
>> -omat ${SUBJECT}_bold2anat.mat
>> -inverse ${SUBJECT}_anat2bold.mat
>>
>>
>> # Now, we will compute a group-level coregistration from the
>> individual brain to a template brain for both volumetric non-linear
>> morphing.
>> # We will use the standard brain cvs_avg35_inMNI152 as the
>> target/template.
>>
>> mri_cvs_register --mov $SUBJECT --mni --outdir
>> $SUBJECT/cvs_CVS35MNI152 --openmp 8
>>
>> # Finally, we can move the bold image from the individual spac into
>> the standard space:
>>
>> mri_vol2vol \
>> --mov $SUBJECT/bold/005/005.mc.nii \
>> --targ $FREESURFER_HOME/subjects/cvs_avg35_inMNI152/mri/norm.mgz \
>> --o Grand_Average/${SUBJECT}_CVS35MNI152_005.mc.nii \
>> --m3z $SUBJECT/cvs_CVS35MNI152/final_CVSmorph_tocvs_avg35_inMNI152.m3z \
>> --noDefM3zPath \
>> --interp nearest \
>> --reg $SUBJECT/bold/boldregister.dat \
>> --no-save-reg \
>>
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=GKqetTp2xTIvLtRg3X4KoRv99hJX9SmTpU_XT1IjyuA&m=F4vpLZROq5u7kq8YbZVopqrYx7Jslz07HbbISgZfszY&s=1lVk1OkzVqlOUNNoWqTFzLK4e9pW4aOdftXwolSPlss&e=
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu
> Phone Number: 617-724-2358
> Fax: 617-726-7422
>
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> FileDrop: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gate.nmr.mgh.harvard.edu_filedrop2&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=GKqetTp2xTIvLtRg3X4KoRv99hJX9SmTpU_XT1IjyuA&m=F4vpLZROq5u7kq8YbZVopqrYx7Jslz07HbbISgZfszY&s=4zYCc1b9UkUaDFyiR42inwna9C5wumHuQiLmGGrpXX0&e=
>

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Bruce Fischl
you can convert the overlays directly to nifti, but they aren't surfaces 
- they are scalar fields over the surface  (that is, they are one 
value/location with no neighborhood info). Not sure what Brainvoyager 
supports, but you could convert the surfaces to gifti

cheers
Bruce


On 
Tue, 25 Jul 2017, Yagmur Ozdemir 19 wrote:

> I am trying to export the overlays in .mgz format to Brainvoyager which 
> recognizes nifti or its native .vmr format. However the mri_convert command 
> gives error when I try to convert the templates. I thought if I could save 
> the overlays directly onto the inflated surface files I could convert then 
> visualize them in Brainvoyager, but couldn't figure that out so far. Thank 
> you for the help!
>
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Tuesday, July 25, 2017 7:47 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> Hi Idil
>
> I'm not sure what you mean. If you give us a better idea of your overall
> goal we can give you more helpful answers I expect
> Bruce
> On Tue, 25 Jul 2017,
> Yagmur Ozdemir 19 wrote:
>
>> Bruce,
>>
>> Thank you so much for the help! I guess then the way to export these 
>> overlays to other softwares is writing them on the subject's inflated 
>> surface file.
>>
>> Best,
>> Idil
>> 
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
>> [fis...@nmr.mgh.harvard.edu]
>> Sent: Monday, July 24, 2017 10:36 PM
>> To: Freesurfer support list
>> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>>
>> Hi Idil,
>>
>> we only store surface overlays in .mgz not surfaces themselves. Try loading
>> a surface (like lh.inflated) then load whatever you were looking at as an
>> overlay on the surface
>> cheers
>> Bruce
>>  On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>>
>>> Hello freesurfer experts,
>>>
>>> I am trying to use an occipital lobe template adapted to my data as several
>>> surface and volume files, and there seems to be a problem with the surface
>>> files. Whenever I try to open a surface overlay (in .mgz format) in freeview
>>> this error comes up;
>>>
>>> freadFloat: fread failed
>>> freadFloat: fread failed
>>> ...
>>> [0]PETSC ERROR:
>>> 
>>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>>> probably memory access out of range
>>> ...
>>>
>>> When I try to convert this file to nifti format a seemingly similar error
>>> comes up;
>>>
>>> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
>>> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
>>> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
>>> reading from rh.template_areas.mgz...
>>> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
>>> i_ras = (1, 0, 0)
>>> j_ras = (0, 1, 0)
>>> k_ras = (0, 0, 1)
>>> writing to AU_areas_template_rh.nii.gz...
>>> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>>>
>>> I have tried to debug but failed so far. Has anyone come across a similar
>>> problem and do you have an opinion onto what might be causing this? The same
>>> adapted template's volume files work just fine.
>>>
>>> --I am using Ubuntu 16.04& freesurfer v.6
>>>
>>> Thank you so much!
>>> Idil
>>>
>>>
>> ___
>> 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 Partners Compliance 
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in 
>> error
>> but does not contain patient information, please contact the sender and 
>> properly
>> dispose of the e-mail.
>>
>>
>> ___
>> 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
>
> ___
> 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


Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Yagmur Ozdemir 19
I am trying to export the overlays in .mgz format to Brainvoyager which 
recognizes nifti or its native .vmr format. However the mri_convert command 
gives error when I try to convert the templates. I thought if I could save the 
overlays directly onto the inflated surface files I could convert then 
visualize them in Brainvoyager, but couldn't figure that out so far. Thank you 
for the help!

Idil 

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
[fis...@nmr.mgh.harvard.edu]
Sent: Tuesday, July 25, 2017 7:47 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

Hi Idil

I'm not sure what you mean. If you give us a better idea of your overall
goal we can give you more helpful answers I expect
Bruce
On Tue, 25 Jul 2017,
Yagmur Ozdemir 19 wrote:

> Bruce,
>
> Thank you so much for the help! I guess then the way to export these overlays 
> to other softwares is writing them on the subject's inflated surface file.
>
> Best,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Monday, July 24, 2017 10:36 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> Hi Idil,
>
> we only store surface overlays in .mgz not surfaces themselves. Try loading
> a surface (like lh.inflated) then load whatever you were looking at as an
> overlay on the surface
> cheers
> Bruce
>  On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>
>> Hello freesurfer experts,
>>
>> I am trying to use an occipital lobe template adapted to my data as several
>> surface and volume files, and there seems to be a problem with the surface
>> files. Whenever I try to open a surface overlay (in .mgz format) in freeview
>> this error comes up;
>>
>> freadFloat: fread failed
>> freadFloat: fread failed
>> ...
>> [0]PETSC ERROR:
>> 
>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>> probably memory access out of range
>> ...
>>
>> When I try to convert this file to nifti format a seemingly similar error
>> comes up;
>>
>> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
>> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
>> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
>> reading from rh.template_areas.mgz...
>> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
>> i_ras = (1, 0, 0)
>> j_ras = (0, 1, 0)
>> k_ras = (0, 0, 1)
>> writing to AU_areas_template_rh.nii.gz...
>> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>>
>> I have tried to debug but failed so far. Has anyone come across a similar
>> problem and do you have an opinion onto what might be causing this? The same
>> adapted template's volume files work just fine.
>>
>> --I am using Ubuntu 16.04& freesurfer v.6
>>
>> Thank you so much!
>> Idil
>>
>>
> ___
> 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 Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>
>
> ___
> 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

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] reducing a matrix

2017-07-25 Thread Linda Eva Heidinger
The -gcam command requires 7 arguments. What would the seventh be? Please let 
me know. I really appreciate all your help!

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

Sent: Tuesday, July 18, 2017 3:31 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] reducing a matrix

try


mri_vol2vol --gcam 005.mc.nii boldregister.dat
$SUBJECTS_DIR/$subject/cvs/final_CVSmorph_tocvs_avg35_inMNI152.m3z
$FREESURFER_HOME/subjects/cvs_avg35_inMNI152/mri.2mm/register.lta 0
output.nii.gz


This will sample it down to a 2mm space within the CVS atlas (should
overlap pretty well with the MNI152 2mm space)



On 07/18/2017 03:48 PM, Linda Eva Heidinger wrote:
>
> Dear experts in freesurfer,
>
> I myself am a very beginner in freesurfer but I come with a difficult
> question to answer. As you can see from the script below, I am trying
> to obtain the Bold in CVS35MNI152 template space which hopefully has
> better properties for accuracy and determination of location of a
> voxel for targeting in use with TMS. One can see that bbregister and
> mri_cvs_register were used followed by mri_vol2vol to register the
> Bold and transform it from subject space to the above template.
> Unfortunately, the template space is in freesurfer space (1mm^3,256^3)
> . When we try to run the result that we obtain after transformation in
> our AFNI programs, they couldn't run on our computers because of the
> size of the Bold matrix being too large. I am wondering if it is
> possible for mri_cvs_register to use a template that is of the same
> size as the T1? or really we should just somehow reformulate the
> transformation matrix resulting from mri_cvs_register which I believe
> is: final_CVSmorph_tocvs_avg35_MNI152.m3z to allow for a reduced final
> Bold matrix from mri_vol2vol which will have the same dimensions as
> the subject space which the original Bold had?
>
> I appreciate the time and attention you give this question.
>
> Thanks,
>
> -Linda
>
>  
>
> # FreeSurfer commands
>
> nmr-std-env
>
> setenv SUBJECTS_DIR  study reside>
>
> setenv SUBJECT 
>
> cd $SUBJECTS_DIR
>
> # First, run FS recon-all on the T1 (MEMPRAGE) anatomical as usual.
>
> recon-all -subjid $SUBJECT -i temp_${SUBJECT}/001.mgz -all -openmp 4
>
> # Second, do co-registration at the individual level between the hires
> anatomical and the bold (functional) image.
> # In the below example the already motion corrected (and otherwise
> preprocessed) bold data for run 005 are in
> # $SUBJECTS_DIR/$SUBJECT/bold/005/005.mc.nii
> # Use boundary-based registration (bbregister) - this by far the most
> accurate tool.
> # Note: This is rigid 6 DOF. It is almost always best to use rigid DOF
> 6 for within-subject registration.
>
> bbregister
> --mov $SUBJECT/bold/005/005.mc.nii
> --frame 0
> --bold
> --s $SUBJECT
> --init-fsl
> --reg boldregister.dat
> --fslmat ${SUBJECT}_anat2bold.mat
>
> # Just in case, let us make FSL type coregistration matrices as well.
>
> convert_xfm
> -omat ${SUBJECT}_bold2anat.mat
> -inverse ${SUBJECT}_anat2bold.mat
>
>
> # Now, we will compute a group-level coregistration from the
> individual brain to a template brain for both volumetric non-linear
> morphing.
> # We will use the standard brain cvs_avg35_inMNI152 as the
> target/template.
>
> mri_cvs_register --mov $SUBJECT --mni --outdir
> $SUBJECT/cvs_CVS35MNI152 --openmp 8
>
> # Finally, we can move the bold image from the individual spac into
> the standard space:
>
> mri_vol2vol \
> --mov $SUBJECT/bold/005/005.mc.nii \
> --targ $FREESURFER_HOME/subjects/cvs_avg35_inMNI152/mri/norm.mgz \
> --o Grand_Average/${SUBJECT}_CVS35MNI152_005.mc.nii \
> --m3z $SUBJECT/cvs_CVS35MNI152/final_CVSmorph_tocvs_avg35_inMNI152.m3z \
> --noDefM3zPath \
> --interp nearest \
> --reg $SUBJECT/bold/boldregister.dat \
> --no-save-reg \
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=GKqetTp2xTIvLtRg3X4KoRv99hJX9SmTpU_XT1IjyuA&m=F4vpLZROq5u7kq8YbZVopqrYx7Jslz07HbbISgZfszY&s=1lVk1OkzVqlOUNNoWqTFzLK4e9pW4aOdftXwolSPlss&e=

--
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__gate.nmr.mgh.harvard.edu_filedrop2&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=GKqetTp2xTIvLtRg3X4KoRv99hJX9SmTpU_XT1IjyuA&m=F4vpLZROq5u7kq8YbZVopqrYx7Jslz07HbbISgZfszY&s=4zYCc1b9UkUaDFyiR42inwna9C5wumHuQiLmGGrpXX0&e=
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: 
https://urldefense.proofpoint.com/v2/url?u=ftp-3A__surfer.nmr.mgh.harvard.edu_transfer_outgoing_flat_greve_&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=GKqetTp2xTIvLtRg3

Re: [Freesurfer] How to create mask for Total Graymatter and White matter Volume

2017-07-25 Thread Douglas N Greve
try --gm


On 07/25/2017 08:33 AM, M Janani wrote:
>
> Hi Team,
>
> I would like to create mask for Total Gray matter and 
> white matter volume.
>
> I was able to get the total white matter volume using the below 
> mentioned command
>
> mri_binarize -i aparc+aseg.mgz --wm --o wm.mgz
>
> But I couldn’t find any option to create the mask for Total Gray matter.
>
> Any help would be really grateful.
>
> Regards,
>
> Janani
>
>
>
> ::DISCLAIMER::
> 
>
> The contents of this e-mail and any attachment(s) are confidential and 
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as 
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in 
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any 
> liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of 
> the author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction, 
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior 
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error 
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for 
> viruses and other defects.
>
> 
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] Freesurfer commands

2017-07-25 Thread Douglas N Greve
you can do something like

mri_cor2label --i aseg.mgz --id 17 --label left.hippo.label

This will output tkregisterRAS coordinates which you can convert to 
voxel coords using

https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems case #1


On 07/25/2017 02:02 AM, Aziz Nanthaamornphong wrote:
> Hi Freesurfer Experts,
>
> Currently, I am using these command excited in Matlab to extract the 
> coordinates of volume.
>
> *mri = MRIread('aseg.mgz');
> pos = find(mri.vol == 17 | mri.vol == 53);*
> *[i,j,k] = ind2sub(mri.volsize,pos);*
> I would like to run these command in the Freesurfer itself rather than 
> using Matlab. Can I do that? Which command are qual?
>
> Best Wishes,
> Aziz
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] help with finding exact and detailed coordinates of brain areas

2017-07-25 Thread Douglas N Greve
I would put the spm and fs analysis into the same space


On 07/25/2017 10:19 AM, עדיאל חרבש wrote:
> Hi Douglas,
> Thank you, works perfectly.
> But, I need to know first which structures id's are inside each file. 
> I preferred to extract all the brain map with Matlab, as Bruce commented.
>
> Now I try to match the coordinates, according to the linked you posted.
> The brain space in results is of 256x256x256 voxels. What are the 
> dimensions of each voxel here?
> If I need to compare that results to another analysis that come from 
> SPM, so case #2 is the way? And then, I'll need in fact the 
> coordinates from mri_cor2label?
>
> Thanks for the fast and useful replies.
> Adiel
>
> 2017-07-24 22:11 GMT+03:00 Douglas Greve  >:
>
> If you want all the coordinates for a given segment (eg, left
> hippo), then you can run mri_cor2label --i aparc+aseg.mgz --id 17
> --l file.label
>
> 17 comes from $FREESURFER_HOME/FreeSurferColorLUT.txt
>
> The coordinates will be in "tkregister space" which you can
> convert to MNI305 using the info from here:
>
> https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems
> 
>
> using case #2
>
>
> On 7/24/17 2:11 AM, עדיאל חרבש wrote:
>> Hi Bruce,
>> Thanks for the reply.
>> By "coordinates" I mean all the voxels that belong to a certain
>> structure. I think it's called "labels"? I interest in the main
>> structures like Hippocampus, Thalamus, Cerebellum, Amygdala,
>> corpus callosum, etc. If the standard segmentation segments in
>> that specificity only the lobes, it can be good enough...
>> I see the .mgz files, but can not extract them... How should I do
>> that?
>>
>> Thank for the patience..
>> Adiel
>>
>>
>> 2017-07-23 18:09 GMT+03:00 Bruce Fischl
>> mailto:fis...@nmr.mgh.harvard.edu>>:
>>
>> Hi Adiel
>>
>> what kind of coordinates do you mean, and which brain
>> structures are you interested in? Our standard segmentation
>> is sampled into the volume in files named aparc*+aseg.mgz,
>> but the Brodmann area estimates are on the surface.
>>
>> cheers
>> Bruce
>>
>>
>>
>> On Sun, 23 Jul 2017, עדיאל חרבש wrote:
>>
>> Hi,
>> I'm very new to Freesurfer, and actually work with some
>> exist results of
>> other people. The results are from the call of "-recon
>> all -autorun".
>> I try to get all the coordinates of each of the
>> structures of the brain,
>> that segmented. I can find on files only the volumes of
>> some structures and
>> something that look like detailed coordinates of Brodman
>> Areas only. But I
>> can't find the detailed coordinates of all structures in
>> brain.
>>
>> I'll be grateful if someone can guide me where can I find
>> it, or what should
>> I do to get these results.
>>
>> Thanks,
>> Adiel
>>
>>
>>
>> ___
>> 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 Partners
>> Compliance HelpLine at
>> http://www.partners.org/complianceline
>>  . If the e-mail was
>> sent to you in error
>> but does not contain patient information, please contact the
>> sender and properly
>> dispose of the e-mail.
>>
>>
>>
>>
>> ___
>> 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 Partners
> Compliance He

Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Bruce Fischl
Hi Idil

I'm not sure what you mean. If you give us a better idea of your overall 
goal we can give you more helpful answers I expect
Bruce
On Tue, 25 Jul 2017, 
Yagmur Ozdemir 19 wrote:

> Bruce,
>
> Thank you so much for the help! I guess then the way to export these overlays 
> to other softwares is writing them on the subject's inflated surface file.
>
> Best,
> Idil
> 
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
> [fis...@nmr.mgh.harvard.edu]
> Sent: Monday, July 24, 2017 10:36 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] Segmentation Violation problem in surface files
>
> Hi Idil,
>
> we only store surface overlays in .mgz not surfaces themselves. Try loading
> a surface (like lh.inflated) then load whatever you were looking at as an
> overlay on the surface
> cheers
> Bruce
>  On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:
>
>> Hello freesurfer experts,
>>
>> I am trying to use an occipital lobe template adapted to my data as several
>> surface and volume files, and there seems to be a problem with the surface
>> files. Whenever I try to open a surface overlay (in .mgz format) in freeview
>> this error comes up;
>>
>> freadFloat: fread failed
>> freadFloat: fread failed
>> ...
>> [0]PETSC ERROR:
>> 
>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>> probably memory access out of range
>> ...
>>
>> When I try to convert this file to nifti format a seemingly similar error
>> comes up;
>>
>> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
>> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
>> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
>> reading from rh.template_areas.mgz...
>> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
>> i_ras = (1, 0, 0)
>> j_ras = (0, 1, 0)
>> k_ras = (0, 0, 1)
>> writing to AU_areas_template_rh.nii.gz...
>> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>>
>> I have tried to debug but failed so far. Has anyone come across a similar
>> problem and do you have an opinion onto what might be causing this? The same
>> adapted template's volume files work just fine.
>>
>> --I am using Ubuntu 16.04& freesurfer v.6
>>
>> Thank you so much!
>> Idil
>>
>>
> ___
> 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 Partners Compliance HelpLine 
> at
> http://www.partners.org/complianceline . If the e-mail was sent to you in 
> error
> but does not contain patient information, please contact the sender and 
> properly
> dispose of the e-mail.
>
>
> ___
> 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


Re: [Freesurfer] Segmentation Violation problem in surface files

2017-07-25 Thread Yagmur Ozdemir 19
Bruce,

Thank you so much for the help! I guess then the way to export these overlays 
to other softwares is writing them on the subject's inflated surface file. 

Best,
Idil

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
[fis...@nmr.mgh.harvard.edu]
Sent: Monday, July 24, 2017 10:36 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] Segmentation Violation problem in surface files

Hi Idil,

we only store surface overlays in .mgz not surfaces themselves. Try loading
a surface (like lh.inflated) then load whatever you were looking at as an
overlay on the surface
cheers
Bruce
  On Mon, 24 Jul 2017, Yagmur Ozdemir 19 wrote:

> Hello freesurfer experts,
>
> I am trying to use an occipital lobe template adapted to my data as several
> surface and volume files, and there seems to be a problem with the surface
> files. Whenever I try to open a surface overlay (in .mgz format) in freeview
> this error comes up;
>
> freadFloat: fread failed
> freadFloat: fread failed
> ...
> [0]PETSC ERROR:
> 
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> ...
>
> When I try to convert this file to nifti format a seemingly similar error
> comes up;
>
> (...) mri_convert rh.template_areas.mgz AU_areas_template_rh.nii.gz
> mri_convert.bin rh.template_areas.mgz AU_areas_template_rh.nii.gz
> $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
> reading from rh.template_areas.mgz...
> TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
> i_ras = (1, 0, 0)
> j_ras = (0, 1, 0)
> k_ras = (0, 0, 1)
> writing to AU_areas_template_rh.nii.gz...
> NIFTI FORMAT ERROR: nslices 117239 in volume exceeds 32768
>
> I have tried to debug but failed so far. Has anyone come across a similar
> problem and do you have an opinion onto what might be causing this? The same
> adapted template's volume files work just fine.
>
> --I am using Ubuntu 16.04& freesurfer v.6
>
> Thank you so much!
> Idil
>
>
___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] converting vertex numbers in .label files to R, A, S coordinates

2017-07-25 Thread Li Guo
Thank you very much for this information!!

Best,
Li


On Jul 24, 2017, at 4:06 PM, Douglas Greve 
mailto:gr...@nmr.mgh.harvard.edu>> wrote:


Try using mri_label2label with the --paint option. I think the vertex numbers 
need to be -1 (not random numbers). You will also need to convert the RAS to 
"tkregisterRAS", one of our internal coordinate systems. See 
https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems, you'll need to do 
the inverse of case #1.

On 7/19/17 12:28 PM, Li Guo wrote:
Dear Freesurfer experts,

My question concerns the .label files and the correspondence between the vertex 
numbers (in the first column) and the R,A,S coordinates.

I have the R,A,S coordinates of voxels that I want to display on the surface. 
For this purpose, I created a label file with the R,A,S coordinates (col 2,3,4) 
and random vertex ID in the col 1 (since I do not know what is the vertex ID 
for a given R,A,S coordinate). I displayed the content of the label file via 
tksurfer. However, tksurfer reads vertex ID, not R,A,S coordinates.

I wonder whether anyone knows about a function computing the vertex ID based on 
the R,A,S coordinates, or an alternative solution to represent the vertices on 
the surface based on the voxel coordinates--and the registration file I assume?

Thank you very much!

Best
Li Guo & Florence Campana

Thanks a lot!



___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the 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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] help with finding exact and detailed coordinates of brain areas

2017-07-25 Thread עדיאל חרבש
Hi Douglas,
Thank you, works perfectly.
But, I need to know first which structures id's are inside each file. I
preferred to extract all the brain map with Matlab, as Bruce commented.

Now I try to match the coordinates, according to the linked you posted.
The brain space in results is of 256x256x256 voxels. What are the
dimensions of each voxel here?
If I need to compare that results to another analysis that come from SPM,
so case #2 is the way? And then, I'll need in fact the coordinates from
mri_cor2label?

Thanks for the fast and useful replies.
Adiel

2017-07-24 22:11 GMT+03:00 Douglas Greve :

> If you want all the coordinates for a given segment (eg, left hippo), then
> you can run mri_cor2label --i aparc+aseg.mgz --id 17 --l file.label
>
> 17 comes from $FREESURFER_HOME/FreeSurferColorLUT.txt
>
> The coordinates will be in "tkregister space" which you can convert to
> MNI305 using the info from here:
>
> https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems
>
> using case #2
>
> On 7/24/17 2:11 AM, עדיאל חרבש wrote:
>
> Hi Bruce,
> Thanks for the reply.
> By "coordinates" I mean all the voxels that belong to a certain structure.
> I think it's called "labels"? I interest in the main structures like
> Hippocampus, Thalamus, Cerebellum, Amygdala, corpus callosum, etc. If the
> standard segmentation segments in that specificity only the lobes, it can
> be good enough...
> I see the .mgz files, but can not extract them... How should I do that?
>
> Thank for the patience..
> Adiel
>
>
> 2017-07-23 18:09 GMT+03:00 Bruce Fischl :
>
>> Hi Adiel
>>
>> what kind of coordinates do you mean, and which brain structures are you
>> interested in? Our standard segmentation is sampled into the volume in
>> files named aparc*+aseg.mgz, but the Brodmann area estimates are on the
>> surface.
>>
>> cheers
>> Bruce
>>
>>
>>
>> On Sun, 23 Jul 2017, עדיאל חרבש wrote:
>>
>> Hi,
>>> I'm very new to Freesurfer, and actually work with some exist results of
>>> other people. The results are from the call of "-recon all -autorun".
>>> I try to get all the coordinates of each of the structures of the brain,
>>> that segmented. I can find on files only the volumes of some structures
>>> and
>>> something that look like detailed coordinates of Brodman Areas only. But
>>> I
>>> can't find the detailed coordinates of all structures in brain.
>>>
>>> I'll be grateful if someone can guide me where can I find it, or what
>>> should
>>> I do to get these results.
>>>
>>> Thanks,
>>> Adiel
>>>
>>>
>>>
>> ___
>> 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 Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>
>
> ___
> 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 Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the 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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] help with finding exact and detailed coordinates of brain areas

2017-07-25 Thread עדיאל חרבש
Hi Bruce,
I had Matlab and freesurfer on separate machines.
But for now I managed to have Matlab on both, so I can run it.
It really helped, thanks!
Adiel

2017-07-24 22:33 GMT+03:00 Bruce Fischl :

> HI Adiel
>
> we distribute all our matlab scripts as part of FreeSurfer
>
>
> cheers
> Bruce
> On Mon, 24 Jul 2017, עדיאל חרבש wrote:
>
> Hi Bruce,
>> It may really help to shorten and ease the procedure, thanks.
>> I see that I should clone all your matlab repository to use this function?
>>
>> I will look over mri_extract_labels as well.
>>
>> Best,
>> Adiel
>>
>>
>> 2017-07-24 17:02 GMT+03:00 Bruce Fischl :
>>   Hi Adiel
>>
>>   in matlab you could do something like:
>>
>>   cd $SUBJECTS_DIR//mri
>>   matlab
>>   [v,M,mr] = load_mgh('aseg.mgz');
>>   left_hippo_indices = find(v == 17);
>>
>>
>>
>>   where the '17' comes from
>>   $FREESURFER_HOME/FreeSurferColorLUT.txt and is the index for
>>   left hippocampus.
>>
>>   Is that would you mean? Or you could use mri_extract_labels to
>>   build volumes that have only the labels you want in them.
>>
>>   cheers
>>   Bruce
>>
>>
>>
>>
>>   On Mon, 24 Jul 2017, עדיאל חרבש wrote:
>>
>> Hi Bruce,
>> Thanks for the reply.
>> By "coordinates" I mean all the voxels that belong
>> to a certain structure. I
>> think it's called "labels"? I interest in the main
>> structures like
>> Hippocampus, Thalamus, Cerebellum, Amygdala, corpus
>> callosum, etc. If the
>> standard segmentation segments in that specificity
>> only the lobes, it can be
>> good enough...
>> I see the .mgz files, but can not extract them...
>> How should I do that?
>>
>> Thank for the patience..
>> Adiel
>>
>>
>> 2017-07-23 18:09 GMT+03:00 Bruce Fischl
>> :
>>   Hi Adiel
>>
>>   what kind of coordinates do you mean, and
>> which brain structures
>>   are you interested in? Our standard
>> segmentation is sampled into
>>   the volume in files named aparc*+aseg.mgz, but
>> the Brodmann area
>>   estimates are on the surface.
>>
>>   cheers
>>   Bruce
>>
>>
>>   On Sun, 23 Jul 2017, עדיאל חרבש wrote:
>>
>> Hi,
>> I'm very new to Freesurfer, and actually
>> work with
>> some exist results of
>> other people. The results are from the
>> call of
>> "-recon all -autorun".
>> I try to get all the coordinates of each
>> of the
>> structures of the brain,
>> that segmented. I can find on files only
>> the volumes
>> of some structures and
>> something that look like detailed
>> coordinates of
>> Brodman Areas only. But I
>> can't find the detailed coordinates of
>> all
>> structures in brain.
>>
>> I'll be grateful if someone can guide me
>> where can I
>> find it, or what should
>> I do to get these results.
>>
>> Thanks,
>> Adiel
>>
>>
>>
>> ___
>> 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
>> Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the
>> e-mail was sent to you
>> in error
>> but does not contain patient information, please
>> contact the sender
>> and properly
>> dispose of the 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 Partners Compliance
>> HelpLine at
>> http://ww

[Freesurfer] How to create mask for Total Graymatter and White matter Volume

2017-07-25 Thread M Janani
Hi Team,

I would like to create mask for Total Gray matter and white 
matter volume.

I was able to get the total white matter volume using the below mentioned 
command
mri_binarize -i aparc+aseg.mgz --wm --o wm.mgz

But I couldn't find any option to create the mask for Total Gray matter.

Any help would be really grateful.

Regards,
Janani




::DISCLAIMER::


The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.


___
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 Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.