# How to get intensity range of a volume?

**URL:** <https://discourse.slicer.org/t/how-to-get-intensity-range-of-a-volume/17949>\
**Category:** Development\
**Tags:** python\
**Created:** [June 4, 2021, 7:37am UTC](https://discourse.slicer.org/t/how-to-get-intensity-range-of-a-volume/17949 "2021-06-04T07:37:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [June 4, 2021, 7:37am UTC](https://discourse.slicer.org/t/how-to-get-intensity-range-of-a-volume/17949/1 "2021-06-04T07:37:20Z")

</div>

> [@Threshold scalar volume to labelmap](https://discourse.slicer.org/t/threshold-scalar-volume-to-labelmap/4457/1):
>
> `volumeNo`

how to get a scalar range value of a volume.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/4/04b66b388a854ffd1f244b5bdbd3f88450e762a6.png)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [June 4, 2021, 4:15pm UTC](https://discourse.slicer.org/t/how-to-get-intensity-range-of-a-volume/17949/2 "2021-06-04T16:15:01Z")

</div>

If you’re looking to get this range using Python, I searched the [Script Repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) with the keywords “ScalarRange”. There is an example of get the scalar range in the following example:  
[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#show-volume-rendering-automatically-when-a-volume-is-loaded](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#show-volume-rendering-automatically-when-a-volume-is-loaded)
