# Include a data probe in the slicer layoutmanager

**URL:** <https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734>\
**Category:** Development\
**Created:** [September 28, 2020, 1:35pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734 "2020-09-28T13:35:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 28, 2020, 1:35pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/1 "2020-09-28T13:35:13Z")

</div>

How can I include a data probe in the slicer layout manager?

 ![Screenshot from 2020-09-03 19-50-34](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/2/e2944d19ee1ee829db963c496f3477e7bd654454.png)  
I want to insert a data probe in this layout.

---

<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:** [September 28, 2020, 1:58pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/2 "2020-09-28T13:58:39Z")

</div>

You can insert any Qt widget into the layout using `qSlicerSingletonViewFactory`. See how [DICOM.py](https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/DICOM/DICOM.py) displays `self.viewWidget` as an example.

---

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 28, 2020, 2:07pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/3 "2020-09-28T14:07:54Z")

</div>

I just want to put the native slicer data probe into the layout. I dont want to create any new instances. If I use this approach how can I get dataprobe widget instance of the slicer?

---

<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:** [September 28, 2020, 3:01pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/4 "2020-09-28T15:01:03Z")

</div>

You can only put a Qt widget at one place at a time, therefore you need to create a new instance of the data probe. You probably need to customize that widget anyway to look good in the view layout.

---

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 29, 2020, 5:18am UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/5 "2020-09-29T05:18:30Z")

</div>

How can I create a new data probe instance and connect them to slice nodes?  
Isn’t it a hard task? Even if so could you show me how to do that?

---

<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:** [September 29, 2020, 1:39pm UTC](https://discourse.slicer.org/t/include-a-data-probe-in-the-slicer-layoutmanager/13734/6 "2020-09-29T13:39:06Z")

</div>

You can instantiate a new data probe like this:

```python
import DataProbe
w = DataProbe.DataProbeInfoWidget()
w.frame.show()

```
