| Thanks a lot to John and Frauke. Now I'm clear with the spatial
| normalization process of SPM99b. I thought that it did an automatic
| detection of X orientation. There is one more question. My PET images are
| from a Siemens scaner. They are in raw data format (int16 format). In order
| to convert them to ANALYZE file format, I write a header file for each image
| and reverse the Y direction and Z direction and keep the X direction
| unchanged. I wonder if it is correct. Thank you.
This may be correct sometimes, but not at other times. The orientation that
the images are stored in depends upon the default settings of the scanner,
and we have found on our Siemens scanner that these settings can change
depending how the scans were set up (whether the subjects were pre-registered
or registered - so our radiographers tell me). The orientations of the images
can only really be worked out by looking at the header information.
Information about the structure of these headers is quite difficult to get
hold of for the ".ima" files. We have this information, but we signed a
non-disclosure agreement so we can't tell anyone else. Somewhere on your
scanner console should be a menu that allows you to export your images in
ACR/NEMA format. The format of these images is much more public, so I
have attached a conversion routine. I can not offer any support for the,
routine and offer no guaruntees that it will always work because I don't
fully understand every detail of the image format. It is quite possible
that I may have overlooked something so it is quite likely that I may have
overlooked something (it is very easy to mix up the right and left side of
the head). The images produced by this routine need to be flipped at the
spatial normalisation stage.
In order to compile, you need to have the Analyze dbh.h file. Also, if
you want the program to create .mat files, you need to have Matlab 4 libraries
and include files. Compilation is something like:
cc -o acr2spm acr2spm.c -I/usr/local/matlab4/extern/include
/usr/local/matlab4/extern/lib/sol2/libmat.a -lm -DWRITE_MATFILE
Good luck,
-John
|