how to get corresponding landmarks using existing BSpline deformation grid
Closed this issue · 1 comments
RossoneriMaldini commented
Thanks for sharing! We want to apply existing BSpline deformation grid to some landmarks of source image, how can we get corresponding points after this deformation grid.
keppenhof commented
You can apply a transformation to points by calling the transform object like a function. Assuming your points are in x
, and your image in im
,
t = gryds.BSplineTransformation(your_grid)
y = t.transform(x, scale=im.shape)
will put the transformed points in y
The image shape is necessary here because the transformation object needs to know where to place the control points.