# How to get current segmentation master volume?

**URL:** <https://discourse.slicer.org/t/how-to-get-current-segmentation-master-volume/12538>\
**Category:** Development\
**Created:** [July 14, 2020, 5:40pm UTC](https://discourse.slicer.org/t/how-to-get-current-segmentation-master-volume/12538 "2020-07-14T17:40:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vertebra](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vertebra/32/7475_2.png) [@vertebra](https://discourse.slicer.org/u/vertebra)\
**Post date:** [July 14, 2020, 5:40pm UTC](https://discourse.slicer.org/t/how-to-get-current-segmentation-master-volume/12538/1 "2020-07-14T17:40:14Z")

</div>

Hello! Thank you for all the help @Sunderlandkyl @lassoan - we got our module to work.

Our very last question is when we assign our masterVolumeNode right now:

masterVolumeNode = SampleData.SampleDataLogic().downloadCTACardio()

We assign it to a newly downloaded CTACardio. Is there a way to just assign it to the current master volume? Let’s say I upload my own files, what is the Python syntax to assign it to those files automatically?

Thanks!

---

<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:** [July 14, 2020, 8:39pm UTC](https://discourse.slicer.org/t/how-to-get-current-segmentation-master-volume/12538/2 "2020-07-14T20:39:27Z")

</div>

Have you tried vtkMRMLSegmentEditorNode::GetMasterVolumeNode()?  
[https://apidocs.slicer.org/master/classvtkMRMLSegmentEditorNode.html#ae7dbe89f755f115624dc1c701e9dcf80](https://apidocs.slicer.org/master/classvtkMRMLSegmentEditorNode.html#ae7dbe89f755f115624dc1c701e9dcf80)

---

<div class="post-metadata">

**Author:** ![vertebra](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vertebra/32/7475_2.png) [@vertebra](https://discourse.slicer.org/u/vertebra)\
**Post date:** [July 15, 2020, 1:12pm UTC](https://discourse.slicer.org/t/how-to-get-current-segmentation-master-volume/12538/3 "2020-07-15T13:12:41Z")

</div>

> [@Sunderlandkyl](#):
>
> GetMasterVolumeNode

Thank you! It works in our module.
