MeshCenterer#

class polpo.preprocessing.mesh.transform.MeshCenterer(attr='vertices')[source]#

Bases: PreprocessingStep

apply(mesh)[source]#

Center a mesh by putting its barycenter at origin of the coordinates.

Parameters:

mesh (trimesh.Trimesh) – Mesh to center.

Returns:

  • centered_mesh (trimesh.Trimesh) – Centered Mesh.

  • hippocampus_center (coordinates of center of the mesh before centering)