Hello, I’m currently using the vtkThinPlateSplineTransform to do data augmentation on a mesh of a heart in Python. I would like to visualize the Thin Plate Spline i have fitted to a set of source and target points such that i can view the applied distortion as a plotted function in 3D.
The code i have is currently is:
transform = vtk.vtkThinPlateSplineTransform()
transform.SetSourceLandmarks(p1)
transform.SetTargetLandmarks(p2)
transform.SetBasisToR2LogR()
transform.Update()
transform_filter = vtk.vtkTransformPolyDataFilter()
transform_filter.SetTransform(transform)
transform_filter.SetInputData(pd)
transform_filter.Update()
where p1 is the source points and p2 are the target points.
Is there any way i can exctract the fitted functions from the transform variable? Can i visualize the function with any VTK render functions or can i perhaps do it with matplotlib?
I’m a mere novice with this amazing software so doing simple things like this is not that easy.
Thanks,
Bjørn Hansen