On 13.02.2008, at 13:26, Michael Hanke wrote:
> I had to convert a file from ANALYZE to NIFTI where the sform-analogue
> transformation matrix came as a separate text file. I used
> fslchfiletype
> to convert the file into NIFTI and then thought to restore the
> orientation information:
[...]
Because of similar peculiarities I ended up using nifti_tool (from
nifticlib) instead of the FSL tools in a case where I needed full
control over the resulting nifti header.
> I guess I still have difficulties to grasp all relations between qform
> and sform,
See the comments in nifti1.h (especially `WHY 3 METHODS?´ and the
paragraphs before) for how the designers meant the format to be used.
(Though i don't think I've seen a DICOM converter yet whose output
conforms to these recommendations.)
> but it would be nice if fslorient would announce if it does
> not/cannot do what it was told (or maybe even explain why).
I think you probably can get away with using -setqform/-setqformcode
with the same matrix instead (or, if it won't let you, simply set
both sform and qform to the same orientation, like many other tools
in the wild).
Regards,
Timm
|