# Obtain Roi list of voxel with position and value

**URL:** <https://discourse.slicer.org/t/obtain-roi-list-of-voxel-with-position-and-value/16041>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [February 17, 2021, 7:53pm UTC](https://discourse.slicer.org/t/obtain-roi-list-of-voxel-with-position-and-value/16041 "2021-02-17T19:53:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GMA](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gma/32/4221_2.png) [@GMA](https://discourse.slicer.org/u/GMA)\
**Post date:** [February 17, 2021, 7:53pm UTC](https://discourse.slicer.org/t/obtain-roi-list-of-voxel-with-position-and-value/16041/1 "2021-02-17T19:53:15Z")

</div>

Hello to all,  
I’d like to know if it is possible to obtain the list of voxel within a segmentation in osirix and the corrispective value. I’d like to have a list of each value of every voxel in a roi. Is there any implementation using python?

Thank you very much!

gma

---

<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:** [February 17, 2021, 7:56pm UTC](https://discourse.slicer.org/t/obtain-roi-list-of-voxel-with-position-and-value/16041/2 "2021-02-17T19:56:06Z")

</div>

What you are asking for should be a small change to this example, just save the coordinates and value rather than the mean.

[https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get\_the\_values\_of\_all\_voxels\_for\_a\_label\_value](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_the_values_of_all_voxels_for_a_label_value)

---

<div class="post-metadata">

**Author:** ![GMA](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gma/32/4221_2.png) [@GMA](https://discourse.slicer.org/u/GMA)\
**Post date:** [February 17, 2021, 8:01pm UTC](https://discourse.slicer.org/t/obtain-roi-list-of-voxel-with-position-and-value/16041/3 "2021-02-17T20:01:56Z")

</div>

thank you very much!
