[Insight-users] ImageWriter does not write Orientation (Direction
Cosines)
Gordon Kindlmann
gk at bwh.harvard.edu
Thu Jul 14 19:59:17 EDT 2005
hello,
> I'm a bit confused about how the NRRD IO works. Why does it rescale the
> direction cosines at all? I would prefer the assumption that the user
> has
> set them correctly...
Nrrd is representing a single matrix, the transform from index space to
world space. At a later point I may switch using the "spacings" field
in conjuction with the "space direction" field, so that the "space
directions" can be true unit vectors, but to me this seemed simplest
for now (given nrrd's existing use of a per-axis min, max, spacing, and
centering).
> Say I set the following direction cosines:
>
> 0.286406 0.118831 0.950711
> 0.948371 -0.176269 -0.263669
> 0.136249 0.977143 -0.16318
>
> then the NRRD IO writes:
>
> space directions:
> (0.24613,0.10212,0.817017)
> (0.815007,-0.151481,-0.22659)
> (0.681244,4.88571,-0.815902)
>
> if I read them with the NRRD IO, I read:
>
> 0.286406 0.948371 0.136249
> 0.118831 -0.176269 0.977143
> 0.950711 -0.263668 -0.163181
Hmm. Let me investigate this.
thanks,
Gordon
More information about the Insight-users
mailing list