Re: [Freesurfer] Smoothing before or after PALM (and results conversion for Surf Ice)

2019-01-30 Thread Glasser, Matthew
External Email - Use Caution

Isn¹t this what GIFTI is for?  PALM and FreeSurfer can use GIFTI.

Matt.

On 1/30/19, 9:17 PM, "freesurfer-boun...@nmr.mgh.harvard.edu on behalf of
Bruce Fischl"  wrote:

>Hi Dan
>
>sorry, I'm not really sure what you are asking. Doug implemented a
>work-around for nifti in which it breaks up the number of vertices into
>multiple dimensions (to get around the 16-bit dimensions in nifti, which
>was a crazy design decision). freeview detects this and displays them
>appropriately
>
>cheers
>Bruce
>
>
>On Wed, 30 Jan 2019, Daniel
>Leopold wrote:
>
>>
>> External Email - Use Caution
>>
>> Hi Bruce,
>>
>> Chris Rorden informed me that Surfice previously assumed that MGZ/MGH
>>files were voxelwise images used to
>> surface-paint a mesh. Anderson's palm, however, uses the format as a
>>one-to-one correspondence with the vertices
>> (i.e., data-per-vertex). Chris' newest/upcoming version of Surfice
>>automatically detects this data-per-vertex
>> format and can load the files appropriately.
>>
>> The main feature that freeview lacks is the ability to display multiple
>>overlays/sets of palm results at once. My
>> initial approach was to convert the .mgz palm outputs into .nii so that
>>I could use fslmaths to combine results,
>> but (apparently) NIFTI handles a maximum of 65,535 voxels in any one
>>dimension, which is why Chris thought Anderson
>> used MGH, which allows billions of vertices (32-bit).
>>
>> So, Surfice can now load the palm .mgz outputs onto ?h.inflated, .pial,
>>and .curv surfaces, but I'm now wondering
>> if mgh/mgz overlays be be loaded on top of other background meshes
>>(such as BrainMesh_ICBM152 or mni2fs meshes that
>> are provided with Surfice). I've emailed Darren Price because I'm
>>essentially looking for the inverse transform of
>> his mni2fs package (i.e., fs2mni), but I was wondering if you or Doug
>>have encountered this question or similar
>> requests to convert freesurfer to mni surfaces/meshes before? I'm
>>familiar with the Freesurfer Coordinate Systems
>> info, but I don't know how I might generalize the RAS to MNI152 point
>>conversion to an entire surface.
>>
>>
>> Thank you again for your suggestions and help!
>> Dan
>>



The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.


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


Re: [Freesurfer] Smoothing before or after PALM (and results conversion for Surf Ice)

2019-01-30 Thread Bruce Fischl

Hi Dan

sorry, I'm not really sure what you are asking. Doug implemented a 
work-around for nifti in which it breaks up the number of vertices into 
multiple dimensions (to get around the 16-bit dimensions in nifti, which 
was a crazy design decision). freeview detects this and displays them 
appropriately


cheers
Bruce


On Wed, 30 Jan 2019, Daniel 
Leopold wrote:




External Email - Use Caution

Hi Bruce,

Chris Rorden informed me that Surfice previously assumed that MGZ/MGH files 
were voxelwise images used to
surface-paint a mesh. Anderson's palm, however, uses the format as a one-to-one 
correspondence with the vertices
(i.e., data-per-vertex). Chris' newest/upcoming version of Surfice 
automatically detects this data-per-vertex
format and can load the files appropriately.

The main feature that freeview lacks is the ability to display multiple 
overlays/sets of palm results at once. My
initial approach was to convert the .mgz palm outputs into .nii so that I could 
use fslmaths to combine results,
but (apparently) NIFTI handles a maximum of 65,535 voxels in any one dimension, 
which is why Chris thought Anderson
used MGH, which allows billions of vertices (32-bit).

So, Surfice can now load the palm .mgz outputs onto ?h.inflated, .pial, and 
.curv surfaces, but I'm now wondering
if mgh/mgz overlays be be loaded on top of other background meshes (such as 
BrainMesh_ICBM152 or mni2fs meshes that
are provided with Surfice). I've emailed Darren Price because I'm essentially 
looking for the inverse transform of
his mni2fs package (i.e., fs2mni), but I was wondering if you or Doug have 
encountered this question or similar
requests to convert freesurfer to mni surfaces/meshes before? I'm familiar with 
the Freesurfer Coordinate Systems
info, but I don't know how I might generalize the RAS to MNI152 point 
conversion to an entire surface.


Thank you again for your suggestions and help!
Dan

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

Re: [Freesurfer] Smoothing before or after PALM (and results conversion for Surf Ice)

2019-01-30 Thread Daniel Leopold
External Email - Use Caution

Hi Bruce,

