TIFF volume orientation does not match source STL orientation

Hi SAM team,

We have been successfully using SAM to create partial volumes from CT segmentations, track these volumes, and apply the resulting transformations to AUT models in MATLAB to visualize motion.

We are now trying to repeat the same workflow using STL implant models instead of CT segmentations. Our workflow in 3D Slicer (version 5.10.0) is:

  1. Load the implant STL model into 3D Slicer.
  2. Convert the model to a segmentation node.
  3. Export the segmentation node as a binary labelmap volume.
  4. In the SAM pre-processing module, set the Volume Node to the binary labelmap and the Segmentation Node to the STL-derived segmentation.

The AUT models, volumes, and transforms are exported successfully. However, after tracking the generated TIFF volumes, applying the resulting transformation matrices to the AUT models produces an incorrect implant orientation.

While investigating, we noticed that the exported TIFF volumes appear to have a different orientation from the original STL model (specifically, a 180° rotation about the Y-axis). In contrast, the TIFF volumes generated from our CT segmentations retain the orientation of the source CT data. The images below show the STL (left) and CT (right) derived models and their associated TIFF volumes from the pre-processing module. Note: the TIFF volumes have been scaled back to match the same dimensions as the models.

Could this orientation mismatch be responsible for the incorrect tracking results? If so, is there a recommended workflow for using STL models with SAM that preserves the correct orientation, or an alternative approach that would avoid this issue?

Any guidance would be greatly appreciated.

Thank you,

Tomasz