Thank you. But with the below code,
from shapeworks import *
shape_path = ‘/mean_geo/par_512.stl’
shapeMesh = sw.Mesh(shape_path)
shapeMesh_vtk = sw.sw2vtkMesh(shapeMesh)
mean_particles = '/particles/mean_particles.particles’
reference_mesh =shapeMesh_vtk # Mesh(shapeMesh_vtk)
particles = ParticleSystem([mean_particles]).ShapeAsPointSet(0)
warper = MeshWarper()
warper.generateWarp(reference_mesh, particles)
it is showing me error as ’ generateWarp(): incompatible function arguments. The following argument types are supported:
1. (self: shapeworks_py.MeshWarper, reference_mesh: shapeworks_py.Mesh, reference_particles: numpy.ndarray[numpy.float64[m, n]]) → bool
2. (self: shapeworks_py.MeshWarper, reference_mesh: shapeworks_py.Mesh, reference_particles: numpy.ndarray[numpy.float64[m, n]], landmarks: numpy.ndarray[numpy.float64[m, n]]) → bool
Invoked with: <shapeworks_py.MeshWarper object at 0x000002132F3BDE30>, PolyData (0x2132f485040)
N Cells: 17996
N Points: 9000
X Bounds: -5.189e+01, 3.424e+01
Y Bounds: -3.262e+01, 3.035e+01
Z Bounds: -1.396e+02, 9.510e+01
N Arrays: 0
, array([[ -2.94732, 5.13163, -75.2647 ],
[ -5.07009, -23.7317 , 26.3011 ],
[ 21.2718 , -5.59686, -30.3606 ],
…,
[ 9.99318, -25.7292 , 76.1548 ],
[ -29.259 , 13.1121 , 92.0959 ],
[ 21.045 , 15.0181 , -136.303 ]])’
Please let me know how to move forward with this. It difficult to debug it.
Thanks in advance
I