users
users > RE: Affine transformation order?
May 14, 2015 05:05 PM | Greg Jefferis
RE: Affine transformation order?
Originally posted by Gerry Sun:
https://github.com/jefferislab/BridgingRegistrations
If you happen to use R, you may also find this R package useful:
https://github.com/jefferis/nat
You can do things like
and it should look after some of the minor complexities for you.
Best wishes,
Greg.
I'm trying to transform coordinates of points of
an original volume into the registered space of the registered
volume.
I now have point (x,y,z) that I want to transform from Volume1 space to RefVol space using the transformations above. This should be simply
[x * 4D transformation matrix/matrices
y
z
1]
As Torsten says, the dof2mat tool will
be the easiest way to get a homogeneous affine transformation
matrix that you can then use. You also have the option to use the
cmtk streamxform tool. You do however need to be a little careful
about the directionality of the transform - you'll need the
--inverse switch for the direction you mention above. You can see
some examples of this here:I now have point (x,y,z) that I want to transform from Volume1 space to RefVol space using the transformations above. This should be simply
[x * 4D transformation matrix/matrices
y
z
1]
https://github.com/jefferislab/BridgingRegistrations
If you happen to use R, you may also find this R package useful:
https://github.com/jefferis/nat
You can do things like
library(nat)
m=matrix(rnorm(12), ncol=3)
xform(m, 'path/to/my/cmtk/reg.list')
and it should look after some of the minor complexities for you.
Best wishes,
Greg.
Threaded View
Title | Author | Date |
---|---|---|
Gerry Sun | May 13, 2015 | |
Greg Jefferis | May 14, 2015 | |
Gerry Sun | May 14, 2015 | |
Torsten Rohlfing | May 15, 2015 | |
Torsten Rohlfing | May 14, 2015 | |