# How to get the opacity value at a point/cell (in world coordinate) on an object of vtkImageData

**URL:** https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691
**Category:** Support
**Created:** [September 24, 2021, 12:18pm UTC](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691 "2021-09-24T12:18:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![YuezhenQin](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/f1d935/32.png) [@YuezhenQin](https://discourse.vtk.org/u/YuezhenQin)
#### Post date: [September 24, 2021, 12:18pm UTC](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691/1 "2021-09-24T12:18:14Z")

</div>

I made a line intersected with the vtkbox of vtkImageData volume and collected the intersection cell ids. I am wondering if vtk provide class or method to help me get the opacity value at each point/cell.

Thanks! It has made me confused for weeks.

---

<div class="post-metadata">

### Author: ![codeling](https://discourse.vtk.org/user_avatar/discourse.vtk.org/codeling/32/3792_2.png) [@codeling](https://discourse.vtk.org/u/codeling)
#### Post date: [September 24, 2021, 2:27pm UTC](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691/2 "2021-09-24T14:27:31Z")

</div>

I think you might be looking for the [vtkProbeFilter](https://vtk.org/doc/nightly/html/classvtkProbeFilter.html#details) class.  
For retrieving an opacity value instead of just the value inside the vtkImageData, you might have to map the image data values through your transfer function yourself.

---

<div class="post-metadata">

### Author: ![YuezhenQin](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/f1d935/32.png) [@YuezhenQin](https://discourse.vtk.org/u/YuezhenQin)
#### Post date: [January 11, 2022, 2:11pm UTC](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691/3 "2022-01-11T14:11:35Z")

</div>

Thanks! But I still can not find any examples related to both opacity value and vtkProbeFilter, if it is possible, can I ask you where can I find it on web?
