# How to extract the HU value from a point using python scripting?

**URL:** <https://discourse.slicer.org/t/how-to-extract-the-hu-value-from-a-point-using-python-scripting/42164>\
**Category:** Support\
**Created:** [March 15, 2025, 11:00pm UTC](https://discourse.slicer.org/t/how-to-extract-the-hu-value-from-a-point-using-python-scripting/42164 "2025-03-15T23:00:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Kuo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/william_kuo/32/65525_2.png) [@William\_Kuo](https://discourse.slicer.org/u/William_Kuo)\
**Post date:** [March 15, 2025, 11:00pm UTC](https://discourse.slicer.org/t/how-to-extract-the-hu-value-from-a-point-using-python-scripting/42164/1 "2025-03-15T23:00:28Z")

</div>

I want to use a point from a mesh to find the associated voxel and its HU in python.

Has there been examples of this done?

---

<div class="post-metadata">

**Author:** ![William\_Kuo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/william_kuo/32/65525_2.png) [@William\_Kuo](https://discourse.slicer.org/u/William_Kuo)\
**Post date:** [March 17, 2025, 2:08am UTC](https://discourse.slicer.org/t/how-to-extract-the-hu-value-from-a-point-using-python-scripting/42164/2 "2025-03-17T02:08:57Z")

</div>

Update. I was able to use example code in python to figure it out.
