# Slice intersections implementation

**URL:** <https://discourse.slicer.org/t/slice-intersections-implementation/7725>\
**Category:** Development\
**Created:** [July 23, 2019, 12:32pm UTC](https://discourse.slicer.org/t/slice-intersections-implementation/7725 "2019-07-23T12:32:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)\
**Post date:** [July 23, 2019, 12:32pm UTC](https://discourse.slicer.org/t/slice-intersections-implementation/7725/1 "2019-07-23T12:32:43Z")

</div>

Hi,

I’m looking for some help in understanding an implementation detail: I am unable to find the implementation of the slice intersection lines that are displayed in the slice viewers when they are activated via the menu. How are they rendered and how are the colors and positions set/updated?

Looking for forward for some insight.  
Thanks  
Robert

 ![intersections](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/7/47afffb30aa4c0125282decec07021d58db121c4.png)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 23, 2019, 1:57pm UTC](https://discourse.slicer.org/t/slice-intersections-implementation/7725/2 "2019-07-23T13:57:35Z")

</div>

Hi Robert -

It’s a somewhat complex topic, but you could start here:

> <https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLSliceIntersectionWidget.cxx>

---

<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:** [July 23, 2019, 6:41pm UTC](https://discourse.slicer.org/t/slice-intersections-implementation/7725/3 "2019-07-23T18:41:13Z")

</div>

@rprueckl What would you like to do?

---

<div class="post-metadata">

**Author:** ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)\
**Post date:** [July 24, 2019, 7:27am UTC](https://discourse.slicer.org/t/slice-intersections-implementation/7725/4 "2019-07-24T07:27:02Z")

</div>

Thanks for the answer - i found what I was looking for - also in the file

[https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLModelSliceDisplayableManager.cxx](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLModelSliceDisplayableManager.cxx)

This concrete question was merely out of interest, but in general we are currently starting the process of building a customized application on top of the slicer libraries. Therefore, I was investigating different parts of the code. Currently, I make myself familiar with slicelets and the custom application template. It could easily be that you will see me more often in this forum 🙂
