Cropped loaded meshes

Hi,

I used Shapeworks to create a statistical shape model of cartilage. At first my input was binary segmentations but now I am using a different dataset which has .stl meshes. I didn’t want to change my pipeline so I tried to load the meshes and convert them to binary segmentations with shape_mesh = sw.Mesh(path_to_file) and then shape_seg = shape_mesh.toImage(). However, the meshes seem to get cut off on the sides. If I pad them, it just adds padding to the already cut off segmentations, is there any way I can avoid this?

Attached is an example of what is happening. The cropping is mainly visible on the left side of the segmentation.

Thanks!

The Mesh.toImage() shouldn’t cut off the segmentation. If you could provide a sample, perhaps we can fix it.

The toImage call does have parameters where you can give it a bounding box:

For example:

mesh = Mesh(“femur.ply”)
bbox = mesh.boundingBox().pad(2.0)
mesh.toImage(bbox)