# Dashed lines for isodose curves

**URL:** <https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254>\
**Category:** Support\
**Created:** [October 20, 2017, 1:42pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254 "2017-10-20T13:42:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![larsf](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@larsf](https://discourse.slicer.org/u/larsf)\
**Post date:** [October 20, 2017, 1:42pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/1 "2017-10-20T13:42:47Z")

</div>

Dear Slicer experts,

Is there any way to create isodose curves using dashed lines (or dots, just not solid lines) in the Radiotherapy Isodose extension? I took a look in the Models module where the thickness of the isodose curves can be altered. But I did unfortunately not figure out a way to change the line type.

Thanks,

Lars

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 20, 2017, 4:47pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/2 "2017-10-20T16:47:58Z")

</div>

Hi Lars,

As far as I know model intersections indeed don’t support line styles. It may be possible to implement by running a filter on the line given by vtkCutter around [here](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLModelSliceDisplayableManager.cxx#L475-L493), but I’m not aware of a VTK filter that does that. If there is one, then this is fairly easy to implement.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 20, 2017, 4:59pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/3 "2017-10-20T16:59:28Z")

</div>

Or perhaps use these properties for the actor  
[https://www.vtk.org/Wiki/VTK/Examples/Python/DottedLine](https://www.vtk.org/Wiki/VTK/Examples/Python/DottedLine)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 20, 2017, 5:16pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/4 "2017-10-20T17:16:43Z")

</div>

I quickly tried the latter (added actorProperties-\>SetLineStipplePattern(0xf0); under [this line](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLModelSliceDisplayableManager.cxx#L573)). It seems to work well, but it looks strange when zoomed out:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/7/2749f73d8755d75d3ba326411b8532e301d46233.jpeg)

@pieper @lassoan Any idea why? I can add a combobox for line style in Models / Slice Display if this is figured out.

---

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [October 20, 2017, 5:20pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/5 "2017-10-20T17:20:26Z")

</div>

Here is an example that uses texture:  
[https://lorensen.github.io/VTKExamples/site/Cxx/Rendering/StippledLine/](https://lorensen.github.io/VTKExamples/site/Cxx/Rendering/StippledLine/)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 20, 2017, 5:22pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/6 "2017-10-20T17:22:09Z")

</div>

Thank you, @Lorensen! Especially that the way I found is no longer supported in OpenGL2, which will be the default version soon (hopefully). I’ll try this out.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 20, 2017, 8:46pm UTC](https://discourse.slicer.org/t/dashed-lines-for-isodose-curves/1254/7 "2017-10-20T20:46:37Z")

</div>

Unfortunately vtkActor2D does not support textures. I’m not sure if a vtkActor could be used for model slice intersections.

Work-in-progress topic branch here: [https://github.com/cpinter/Slicer/tree/slice-intersection-line-styles](https://github.com/cpinter/Slicer/tree/slice-intersection-line-styles)
