# Volume Reconstruction Module in python

**URL:** <https://discourse.slicer.org/t/volume-reconstruction-module-in-python/29245>\
**Category:** Support\
**Tags:** python\
**Created:** [May 2, 2023, 1:59pm UTC](https://discourse.slicer.org/t/volume-reconstruction-module-in-python/29245 "2023-05-02T13:59:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albags](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Albags](https://discourse.slicer.org/u/Albags)\
**Post date:** [May 2, 2023, 1:59pm UTC](https://discourse.slicer.org/t/volume-reconstruction-module-in-python/29245/1 "2023-05-02T13:59:43Z")

</div>

Hi 3D Slicer team,

I am trying to create a new module in python and for one of the functionalities that I want to implement I need as an input a reconstructed volume of live ultrasound data. I saw that I can reconstruct live data using the “Volume Reconstruction” module, however I was wondering if it is possible to implement that module, or the main functions of the module, in my new module, so most of the parameters are hardcoded and I only need to press a “start” button in my module to get the reconstructed volume.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [May 2, 2023, 3:11pm UTC](https://discourse.slicer.org/t/volume-reconstruction-module-in-python/29245/2 "2023-05-02T15:11:12Z")

</div>

Volume reconstruction can be controlled outside of the module by setting parameters on the “[vtkMRMLVolumeReconstructionNode](https://github.com/SlicerIGT/SlicerIGT/blob/master/VolumeReconstruction/MRML/vtkMRMLVolumeReconstructionNode.h)”, and calling methods on the [vtkSlicerVolumeReconstructionLogic](https://github.com/SlicerIGT/SlicerIGT/blob/master/VolumeReconstruction/Logic/vtkSlicerVolumeReconstructionLogic.h).

In the case of live volume reconstruction, you would set the input image, ROI, and output volume and then call:

```auto
slicer.modules.volumereconstruction.logic().StartLiveVolumeReconstruction(volumeReconstructionNode)
...
slicer.modules.volumereconstruction.logic().StopLiveVolumeReconstruction(volumeReconstructionNode)

```

---

<div class="post-metadata">

**Author:** ![Albags](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Albags](https://discourse.slicer.org/u/Albags)\
**Post date:** [May 2, 2023, 4:17pm UTC](https://discourse.slicer.org/t/volume-reconstruction-module-in-python/29245/3 "2023-05-02T16:17:14Z")

</div>

Thank you very much for the fast answer! It works 🙂
