# Merge CT volume node with a model node in python

**URL:** <https://discourse.slicer.org/t/merge-ct-volume-node-with-a-model-node-in-python/9457>\
**Category:** Development\
**Created:** [December 10, 2019, 4:17am UTC](https://discourse.slicer.org/t/merge-ct-volume-node-with-a-model-node-in-python/9457 "2019-12-10T04:17:08Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![talmazov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/talmazov/32/3966_2.png) [@talmazov](https://discourse.slicer.org/u/talmazov)\
**Post date:** [December 17, 2019, 11:44pm UTC](https://discourse.slicer.org/t/merge-ct-volume-node-with-a-model-node-in-python/9457/5 "2019-12-17T23:44:04Z")

</div>

hey, i found have this from the nightly script repository

> meshVolumeNode = getNode(mesh\_model)  
> seg = slicer.mrmlScene.AddNewNodeByClass(‘vtkMRMLSegmentationNode’)  
> slicer.modules.segmentations.logic().ImportModelToSegmentationNode(meshVolumeNode, seg)  
> seg.CreateClosedSurfaceRepresentation()  
> slicer.mrmlScene.RemoveNode(meshVolumeNode)

once i have a segment volume node, how can i merge it with a CT volume node?  
also what is the function SetAndObserveImageData used for? the VTK documentation doesn’t explain much.

I’m working on an extension that builds around panoramic reconstruction which essentially straightens a volume: [Slice rotation in viewport when using SetSliceToRASByNTP in python - #2 by lassoan](https://discourse.slicer.org/t/slice-rotation-in-viewport-when-using-setslicetorasbyntp-in-python/7191/2)  
but i also want this reconstruction to incorporate mesh models so im trying to merge volumes - im not sure if this is the correct approach to this.

thanks!

---

_[View the full topic](https://discourse.slicer.org/t/merge-ct-volume-node-with-a-model-node-in-python/9457)._
