# Return volume intensity value from tip of tracked stylus

**URL:** <https://discourse.slicer.org/t/return-volume-intensity-value-from-tip-of-tracked-stylus/4894>\
**Category:** Development\
**Tags:** surgical-navigation\
**Created:** [November 27, 2018, 7:06pm UTC](https://discourse.slicer.org/t/return-volume-intensity-value-from-tip-of-tracked-stylus/4894 "2018-11-27T19:06:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![banderies](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@banderies](https://discourse.slicer.org/u/banderies)\
**Post date:** [November 27, 2018, 7:06pm UTC](https://discourse.slicer.org/t/return-volume-intensity-value-from-tip-of-tracked-stylus/4894/1 "2018-11-27T19:06:46Z")

</div>

Hello all,

I am using a Polaris Vicra and SlicerIGT to track a NDI stylus/pointer, and I would like to return the intensity value from a volume at the tip of the stylus (the StylusTipToStylus transform). I am sure that there is a built in function for this, but have been unable to locate it. I would greatly appreciate it if someone could point me in the right direction.

Thanks and best regards,  
Barrett

---

<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, 2018, 5:52am UTC](https://discourse.slicer.org/t/return-volume-intensity-value-from-tip-of-tracked-stylus/4894/2 "2018-11-28T05:52:25Z")

</div>

These two examples should contain all that you need:

- [Observe a transform, get RAS (world) position](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_a_notification_if_a_transform_is_modified)
- [Get voxel value from RAS position](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_volume_voxel_coordinates_from_markup_fiducial_RAS_coordinates)

---

<div class="post-metadata">

**Author:** ![banderies](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@banderies](https://discourse.slicer.org/u/banderies)\
**Post date:** [December 3, 2018, 3:32am UTC](https://discourse.slicer.org/t/return-volume-intensity-value-from-tip-of-tracked-stylus/4894/3 "2018-12-03T03:32:39Z")

</div>

@lassoan That worked, thanks!
