Aligning a surface model and volume rendering of the same skull

Hi community.

I have the DICOM files of a skull and the Surface model (in PLY format) separately.

When I load both into Slicer, and do the volume rendering of the DICOM files, I can see that they are NOT aligned.

How can I align/superimpose both (volume rendering and surface model)?

Thanks

This seems like RAS vs LPS coordinate issue. What happens when you choose the coordinate system for your 3d Model explicitly during the load.

Thats perfect. By changing to RAS the surface model load it was perfectly aligned. Thanks

Where did you do this segmentation? If this was done in slicer, this shouldn’t have happened.

Yes, I did my segmentation in Slicer. My flow was:

  1. Load the skull and segment it entirely.
  2. Export model to PLY format.
  3. Load the DICOM files and do volume rendering.
  4. Load the exported PLY file.

Best

Can you share a one dataset of dicom and segmentaiton. This should not have happened, if you exported from Slicer.

@pieper @lassoan

1 Like

Hi all,

I’m facing the same problem. I export a segment as stl using:

slicer.modules.segmentations.logic().ExportSegmentsClosedSurfaceRepresentationToFiles(saveResults_path,segmentationNode,segmentIDsVTK, 'STL',False,1.0,False)

Following the documentation (link) it should save the geometry in RAS coordinates.

I need to load this geometry in slicer automatically. I tried:

modelNode = slicer.util.loadModel(path)

But it seems that it is loading the model in LPS.

When I do it manually and selecting RAS it loads the model correctly.
imagen

How can I automate this process?