# Can I transfer the RAS coordinate system back to LPS

**URL:** <https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394>\
**Category:** Development\
**Tags:** build, segmentation, python\
**Created:** [October 24, 2023, 7:21am UTC](https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394 "2023-10-24T07:21:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin-JZ](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/benjamin-jz/32/65776_2.png) [@Benjamin-JZ](https://discourse.slicer.org/u/Benjamin-JZ)\
**Post date:** [October 24, 2023, 7:21am UTC](https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394/1 "2023-10-24T07:21:15Z")

</div>

I know that patient data has been converted to values in the RAS coordinate system after being imported into 3Dslicer. For example, I have a DICOM metadata with Origin [-202, -33,100]. But the Origin obtained from the vtkMRMLVolumeNode and vtkMRMLSegmentationNode types is [202,33,100]. I would like to know if there is a method to convert or obtain the original Origin: [-202, -33,100].  
Thanks :–)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 24, 2023, 12:21pm UTC](https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394/2 "2023-10-24T12:21:50Z")

</div>

Can you please describe why you need this conversion _within_ Slicer? Normally all operations in Slicer happen in RAS, and then one can export the results in LPS. Would that work for you?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 24, 2023, 1:07pm UTC](https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394/3 "2023-10-24T13:07:12Z")

</div>

I agree that it should not be necessary to convert the internal coordinate values when you are in Slicer, as all coordinate values are stored as RAS.

You can of course _display_ coordinate values in any coordinate system; or use positive values and add the direction code (L/R, A/P, I/S) - as we do it in the Data Probe (in the lower-left corner). Conversion is trivial: invert the sign of the first two coordinates.

---

<div class="post-metadata">

**Author:** ![Benjamin-JZ](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/benjamin-jz/32/65776_2.png) [@Benjamin-JZ](https://discourse.slicer.org/u/Benjamin-JZ)\
**Post date:** [October 24, 2023, 1:21pm UTC](https://discourse.slicer.org/t/can-i-transfer-the-ras-coordinate-system-back-to-lps/32394/4 "2023-10-24T13:21:32Z")

</div>

Thank you for your answer. I know that doing so in 3Dslicer looks a bit like taking off your pants and farting. It’s unnecessary. It’s a long story. The representation I encountered earlier can only store one context, which means that no matter how many segments I annotate on a SegmentationNode. These segments have their own attributes. But in the end, these attributes will only correspond to a large annotation area in the end. Similar to the feeling of many to one. So I made other attempts. In fact, after observing, I also found that the conversion between LPS and RAS only requires adjusting the xy axis.

That’s it. Thank you again
