# arrayFromVolume

**URL:** <https://discourse.slicer.org/t/arrayfromvolume/5121>\
**Category:** Development\
**Tags:** build, segmentation\
**Created:** [December 18, 2018, 10:14am UTC](https://discourse.slicer.org/t/arrayfromvolume/5121 "2018-12-18T10:14:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdelkhalek](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@Abdelkhalek](https://discourse.slicer.org/u/Abdelkhalek)\
**Post date:** [December 18, 2018, 10:14am UTC](https://discourse.slicer.org/t/arrayfromvolume/5121/1 "2018-12-18T10:14:56Z")

</div>

Hi everyone, could you please tell me how can I find the equation or the mathematical procedure which is behind the arrayFromVolume?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [December 18, 2018, 1:37pm UTC](https://discourse.slicer.org/t/arrayfromvolume/5121/2 "2018-12-18T13:37:57Z")

</div>

The code for arrayFromVolume is here: [https://github.com/Slicer/Slicer/blob/5d70815798b8f324b2a14ad6e9cfa1634edf9ba9/Base/Python/slicer/util.py#L739](https://github.com/Slicer/Slicer/blob/5d70815798b8f324b2a14ad6e9cfa1634edf9ba9/Base/Python/slicer/util.py#L739)

It basicly just provides a numpy view into memory managed by VTK

---

<div class="post-metadata">

**Author:** ![Abdelkhalek](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@Abdelkhalek](https://discourse.slicer.org/u/Abdelkhalek)\
**Post date:** [December 19, 2018, 11:18am UTC](https://discourse.slicer.org/t/arrayfromvolume/5121/3 "2018-12-19T11:18:36Z")

</div>

Thank you Sam\_Horvath for your reply. However, I am looking for the mathematical procedure(e.g., equations etc…).

---

<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:** [December 19, 2018, 2:46pm UTC](https://discourse.slicer.org/t/arrayfromvolume/5121/4 "2018-12-19T14:46:41Z")

</div>

There is no mathematical procedure in `arrayFromVolume`. If you need to describe it as an equation: _voxelValueInArray_ = _voxelValueInVolumeNode_.
