[Nipy-devel] Affine orientation ordering - please review and test
Mon Jan 18 16:19:46 CST 2010
A few comments.
1) Why wouldn't you represent the output of io_orientation as a 4x4 matrix
with 0 or +- 1 entries, i.e. a permuation matrix multiplied by a diagonal
with +- entries? Then, apply_orientation is just a simple matrix
multiplication. I guess I don't really understand what flip_axis is doing.
2) If you like specifying orientations in the (3,2) format, why not write a
function that takes the (3,2) ornt info and gives the appropriate 4x4
3) There is really no need to assume 3-dimensions here. I know this will
annoy people, but io_orientation could take an (n+1)x(m+1) affine (n>m) and
return an (m+1)x(n+1) affine which is no longer necessarily square but has
only 0 or +-1 entries. Then, apply_orientation gives an (m+1)x(m+1) affine
matrix which represents the projection of the original n coordinates of the
affine onto an "optimal" (in some sense) m coordinate plane.
4) I don't understand what the function "orientation_affine" is supposed to
On Sat, Jan 16, 2010 at 7:19 PM, Matthew Brett <firstname.lastname@example.org>wrote:
> I've just added a function to calculate the voxel axes most closely
> corresponding to x, y, z output axes - to make it easier to reorder
> your image data to canonical x, y, z voxel order, if you want to.
> It's in my branch:
> in nipy/io/imageformats/affines.py
> Please do review, test, comment, it's experimental (Michael, it's in
> nibabel as well....)
> See y'all,
> Nipy-devel mailing list
Dept. of Statistics
Sequoia Hall, 137
390 Serra Mall
Stanford, CA 94305
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nipy-devel