# vtkMRMLCameraNode's coordinate system

**URL:** <https://discourse.slicer.org/t/vtkmrmlcameranodes-coordinate-system/27160>\
**Category:** Development\
**Tags:** python, coordinates\
**Created:** [January 10, 2023, 12:17pm UTC](https://discourse.slicer.org/t/vtkmrmlcameranodes-coordinate-system/27160 "2023-01-10T12:17:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsa934](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsa934/32/17907_2.png) [@dsa934](https://discourse.slicer.org/u/dsa934)\
**Post date:** [January 10, 2023, 12:17pm UTC](https://discourse.slicer.org/t/vtkmrmlcameranodes-coordinate-system/27160/1 "2023-01-10T12:17:45Z")

</div>

Operating system: window 11  
Slicer version: 4.13.0

Hi, everyone

I want to calculate the z-buffer of an object based on the camera position.  
As far as I know, the z buffer is calculated based on the camera coordinate system.

cameraNode = slicer.modules.cameras.logic().GetViewActiveCameraNode()

pos\_camera = [0,0,0]

cameraNode.GetPosition(pos\_camera)

Given the above situation, I have two questions.

Q1. What’s the camera’s position coordinate system ?

- Is the coordinate system of ‘pos\_camera’ a Camera(View) coordinate system or a RAS (World Coordinate system) coordinate system?

Q2. Does the camera default to perspective projection?

- I made a depth map for the parallel projection method, but if the camera settings are different, I would like to implement it again, so I ask a question.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 10, 2023, 6:30pm UTC](https://discourse.slicer.org/t/vtkmrmlcameranodes-coordinate-system/27160/2 "2023-01-10T18:30:23Z")

</div>

Camera position will be in RAS. The default camera is perspective, but it can be set to parallel if that works better for you.
