Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-07-21 Thread Yaroslav Halchenko
Hi Krish, Thanks once again for providing that library. I came back to analyze the data and got some problems storing the results into MGH format. Before I try to figure out a fix (and send it back to you) I thought that may be you could share an uptodated snapshot of the library (may be the issue

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Krish Subramaniam
Hi Yaroslav and Pádraig, Please follow the link pasted below to get an alpha version of pymgh. It requires the latest Python and Numpy. https://www.nmr.mgh.harvard.edu/facility/filedrop/showgroup/10224/1/2a5da2a125134fbdfc9e6850be1fcc09 (expires in 30 days ) Make sure PYTHONPATH has the d

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Yaroslav Halchenko
Thank everyone for very informative comments! I am a newbie in freesurfer myself, I just got a dataset for the analysis (data was preprocessed in freesurfer), and since I am moving myself toward doing any analysis in python, and the tools I use now are python libraries, I wanted to load the data i

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Nick Schmansky
Pádraig is correct in stating that thickness data can be stored in an mgh file. But the default output of the freesurer recon-all stream does not store them in that format: it will output ?h.thickness files, which are the proprietary format. However, those can be converted to .mgh like this: mri

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Pádraig Kitterick
MGH is just a generic volume-based format so I think thickness data will be stored in a 1xNumVerticesx1x1 volume. Here is a python function which reads in the volume data. It's basically a translation of the readmgh function from the Freesurfer matlab toolbox. You can modify it to return more p

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Nick Schmansky
Yaroslav, The mgh format is pseudo-documented here: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat But the thickness data is not stored in mgh format, but rather in another proprietary format, with documentation here: http://wideman-one.com/gw/brain/fs/surfacefileformats.htm Yo

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Krish Subramaniam
Here you go Yaroslav... http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat Krish On Apr 24, 2008, at 11:49 AM, Yaroslav Halchenko wrote: actually I need thickness data out of it. Is .mgh format documented somewhere? On Thu, 24 Apr 2008, Pádraig Kitterick wrote: How much detail d

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Yaroslav Halchenko
actually I need thickness data out of it. Is .mgh format documented somewhere? On Thu, 24 Apr 2008, Pádraig Kitterick wrote: > How much detail do you need frmo the mgh file? I wrote a quick Python > script which reads in at least the volume data but I think I just passed > over most of the ot

Re: [Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-24 Thread Pádraig Kitterick
How much detail do you need frmo the mgh file? I wrote a quick Python script which reads in at least the volume data but I think I just passed over most of the other stuff in there... Yaroslav Halchenko wrote: Does anyone know any handy module to at least read in .mgh files from Python? Or sho

[Freesurfer] IO with freesurfer files (.mgh in particular) from Python

2008-04-23 Thread Yaroslav Halchenko
Does anyone know any handy module to at least read in .mgh files from Python? Or should I simply try mri_convert them into .minc and use netcdf module within python? Thanks in advance for the ideas! -- Yaroslav Halchenko Research Assistant, Psychology Department, Rutgers-Newark Student Ph.D. @