Dear Erik,
you might try http://xmedcon.sourceforge.net to read and verify some
orientations on a linux platform, although I'm not sure how it handles 4D
Analyze volumes.
I've attached an archive of some matlab functions to read Analyze volumes,
although, again, they have not been developed to handle 4D Analyze volumes.
The archive can be extracted using http://www.rarlab.com.
The code is well documented with regard to orientation and some steps along
the road to handling different orientations have been made. I can't
guarantee bug-free operation, but it has recently handled different
orientation files fairly easily. If necessary, it is also easy to load and
view the orientations, eg:
avw = avw_img_read('filename',X)
avw_view(avw)
where X is an orientation argument (see 'help avw_img_read'). The function
will auto detect big/little endian data and tries to auto detect orientation
from the hdr.hist.orient field.
The returned value is a struct with .hdr and .img fields. If the
orientation is detected correctly, you should see the volume in avw_view
with +X right, +Y anterior, and +Z superior (RAS). The function should
return data from any file into the avw struct with the default orientation
(axial unflipped, RAS).
If this is not so, you can force reading a volume in a different orientation
by setting X = 0,1,2,3,4 or 5 (there are only 6 options, described in the
help and fully documented in the code). If you do this, check that all the
avw.hdr.dime fields are correct once the data is loaded, especially .dim and
.pixdim.
A new analyze volume can written out with:
avw_img_write(avw,'filename',X)
Here you can force the orientation to be written with the X option, as
above. This function will set the .hdr.hist.orient field with a value from
0-5 to indicate what the orientation of the volume is.
Cheers, Darren
>
> Erik-Jan Vlieger wrote:
> > Hi,
> >
> > AIR5 has a tool to reorient analyze files; make them saggital, flip
> > left/right, etc. I wanted to use this tool on my 4D analyze file,
however, as
> > AIR5 is solely 3D, it only kept the first volume of my 4D file.
> >
> > Does FSL include a similar tool? If not, does anyone have a suggestion
on how
> > to accomplish the same task?
> >
> > Thanks,
> > Erik-Jan Vlieger
>
|