# Merging VTK model of Heart and DICOM

**URL:** https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384
**Category:** Support
**Tags:** segmentation, dicom
**Created:** [December 4, 2019, 3:07pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384 "2019-12-04T15:07:12Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 4, 2019, 3:07pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/1 "2019-12-04T15:07:12Z")

</div>

Hello,

i need you help. I have a VTK model with scalars and DICOM series. Can you tel me if is possible to merge colour (scalars) to the DICOM series? Or maybe is sufficient to mark white voxels according to a specific color on the VTK map.

Can you anyone help me?  
Thank  
Honza H

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 4, 2019, 3:07pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/2 "2019-12-04T15:07:20Z")

</div>

Plese is here anyone who can help me? I need merge some properties of VTK map to the DICOM and export DiCOM  
Thanks

---

<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: [December 4, 2019, 3:12pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/3 "2019-12-04T15:12:36Z")

</div>

You can merge information and export to DICOM, so probably what you want is doable, but it is not clear what you are trying to achieve. Would you like to export to DICOM an image or a surface? What should it contain (can you attach a sketch or screenshot)? How do you plan to use the exported DICOM series? What software will import and use the created DICOM series?

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 4, 2019, 3:56pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/4 "2019-12-04T15:56:02Z")

</div>

Thank you for your message. Maybe i am far away than you though. I have dicom series of heart in 3D slicer and equally VTK map from carto with colormap (bipolar map). I want merge colormap or scar of map to the dicom series.  
Is it possible? Screen or video i can show you tomorrow?  
Thanks

---

<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: [December 4, 2019, 4:04pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/5 "2019-12-04T16:04:50Z")

</div>

You can alter (paint inside) a volume by using Segment Editor modules’s Mask volume effect (provided by SegmentEditorExtraEffects extension). You can create segments by manually painting or placing markup points (e.g., using Surface Cut effect) or automatically (as shown in examples in the [script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script)).

I am at RSNA all week, but if you can join the [Slicer hangout](https://discourse.slicer.org/c/community/hangout) next Tuesday and you may also consider joining one of the [Slicer Project weeks](https://projectweek.na-mic.org/).

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 4, 2019, 4:33pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/6 "2019-12-04T16:33:09Z")

</div>

Ehm, do you think, that when i send you a model, you can show me a short video on some randomly heart CT?

---

<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: [December 4, 2019, 5:12pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/7 "2019-12-04T17:12:45Z")

</div>

You can find a video here that shows how to alter an existing volume using Mask volume and surface cut:

In the video, we set regions to intensity of air, essentially hiding/erasing them, but you can set intensity to a high value to make regions very visible.

If you are interested in automating the procedure then you can start from [this example](https://gist.github.com/lassoan/2d5a5b73645f65a5eb6f8d5f97abf31b), which shows how to create sphere-shaped segments at specified anatomical positions.

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 4, 2019, 8:53pm UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/8 "2019-12-04T20:53:43Z")

</div>

Hi,  
I think that this is not that what i need. But i am not so experience like you. So i will try study 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: [December 5, 2019, 12:32am UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/9 "2019-12-05T00:32:17Z")

</div>

How do you envision to use the model in generating/modifying an image?

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 5, 2019, 4:50am UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/10 "2019-12-05T04:50:40Z")

</div>

the model is used to bridge colors to DICOM, or depending on the model to highlight white pixels on DICOM so that this location can be focused by CyberKnife

---

<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: [December 5, 2019, 7:33am UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/11 "2019-12-05T07:33:44Z")

</div>

Probably the easiest is to create a segmentation node and paint into it using Paint effect in segment editor (enable “Sphere brush”, “Edit in 3D views”, click “%” button to switch brush diameter setting to “mm” and set the desired size - e.g., 5mm). You can paint on 3D electrophysical map model and the points/strokes will be added to the segmentation (that is visible in 2D and can be shown in 3D by clicking “Show 3D”):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/f/3f9fa5156fa1f867ba544834a6f68bd005d9a46f.jpeg)

When you are done, use Mask volume effect to paste the segments into the volume (e.g., as very bright regions):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/52b5ae814eb48de7ee2e7ceb7ac0e696d8be4f42.jpeg)

If the CyberKnife treatment planning system can load DICOM RT Structure Set or DICOM Segmentation Object then you don’t have to paste the targets into the volume but you can export the segmentation to a separate DICOM object.

---

<div class="post-metadata">

### Author: ![Honza\_Hecko](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/honza_hecko/32/5303_2.png) [@Honza\_Hecko](https://discourse.slicer.org/u/Honza_Hecko)
#### Post date: [December 5, 2019, 7:47am UTC](https://discourse.slicer.org/t/merging-vtk-model-of-heart-and-dicom/9384/12 "2019-12-05T07:47:43Z")

</div>

Wow, i think that this is what i want 🙂 i try that and after that i report you. Ok?
