You can use MRIcro to create Analyze format headers for raw data.
1.) You need to create a header using MRIcro's "header information"
panel. (e.g. type in the slice dimensions, and bytes per voxel).
2.) then choose "Save header" from the "Header" menu. This will create an
Analyze format header (e.g. filename.hdr).
3.) Finally, you need to make sure that your raw data file has the
extension ".img", e.g. filename.img.
For more details, please look and the section named "Unsupported 3D
formats" of
http://www.psychology.nottingham.ac.uk/staff/cr1/mricro.html
-chris
At 14:45 07/08/2001 -0400, Anjum Ali wrote:
>Hello once again Dr.Welsh and thanks for the reply, the data actually is
>raw and consisted of a text file with each element of size 2 bytes and
>is an unsigned integer, i can read them into an array in matlab just fine
>, I tried writing each image from this
>set into a file and then made the header files as you described but it
>doesnt seem to work that way and yes i have takencare of the endianess.
>
>any suggestions ?
>
>Thanks
>Sincerely
>Anjum
>
>
>Robert Welsh wrote:
>
> > Anjum,
> >
> > I guess it would as long as the data are binary with no internal header
> in the file. Also, the order that the data are in the file will be
> important, that is image orientation in the file (x, y, z etc). Nothing
> would hurt from trying, just make a backup of the files before you head off.
> >
> > Oh, one more thing, big-endian and little-endian. This is the byte
> order that is machine dependent. The nice thing about the analyze format
> is that SPM/matlab picks up the endianess of the file and opens it
> appropriatlyl. So, if you build your header and trying displaying and
> don't see what you expect, especially if it looks like noise, then could
> be the endianess is wrong. You can sort of correct that by moving the
> file to a machine of opposite endianess and build the header there,
> display to verify the image and then move img and hdr back to the
> original machine.
> >
> > For endian definitions www.google.com returns:
> >
> > http://www.cs.rpi.edu/courses/sysprog/sockets/byteorder.html
> >
> > or from evil microsoft:
> >
> > http://support.microsoft.com/support/kb/articles/Q102/0/25.ASP
> >
> > Make sure you eat your eggs correctly.
> >
> > Robert
> >
> > -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> > Robert C. Welsh, PhD
> > Research Investigator
> > Department of Radiology
> > University of Michigan
> > (734) - 764 - 2412 (fax)
> > [log in to unmask]
> >
__________________________________________
Dr. Chris Rorden
Department of Psychology
University of Nottingham
Nottingham NG7 2RD, UK
Tel: +44 [0]115-951-5294
Fax: +44 [0]115-951-5324
http://www.psychology.nottingham.ac.uk/staff/cr1/
|