# Line Intensity profile resolution

**URL:** <https://discourse.slicer.org/t/line-intensity-profile-resolution/17785>\
**Category:** Support\
**Created:** [May 25, 2021, 11:18am UTC](https://discourse.slicer.org/t/line-intensity-profile-resolution/17785 "2021-05-25T11:18:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marianaslicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/marianaslicer/32/8555_2.png) [@marianaslicer](https://discourse.slicer.org/u/marianaslicer)\
**Post date:** [May 25, 2021, 11:18am UTC](https://discourse.slicer.org/t/line-intensity-profile-resolution/17785/1 "2021-05-25T11:18:04Z")

</div>

Hi everyone,

I would like to calculate the intensity profile along a line. My data has a resolution of 2 mm in the cranio-caudal direction and I don’t want to interpolate any value along the line.

Currently, I’m using the LineIntensityProfile module from SandBox extension, but it requires the resolution line parameter. Any idea how to compute the line intensity profile without changing the resolution?

---

<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:** [May 25, 2021, 11:59am UTC](https://discourse.slicer.org/t/line-intensity-profile-resolution/17785/2 "2021-05-25T11:59:28Z")

</div>

If you want to extract a line along one of the 3 image axes then you can do that by getting the volume as a numpy array and use array indexing. You can find examples for each step in the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html).

If the line is not exactly parallel with an image axis and you want to get samples at equal distances then you must resample (at any chosen resolution).
