RAS to LPS transform for older models

We have a bunch of models (and associated landmarks) that were exported from Slicer 4-5 years ago. Instead of trying to remember to set the coordinate to RAS each time when loading them, we would like to convert them to LPS, so that they continue to line up with the landmarks.

So just loading them as RAS, and then simply re-saving them is the appropriate conversion procedure?

If a model is in RAS coordinate system and the coordinate system is not stored in the files then you need to select “RAS” when you load it (in “Add data” window). When you save this model, it will be saved in RAS coordinate system (to cause minimal change in the file), but the coordinate system will be stored in it. If you want to save as LPS then you need to change the coordinate system in its storage node:

getNode('SomeNode').GetStorageNode().SetCoordinateSystem(slicer.vtkMRMLStorageNode.CoordinateSystemLPS)
1 Like