Differences between revisions 12 and 15 (spanning 3 versions)
Revision 12 as of 2006-01-17 18:49:28
Size: 1045
Comment:
Revision 15 as of 2006-01-17 18:53:32
Size: 1103
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
The MGH format is proprietary, defined by the NMR Center (at Massachusetts General Hospital). Short of having a formal specification of this format, the next best thing is a snapshot of the C code showing how the file is read and written: The MGH format is proprietary, defined by the NMR Center (at Massachusetts General Hospital). Short of having a formal specification of this format, the next best thing is a snapshot of the C code showing how a .mgh or .mgz file is read and written:
Line 15: Line 15:
 * attachment:mriio.c - see 'MRIreadHeader', 'mri_read', and 'mri_write' routines  * attachment:mriio.c - see 'mri_read', and 'mri_write' routines
Line 19: Line 19:
 * attachment:mri_info.c - see 'do_file' routine  * attachment:mri_info.c - source for mri_info utility; see 'do_file' routine
Line 21: Line 21:
 * attachment:mri_convert.c - big example of reading and writing .mgh and .mgz file  * attachment:mri_convert.c - source for mri_convert utility; many examples of reading and writing .mgh and .mgz files

[wiki:FreeSurferWiki top] | [wiki:FileFormats previous]

The MGH/MGZ Volume Format

WORK IN PROGRESS

The .mgh file format is used to store high-resolution structural data and other data which are to be overlaid on the high-resolution structural volume. A .mgz file is a .mgh file that has been compressed with ZLib.

The MGH format is proprietary, defined by the NMR Center (at Massachusetts General Hospital). Short of having a formal specification of this format, the next best thing is a snapshot of the C code showing how a .mgh or .mgz file is read and written:

  • attachment:mri.h - a .mgh file merely stores the MRI data structure, defined in mri.h

  • attachment:matrix.h - MRI data structure contains MATRIX
  • attachment:mriio.c - see 'mri_read', and 'mri_write' routines
  • attachment:mri.c - contains helper routines used in mriio.c
  • attachment:mri_info.c - source for mri_info utility; see 'do_file' routine
  • attachment:mri_convert.c - source for mri_convert utility; many examples of reading and writing .mgh and .mgz files

FsTutorial/MghFormat (last edited 2008-04-29 11:46:03 by localhost)