# Line Profile - 2D image

**URL:** <https://discourse.slicer.org/t/line-profile-2d-image/9325>\
**Category:** Support\
**Tags:** feature\
**Created:** [November 28, 2019, 2:37pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325 "2019-11-28T14:37:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ycpan](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@ycpan](https://discourse.slicer.org/u/ycpan)\
**Post date:** [November 28, 2019, 2:37pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/1 "2019-11-28T14:37:25Z")

</div>

Hello,

I have been using Dr. Lasso’s Line Profile and it has worked well for a 3D CT volume. However, when analyzing a 2D image, I kept getting a line of zeros. I am wondering if this is because each coordinate of the line/ruler is three-dimensional and there might be a mismatch in the third direction perpendicular to the image plane?

Also, I think Line Profile is a useful tool that should be included in Kitware. Please let me know how I can help with this process!

Thank you,

Preston

---

<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:** [November 28, 2019, 2:52pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/2 "2019-11-28T14:52:22Z")

</div>

There are a few implementations of this module. Did you use the one in the “Sandbox” extension?

---

<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:** [November 28, 2019, 10:04pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/3 "2019-11-28T22:04:32Z")

</div>

VTK has trouble probing a single-slice volume. I’ve [asked for advice on the VTK forum](https://discourse.vtk.org/t/bounding-box-of-vtkimagedata/2178).

---

<div class="post-metadata">

**Author:** ![ycpan](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@ycpan](https://discourse.slicer.org/u/ycpan)\
**Post date:** [December 9, 2019, 9:34pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/4 "2019-12-09T21:34:21Z")

</div>

Yes, I am using the Sandbox extension. I am reading through the vtk forum you linked to. I am a beginning to vtk, so would you mind directing me to the right function to look at/modify if I were to get profiles of individual slices?

---

<div class="post-metadata">

**Author:** ![uwo27](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@uwo27](https://discourse.slicer.org/u/uwo27)\
**Post date:** [January 21, 2020, 6:32pm UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/5 "2020-01-21T18:32:00Z")

</div>

Hi -

Were you able to find a solution? I am encountering the same problem.

---

<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:** [January 22, 2020, 2:24am UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/7 "2020-01-22T02:24:53Z")

</div>

This problem turned out to be caused by a fundamental error in VTK (in how image boundaries are misinterpreted by vtkProbeFilter). I’ve [made point probing more robust](https://github.com/PerkLab/SlicerSandbox/commit/c6aba38d5701ed0abbf7e6c81e05197b7f039b98), which should fix this issue in releases downloaded tomorrow or later.

---

<div class="post-metadata">

**Author:** ![uwo27](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@uwo27](https://discourse.slicer.org/u/uwo27)\
**Post date:** [January 22, 2020, 2:37am UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/8 "2020-01-22T02:37:26Z")

</div>

Hi Andras - I’m using the “Sandbox” extension, if I re-download the extension tomorrow or later it should be okay?

---

<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:** [January 22, 2020, 9:25am UTC](https://discourse.slicer.org/t/line-profile-2d-image/9325/9 "2020-01-22T09:25:57Z")

</div>

Yes. The extension is updated each night, so you can wait a day and update (or uninstall and install) it. If you don’t want to wait a day then you can [modify LineProfile.py](https://github.com/PerkLab/SlicerSandbox/commit/c6aba38d5701ed0abbf7e6c81e05197b7f039b98) on your computer manually right now.