Chris Rorden informed me that Surfice previously assumed that MGZ/MGH files
were voxelwise images used to surface-paint a mesh. Anderson's palm,
however, uses the format as a one-to-one correspondence with the vertices
(i.e., data-per-vertex). Chris' newest/upcoming version of Surfice
automatically detects this data-per-vertex format and can load the files
appropriately.

The main feature that freeview lacks is the ability to display multiple
overlays/sets of palm results at once. My initial approach was to convert
the .mgz palm outputs into .nii so that I could use fslmaths to combine
results, but (apparently) NIFTI handles a maximum of 65,535 voxels in any
one dimension, which is why Chris thought Anderson used MGH, which allows
billions of vertices (32-bit).

So, Surfice can now load the palm .mgz outputs onto ?h.inflated, .pial, and
.curv surfaces, but I'm now wondering if mgh/mgz overlays be be loaded on
top of other background meshes (such as BrainMesh_ICBM152 or mni2fs meshes
that are provided with Surfice). I've emailed Darren Price because I'm
essentially looking for the inverse transform of his mni2fs package (i.e.,
fs2mni), but I was wondering if you or Doug have encountered this question
or similar requests to convert freesurfer to mni surfaces/meshes before?
I'm familiar with the Freesurfer Coordinate Systems info, but I don't know
how I might generalize the RAS to MNI152 point conversion to an entire
surface.


Thank you again for your suggestions and help!
Dan
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Combination of multiple PET projection: "mri_vol2surf --projfrac" vs. "mris_expand"

2019-01-30 Thread Matthieu Vanhoutte
External Email - Use Caution

Dear Freesurfer’s experts,

I have read the paper from Marcoux, et al. « An Automated Pipeline for the 
Analysis of PET Data on the Cortical Surface ». Frontiers in Neuroinformatics 
12 (10 décembre 2018). https://doi.org/10.3389/fninf.2018.00094 
. In this paper, they propose a 
robust PET signal projection based on weighting multiple PET projections at 
different fractions of the cortical thickness. They used « mris_expand" instead 
of "mri_vol2surf --projfrac" based on the following comments:

"We mainly rely on the mris_expand function of FreeSurfer rather than on 
vol2surf. The vol2surf function allows the user to project volume data onto the 
cortical surface by sampling along the normal of the white surface, by steps 
corresponding to fractions of the cortical thickness. We observed that the main 
issue with this approach is its lack of accuracy and robustness, as there is no 
constraint to ensure that the last sample will be on the corresponding vertex 
of the pial surface. Another solution proposed by FreeSurfer is to use the 
normal fromthemid surface, starting on the side of the white surface and going 
toward the pial surface, sampling by steps proportional to the thickness. Here 
again we observed that, because of different folding patterns, sampling points 
could be located outside the cortical ribbon. Our approach, using deformable 
surfaces obtained with mris_expand, ensures that the seven surfaces that are 
used to project the signal follow the folding patterns and stay within the 
cortical ribbon."

Is "mris_expand" more accurate and robust than "mri_vol2surf --projfrac" 
according to you ?

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

Re: [Freesurfer] Average-subject space

2019-01-30 Thread Bruce Fischl

Hi Sofia

what would that mean? Do you want to normalize the volumes? The volumes 
themselves are independent of any coordinate system, except for scaling. 
Normalizing usually isn't very useful since the goal of it would be to have 
them all be the same.


cheers
Bruce

On 
Wed, 30 Jan 2019, Sofia Rodriguez Penuela wrote:




External Email - Use Caution

Hi Freesurfer team!

How can I export the volumes of each subject to .nii in the space of the
average subject?

Thank you.


Sofía Rodríguez Peñuela.

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

Re: [Freesurfer] Functional connectivty walkthrough step 8 error

2019-01-30 Thread Amrita Bedi
External Email - Use Caution

Good Morning Dr Greve,

Here is what I got:

