# Is it possible to know what nodes have elements displayed in a slice view? And where?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-know-what-nodes-have-elements-displayed-in-a-slice-view-and-where/13557>\
**Category:** Development\
**Created:** [September 18, 2020, 11:29pm UTC](https://discourse.slicer.org/t/is-it-possible-to-know-what-nodes-have-elements-displayed-in-a-slice-view-and-where/13557 "2020-09-18T23:29:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [September 22, 2020, 12:49pm UTC](https://discourse.slicer.org/t/is-it-possible-to-know-what-nodes-have-elements-displayed-in-a-slice-view-and-where/13557/7 "2020-09-22T12:49:30Z")

</div>

If you import electrode model into segmentation then you can see the name of the electrode in the Data Probe window (lower-left corner) when you move the crosshair over it (Shift+MouseMove). You could do the same in 3D view with a short script (see example script in [this topic](https://discourse.slicer.org/t/obtaining-segmentations-for-fiducials/13407/30)). You could also write a short script for highlighting the segment in all views (temporarily changing its override color in the display node) and displaying the text next to it (by adding a temporary markups fiducial node and set its label to the name of the segment).

> [@mikebind](#):
>
> These provide a consistent visualization of the intersection with the slice view without the out of plane fading behavior of the markups curves

You can enable projection and the same distance-encoded coloring for model nodes: Models module / Display / Mode → Distance encoded projection. By editing the color table, you can set arbitrary fadeout and/or color change behavior.

> [@mikebind](#):
>
> I don’t know of any way to have a label show for a model intersection on a slice view.

Line/plane intersection position is a very simple computation and once you have that position, you can see if it is in the slice view’s region (something like this: transform it to the slice’s coordinate system by applying inv(XYToRAS) transform and see if its XY coordinates are within FieldOfView size and Z is within slice thickness).

> [@pieper](#):
>
> I did something like this years ago with a custom rendering pass into an off-screen buffer so that I got object ids and triangle ids per pixel, so you could easily identify how arbitrary geometry was rasterized. I haven’t looked, but something like this may be built into some part of the latest VTK. Such an image could be post-processed to generate a set of labels on the slice.

This would be useful as a general solution, and I think VTK hardware pickers (e.g., vtkPropPicker) provide this. SEEG case is a simple special case, as electrodes can be modeled as points or cylinders (lines), so it is trivial to compute intersection position with a plane.

---

_[View the full topic](https://discourse.slicer.org/t/is-it-possible-to-know-what-nodes-have-elements-displayed-in-a-slice-view-and-where/13557)._
