i uploaded my data and groomed them.then i saw the meshes were aligned.but when i use the groomed vtk on my code, i found the vtk files not aligned. how can i get the data which looks like gui shows
ShapeWorks doesn’t modify the position of the meshes for a couple of reasons:
-
This allows both the original and groomed shapes to be in the original coordinate space
-
This minimizes resampling for segmentations
-
Allows for multiple alignments when using multiple anatomies (e.g. local alignment per domain and global alignment, combined)
In the Studio GUI and in the optimization, we instead pass the transform and the original data. The viewer applies the transform only as part of a view/camera transform. The optimization uses the initial transform and may add additional transforms with procrustes.
To apply the alignment transform you can use the ShapeWorks Python API (Mesh.applyTransform)