# 2D View slice intensity doesn't correspond to python array value（Confusion）

**URL:** <https://discourse.slicer.org/t/2d-view-slice-intensity-doesnt-correspond-to-python-array-value-confusion/8318>\
**Category:** Support\
**Created:** [September 6, 2019, 2:40am UTC](https://discourse.slicer.org/t/2d-view-slice-intensity-doesnt-correspond-to-python-array-value-confusion/8318 "2019-09-06T02:40:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikecsu](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mikecsu](https://discourse.slicer.org/u/mikecsu)\
**Post date:** [September 6, 2019, 2:40am UTC](https://discourse.slicer.org/t/2d-view-slice-intensity-doesnt-correspond-to-python-array-value-confusion/8318/1 "2019-09-06T02:40:34Z")

</div>

Operating system:win10  
Slicer version:slicer 4.10.0/4.10.1  
Expected behavior:  
Actual behavior:

Hi,everyone. I am trying to understand how slicer 2D images present in the form of an array in python.  
So i did some work (see the below pic). The result makes me pretty confused, the intensity in images and the value in the array should be the same, right ?

I hope someone can help me to clear up my confusion.

Thanks in advance .

 ![%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE(27)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/b/8b0b0ec9ec81fb2a0f6f26daba0c9d88e4dc29ec.png)

---

<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:** [September 6, 2019, 3:42am UTC](https://discourse.slicer.org/t/2d-view-slice-intensity-doesnt-correspond-to-python-array-value-confusion/8318/2 "2019-09-06T03:42:27Z")

</div>

Numpy uses inverse indexing order (k, j, i).

In the example above, `va[138, 277, 163]` should give you the results you expect.

See further examples in script repository, such as [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get\_markup\_fiducial\_RAS\_coordinates\_from\_volume\_voxel\_coordinates](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_markup_fiducial_RAS_coordinates_from_volume_voxel_coordinates)