>> system('mris_fwhm')
mris_fwhm: /home/apps/matlab/MATLAB/R2011b/sys/os/glnxa64/libstdc++.so.6:
version `GLIBCXX_3.4.11' not found (required by mris_fwhm)

ans =

 1

Do you think this error has to do with the version of matlab I am using
perhaps?

Best
Amrita


On Tuesday, January 29, 2019, Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu> wrote:

> That looks ok. It must be something happening when you start a shell
> from matlab. What happens if you start matlab, then type
> system('mris_fwhm')
>
>
>
> On 1/29/19 9:39 AM, Amrita Bedi wrote:
> >
> > External Email - Use Caution
> >
> > Hi Drs Greve and Fischl,
> >
> > I tried the mris_fwhm command and got the following. Not sure if this
> > is helpful or not.
> >
> > bash-4.2$ mris_fwhm
> > USAGE: mris_fwhm
> > Smooths surface data and/or estimates FWHM
> > --i input
> > --subject subject (--s)
> > --hemi hemi (--h), or --lh or --rh
> > --surf surf 
> > --label labelfile
> > --cortex : used hemi.cortex.label
> > --mask maskfile
> > --X x.mat : matlab4 detrending matrix
> > --detrend order : polynomial detrending (default 0, turned off with
> > output)
> > --smooth-only : only smooth (implies --no-detrend)
> > --no-detrend : turn of poly detrending
> > --sqr : compute square of input before smoothing
> > --sum sumfile
> > --dat datfile (only contains fwhm)
> > --ar1dat ar1datfile (contains ar1mean ar1std)
> > --ar1 ar1vol : save spatial ar1 as an overlay
> > --prune - remove any voxel that is zero in any subject (after any
> > inversion)
> > --no-prune - do not prune (default)
> > --out-mask outmask : save final mask
> >
> > --fwhm fwhm : apply before measuring
> > --niters-only  : only report on niters for fwhm
> > --o output
> >
> > --sd SUBJECTS_DIR
> > --synth
> > --synth-frames nframes : default is 10
> > --threads nthreads
> >
> > --debug turn on debugging
> > --checkopts don't run anything, just check options and exit
> > --help  print out information on how to use this program
> > --version   print out version and exit
> >
> > $Id: mris_fwhm.c,v 1.40.2.4 2016/12/08 22:02:40 zkaufman Exp $
> >
> >
> >
> > Best
> > Amrita
> > -- Forwarded message --
> > From: *Amrita Bedi* mailto:amibedi...@gmail.com>>
> > Date: Friday, January 25, 2019
> > Subject: Functional connectivty walkthrough step 8 error
> > To: Freesurfer support list  > >
> >
> >
> > Ok hopefully, the text is visible now.
> >
> > bash-4.2$ mris_fwhm
> > USAGE: mris_fwhm
> > Smooths surface data and/or estimates FWHM
> >--i input
> >--subject subject (--s)
> >--hemi hemi (--h), or --lh or --rh
> >--surf surf 
> >--label labelfile
> >--cortex : used hemi.cortex.label
> >--mask maskfile
> >--X x.mat : matlab4 detrending matrix
> >--detrend order : polynomial detrending (default 0, turned off with
> > output)
> >--smooth-only : only smooth (implies --no-detrend)
> >--no-detrend : turn of poly detrending
> >--sqr : compute square of input before smoothing
> >--sum sumfile
> >--dat datfile (only contains fwhm)
> >--ar1dat ar1datfile (contains ar1mean ar1std)
> >--ar1 ar1vol : save spatial ar1 as an overlay
> >--prune - remove any voxel that is zero in any subject (after any
> > inversion)
> >--no-prune - do not prune (default)
> >--out-mask outmask : save final mask
> >
> >--fwhm fwhm : apply before measuring
> >--niters-only  : only report on niters for fwhm
> >--o output
> >
> >--sd SUBJECTS_DIR
> >--synth
> >--synth-frames nframes : default is 10
> >--threads nthreads
> >
> >--debug turn on debugging
> >--checkopts don't run anything, just check options and exit
> >--help  print out information on how to use this program
> >--version   print out version and exit
> >
> > $Id: mris_fwhm.c,v 1.40.2.4 2016/12/08 22:02:40 zkaufman Exp $
> >
> >
> >
> > On Friday, January 25, 2019, Amrita Bedi  > > wrote:
> >
> > Sorry for the confusion. The Va doesn’t let us access our gmails
> > so I’ll send an email with the text from my city mail email address.
> >
> > On Friday, January 25, 2019, Bruce Fischl
> > mailto:fis...@nmr.mgh.harvard.edu>>
> > wrote:
> >
> > Hi Amrita
> >
> > please don't take an image of the text and send us that. Just
> > copy and paste the text directly into the email. This is
> > *much* more useful for us.
> >
> > cheers
> > Bruce
> >
> >
> > On Fri, 25 Jan 2019, Amrita Bedi wrote:
> >
> >
> > External Email - Use Caution
> >
> >
> > [0a440090-c896-4f22-8bd2-fe98f24c8013]
> > On Friday, January 25, 2019, Amrita Bedi
> > mailto:amibedi...@gmail.com>> wrote:
> >   [IMAGE]
> >Here you go.
> >

[Freesurfer] Average-subject space

2019-01-30 Thread Sofia Rodriguez Penuela
External Email - Use Caution

Hi Freesurfer team! 

How can I export the volumes of each subject to .nii in the space of the
average subject? 

Thank you. 

Sofía Rodríguez Peñuela.___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Maximum vertex value

2019-01-30 Thread Marina Fernández
External Email - Use Caution

Dear Freesurfer Team,

How can I get the maximum vertex value for each subject in a particular
cluster?

Thank you very much.

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

Re: [Freesurfer] [PETSurfer] Intensity normalization of PET images without PVE correction

2019-01-30 Thread Matthieu Vanhoutte
External Email - Use Caution

Hi Douglas,

In order to apply intensity normalization to non-PVC PET images based on mean 
intensity from reference region in gtmseg.mgz, is it better to realign & 
reslice PET image onto gtmseg space or the reverse way ? How is it done when 
dealing with PVC images using gtmpvc command ?

I would like to avoid too many reslicing operations before volume to surface 
projection, how would you deal with it ?

Best,
Matthieu

> Le 28 janv. 2019 à 17:41, Greve, Douglas N.,Ph.D.  a 
> écrit :
> 
> If you intend to use one of the aseg structures, then they are the same. 
> 
> On 1/28/19 10:14 AM, Matthieu Vanhoutte wrote:
>> External Email - Use Caution
>> 
>> Hi Douglas,
>> 
>> 
>>> Le 25 janv. 2019 à 18:01, Greve, Douglas N.,Ph.D. >> > a écrit :
>>> 
>>> 
>>> 
>>> On 1/25/19 7:57 AM, Matthieu Vanhoutte wrote:
 External Email - Use Caution
 
 Dear Douglas,
 
 Could you precise me:
 1) Is the intensity rescaling of PET image included in the mri_gtmpvc 
 command based on reference region in gtmseg.mgz file rather than aseg.mgz ?
>>> It depends. If you are using pons, then that is not part of the aseg and is 
>>> generated as part of the creation of gtmseg. But most of the rest of gtmseg 
>>> is derived from the aseg and surfaces.
>> 
>> Is it better to use gtmseg.mgz or aseg.mgz to extract reference region’s 
>> mean intensity ?
>> 
>> 
 2) Is this rescaling applied before PVE correction or after (i.e. based on 
 PVE corrected reference region’s mean intensity) ?
>>> After
 
 Many thanks in advance for helping.
 
 Best,
 Matthieu
 
> Le 7 janv. 2019 à 17:26, Greve, Douglas N.,Ph.D.  > a écrit :
> 
> 
> 
> On 1/7/19 11:18 AM, Matthieu Vanhoutte wrote:
>> External Email - Use Caution
>> 
>> 
>> I used the following command to obtain only rescaled voxel-wise PET 
>> image (with no PVC):
>> mri_gtmpvc --i PET.nii.gz --reg Pet2T1.register.dof6.lta --psf 0 
>> --no-tfe --seg gtmseg.mgz --default-seg-merge --auto-mask PSF .01 --rbv 
>> --o  nopvc
>> 
>> If I omitted --rbv or --mgx option I didn't get the rescaled voxel-wise 
>> PET image (without PVC). Could I obtain the rescaled voxel-wise PET 
>> image (without PVC) just by dividing each voxel of the native PET image 
>> by the mean of the reference region ?
> Yes
>> 
>> Best,
>> Matt
>> 
>> Le lun. 7 janv. 2019 à 16:01, Greve, Douglas N.,Ph.D. 
>> mailto:dgr...@mgh.harvard.edu>> a écrit :
>> I'm not sure what you mean. If you are turning off PVC, why are you 
>> computing RBV and MGX? What is your command line? What do you mean that 
>> these options don't seem to work?
>> 
>> On 12/21/18 2:22 PM, Matthieu Vanhoutte wrote:
>>> External Email - Use Caution
>>> 
>>> Hi Douglas,
>>> 
>>> Thanks for helping.
>>> 
>>> To have an only rescaled voxel-wise PET image, these options seem to 
>>> work only when -rbv method is used and not -mgx.
>>> 
>>> Do you know why ?
>>> 
>>> Best,
>>> Matthieu 
>>> 
>>> 
>>> Le mar. 18 déc. 2018 à 17:58, Greve, Douglas N.,Ph.D. 
>>> mailto:dgr...@mgh.harvard.edu>> a écrit :
>>> You will need to set --psf 0 and --no-tfe to fully turn off PVC. 
>>> 
>>> On 12/18/18 4:50 AM, Matthieu Vanhoutte wrote:
 External Email - Use Caution
 
 Hi Douglas,
 
 Could you help me on this point ?
 
 Best,
 Matthieu
 
 
 Le mer. 12 déc. 2018 à 10:50, Matthieu Vanhoutte 
 mailto:matthieuvanhou...@gmail.com>> a 
 écrit :
 Dear Douglas,
 
 Is it possible to use mri_gtmpvc command in order to intensity 
 normalize PET images without applying PVE correction by setting --psf 
 to 0 ?
 
 Best,
 Matthieu
 
 
 ___
 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 
>>>