# Creating an array to use in: volumeNode.GetIJKToRASDirections (array)

**URL:** <https://discourse.slicer.org/t/creating-an-array-to-use-in-volumenode-getijktorasdirections-array/4276>\
**Category:** Development\
**Created:** [October 3, 2018, 6:54pm UTC](https://discourse.slicer.org/t/creating-an-array-to-use-in-volumenode-getijktorasdirections-array/4276 "2018-10-03T18:54:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [October 3, 2018, 7:25pm UTC](https://discourse.slicer.org/t/creating-an-array-to-use-in-volumenode-getijktorasdirections-array/4276/2 "2018-10-03T19:25:19Z")

</div>

Here is a post with some example code that should help:

> [@ACPC transform question](https://discourse.slicer.org/t/acpc-transform-question/3525/2):
>
> Hi Alexis, You can try this code on the Python console: import numpy as np import SampleData def getSampleVolume(): # Download MRHead sampleDataLogic = SampleData.SampleDataLogic() volumeNode = sampleDataLogic.downloadMRHead() return volumeNode def getMatrixToACPC(ac, pc, ih): # Anteroposterior axis pcAc = ac - pc yAxis = pcAc / np.linalg.norm(pcAc) # Lateral axis acIhDir = ih - ac xAxis = np.cross(yAxis, acIhDir) xAxis /= np.linalg.norm(xAxis) …

---

_[View the full topic](https://discourse.slicer.org/t/creating-an-array-to-use-in-volumenode-getijktorasdirections-array/4276)._
