Exported STL files dont match view in Slicer

I’m trying to export a segmentation to an STL mesh. I’m able to export it and read it in successfully, but the mesh I get out doesn’t seem to match up to what I see in Slicer. In the attached image, you can see point 6 and 7 are well within the yellow segmentation (right), but in the exported STL file, 7 ends up outside the mesh (left). Is there something I can do to export the mesh with higher fidelity?

As an alternative, I was considering exporting 2D slices of the segmentations. Is there a way to do this?

I’m using slicer 4.10.2 on a MBP, and Matlab 2020a.

Thanks!
-Ben

Screen Shot 2021-03-08 at 10.47.16 AM

Slicer now reads all files in LPS coordinate system. Before Slicer-4.11, it expected STL files to be in RAS coordinate system by default. See more information about how to avoid RAS/LPS mismatch in the migration guide.

If there is no LPS/RAS issue but slight position and/or orientation differences then most likely that other software does not properly take into account image origin, spacing, or axis directions of the input volume.