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
Your best option is to look at the matlab scripts in the $FREESURFER_HOME/matlab directory. In particular, read_curv.m, which I have attached to the email (along with worker routine fread3.m).
Krish Subramaniam, a new software engineer here at MGH, cc'd in this email, has just started a project where some of the major IO routines will be written in python, so maybe you can coordinate with him.
Nick
On Thu, 2008-04-24 at 11:49 -0400, 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 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 should I simply try mri_convert them into .minc and use netcdf module within python?
Thanks in advance for the ideas!