Hi,
Firstly, the information you gave below is from fsledithd, but it is
fslhd which
gives the more detailed information about the header.
The utility fslorient allows you to do many things in order to change
orientation information. If you have made your 4D nifti file then all
you have to do to encode "neurological" orientation is the following:
fslorient -steqformcode 1 yourimage
fslorient -forceneurological yourimage
However, you need to check that the labels shown in FSLView,
after doing these steps, are correct. If they are not then you
*should not* use these images. It is crucial that you make sure
that the labels are correct (and you'll need to figure out a way
of distinguishing left from right in the images - I hope you have
a marker of some form).
If the images do not end up with the right labels, then one way
to try and fix that is to take the original 4D image (before the
above commands) and run fslswapdim on it until it appears in
FSLView in the same orientation as the MNI152 image. Once
you've done this then you can do the above fslorient commands.
When doing the fslswapdim commands you will probably not get
left and right correct, and never use a result which occurs with
a warning about swapping left and right - you must avoid this in
such a process or you will not have "neurological" ordering anymore.
Hopefully you won't need to run fslswapdim, but if you do you'll
just need to go with trial and error to find the right command
to achieve your orientation (without a warning about left/right).
I hope this is clear. It is really not that easy to do and working
with Analyze should really be avoided where possible. Things
work much more easily with nifti from the outset.
Best of luck,
Mark
On 1 Sep 2010, at 05:51, [log in to unmask] wrote:
> Hi,
>
> I have 4D nifti files that were created by concatenating 35 analyze
> images that were in neurological orientation. This 4D image is also
> in neurological orientation, but because it was created from the
> analyze files fsl assumes that the data are stored in radiological
> orientation. Is there anyway to modify the nifti header so that I
> can specify the correct orientation resulting in congruent header
> and data storage orientation? I'd like the keep the data stored in
> neurological orientation. I'm guessing fslorient -forceneurological
> doesn't work because the header is missing the fields necessary to
> encode orientation.
>
> Currently the header reads as follows:
>
> # FSLEDITHD
> # This text file contains the header information for an Analyze or
> Nifti file
> # Simply edit this file then save it and the header will be
> regenerated
> # All lines starting with the hash (#) character, like this line,
> will be ignored
> # Ensure that all lines intended to set values take the form: name =
> 'value'
> # Note that if the file is Analyze then many settings will be ignored
> # Further note that the filetype cannot be changed by this program
> # i.e. changing the nifti_type has no effect
>
> <nifti_image
> nifti_type = 'NIFTI-1+'
> image_offset = '352'
> ndim = '4'
> nx = '192'
> ny = '192'
> nz = '55'
> nt = '35'
> dx = '1.25'
> dy = '1.25'
> dz = '2.5'
> dt = '1'
> datatype = '4'
> nbyper = '2'
> byteorder = 'LSB_FIRST'
> scl_slope = '1'
> scl_inter = '0'
> xyz_units = '2'
> time_units = '8'
> descrip = 'FSL4.0'
> num_ext = '0'
>
> # Many fields require codes to be set (e.g. sform_code, qform_code,
> intent_code)
> # Valid values are:
> # sform_code (or qform) :- 0=UNKNOWN, 1=SCANNER_ANAT,
> 2=ALIGNED_ANAT, 3=TALAIRACH, 4=MNI_152
> # xyz_units :- 1=METER, 2=MM, 3=MICRON
> # t_units :- 8=SEC, 16=MSEC, 24=USEC, 32=HZ, 40=PPM, 48=RADS
> # intent_code :- 0=NONE, 2=CORRELATION, 3=TTEST, 4=FTEST,
> 5=ZSCORE, 6=CHISQ, ...
> # 22=PVAL, 23=LOGPVAL, 24=LOG10PVAL, 1001=ESTIMATE,
> 1002=LABEL (incl masks)
> # Other codes can be found in the /space/raid/fmri/
> fsl-4.1.6-centos5_64/src/niftiio/nifti1.h file
>
> />
>
> Thank you,
> Angie
>
|