Hi Daniel,
> Can you tell us if the 3D to 4D tool in SPM 5 can reliably convert
> ANALYZE to NIFTII format? Does it work equally well for 3D Analyze
> images that have .mat files as those without .mat files?
I've just had a quick glance at the code, which is in:
spm5/toolbox/spm_config_3Dto4D.m
It basically reads the volumes in as usual, and then writes out the 4D
series using the spm5/@nifti/ routines. Both of these should be pretty
reliable (the nifti stuff is a little "touchy" in the sense that you
can crash Matlab with it by doing the wrong thing with it, but code
that knows how to use it, obviously including 3Dto4D, should be fine).
It's hard-coded to write out INT16-BE (i.e. two byte integers (with
the big-endian storage convention)), so if you have 32-bit data, some
information will be lost. This would be very rare with raw data, as
most MR images come off the scanner in 12 or 16 bit I believe, but
it's possible in pre-processed images, e.g. the mwc segmentations. I
think you could change the code to specify FLOAT32-BE or whatever you
wanted, if necessary.
With regard to .mat files and voxel-world mappings generally, the 4D
series will get its NIfTI orientation (qform and sform) from the
orientation of the *first* volume (from its .mat if available).
I believe the 4D series will also get an accompanying .mat file. If
all images have the same voxel-world mapping, then this 4D.mat will
just repeat the qform/sform and can be safely deleted.
If the images have different voxel-world mappings, then arguably they
shouldn't really be combined into a single 4D NIfTI, as this won't
allow multiple q- or s-forms. SPM5 will, I think, allow this (as long
as the voxelwise image dimensions match) and will simply create a .mat
with different mappings for each volume. This should be fine for
further work in SPM5, but wouldn't be quite right for other software
such as MRICron or FSL, which would ignore the .mat. You could
resample the images in SPM5 though, if this proved to be a problem.
I hope that helps (sorry it's not the most concise answer ever...)
Ged
|