-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WISH: Add antsApplyTransformsToPoints to ANTsR #45
Comments
I am in agreement about this and put it on the to do list.
|
Incidentally, @zarquon42b, have you looked at my NeuroAnatomy Toolbox which needs to handle similar kinds of functionality (transforming points, surfaces, linesets and also volumes) – presently only for the CMTK registration suite but I hope to provide ANTs support (via ANTsR) in due course. For example there is an https://github.com/jefferis/nat/blob/master/R/xform.R#L63-L78 and rely on two helper functions, # get
xyzmatrix.shape3d<-function(x, ...){
cbind(x$vb[1, ]/x$vb[4, ], x$vb[2, ]/x$vb[4, ], x$vb[3, ]/x$vb[4, ])
}
# set
`xyzmatrix<-.shape3d`<-function(x, value){
x$vb=t(cbind(value, 1))
x
} I would be interested to see if we can learn anything from our respective implementations. Best wishes, Greg. |
Hi @jefferis , thanks for the tips, I only had a peak at your package but will look closer. Up until now my own work is mostly based on 3d-point sets (landmarks) and triangular meshes. I have implemented a simple way to compute rigid, affine, similarity and tps deforms for meshes/points based on landmark transforms in computeTransform and applyTransform, as well as some elastic and non-elastic icp in my inofficial package mesheR. Best |
this is now added to antsr ... the behavior is consistent with the chicken example ... i am leaving this issue open in case there is further discussion wrt IJK to RAS or other cases. the basic idea of aatxtp is to transform the first d coordinates and carry along any other information beyond dimension d. |
@zarquon42b - added a more detailed example here that may help clarify transformation standards 334b52f |
assuming this is working well .... so closing. |
Hi,
as I am mostly dealing with Volume and surface data, I momentarily am using a wrapper called antsTransformPoints* (it is an S3 function) calling the command line tool antsApplyTransformsToPoints to apply the transforms to point sets. It takes care of IJK to RAS transform and works on matrices and meshes of class "mesh3d". Would it be a big issue to implement this in ANTsR?
*) vert2points used from Morpho is simply
Best
Stefan
The text was updated successfully, but these errors were encountered: