# Accessing Data Probe Module from Python

**URL:** https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453
**Category:** Support
**Created:** [July 9, 2020, 1:59am UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453 "2020-07-09T01:59:54Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![FatihSogukpinar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fatihsogukpinar/32/7257_2.png) [@FatihSogukpinar](https://discourse.slicer.org/u/FatihSogukpinar)
#### Post date: [July 9, 2020, 1:59am UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/1 "2020-07-09T01:59:54Z")

</div>

Hi all,

I am trying to access to what is displayed in the Data Probe Module. In particular, I need to access the anatomical information that is displayed there. For instance, I want to get the anatomical location corresponding to the location of the mouse tip.

What functions do I need to use to access that information ? I looked at the Documentation but I could not find any coding examples. etc.

Thank you !

---

<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: [July 9, 2020, 2:26am UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/2 "2020-07-09T02:26:22Z")

</div>

DataProbe module has no logic that other modules could use, but fortunately there is a much simpler way of getting anatomical location from the crosshair node. See complete example here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get\_current\_mouse\_coordinates\_in\_a\_slice\_view](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_current_mouse_coordinates_in_a_slice_view)

---

<div class="post-metadata">

### Author: ![FatihSogukpinar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fatihsogukpinar/32/7257_2.png) [@FatihSogukpinar](https://discourse.slicer.org/u/FatihSogukpinar)
#### Post date: [July 9, 2020, 4:06am UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/3 "2020-07-09T04:06:32Z")

</div>

Thanks !

I looked at the example, but I actually want to access to that information without using the mouse at all.  
For instance I want to get all the anatomical coordinates and locations corresponding to the points in the Markup Fiducials.

How should I modify the example code for this ?

Thank you…

---

<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: [July 9, 2020, 1:45pm UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/4 "2020-07-09T13:45:05Z")

</div>

Markups fiducial positions are already defined in anatomical coordinates.

---

<div class="post-metadata">

### Author: ![FatihSogukpinar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fatihsogukpinar/32/7257_2.png) [@FatihSogukpinar](https://discourse.slicer.org/u/FatihSogukpinar)
#### Post date: [July 9, 2020, 7:05pm UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/5 "2020-07-09T19:05:05Z")

</div>

Yes but can’t I obtain the anatomical names which are displayed in the Data Probe module ?

---

<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: [July 9, 2020, 7:09pm UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/6 "2020-07-09T19:09:58Z")

</div>

What do you mean by anatomical name? Can you attach a screenshot and mark the information that you would like to obtain?

---

<div class="post-metadata">

### Author: ![FatihSogukpinar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fatihsogukpinar/32/7257_2.png) [@FatihSogukpinar](https://discourse.slicer.org/u/FatihSogukpinar)
#### Post date: [July 9, 2020, 7:40pm UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/7 "2020-07-09T19:40:30Z")

</div>

Basically I need all the information provided by the Data Probe Module.

For the 1st screenshot, I need the indices which are displayed next to the coordinates.

For the 2nd, I need the names which correspond to the segments (in this example Amygdala).

 ![Screenshot (21)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/0/f0d7d4f375374dd481ee2bb873d6fd38f048119f.png) ![Screenshot (23)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/2/324e926066058083ebdad33032e44a56a399e53f.png)

---

<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: [July 9, 2020, 7:55pm UTC](https://discourse.slicer.org/t/accessing-data-probe-module-from-python/12453/8 "2020-07-09T19:55:21Z")

</div>

**Indices:** see above (example in the script repository), you can also have a look at the implementation in DataProbe:

> <https://github.com/Slicer/Slicer/blob/b13a49465eec642a3bd9c2d5c50b2afb57088259/Modules/Scripted/DataProbe/DataProbe.py#L233-L248>

**Segment names:** you can get them from the displayable managers, see implementation here:

> <https://github.com/Slicer/Slicer/blob/b13a49465eec642a3bd9c2d5c50b2afb57088259/Modules/Scripted/DataProbe/DataProbe.py#L250-L265>
