# Is it possible to make crosshair node invisible in yellow slice view window?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304>\
**Category:** Development\
**Created:** [August 23, 2023, 3:03am UTC](https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304 "2023-08-23T03:03:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![icedream](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@icedream](https://discourse.slicer.org/u/icedream)\
**Post date:** [August 23, 2023, 3:03am UTC](https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304/1 "2023-08-23T03:03:31Z")

</div>

i have found some code to make node with display node to be invisible in yellow slice view window like the code below

```python
pointListNode = getNode("F")
pointListDisplayNode = pointListNode.GetDisplayNode()
pointListDisplayNode.SetVisibility(False) # Hide all points
pointListDisplayNode.SetVisibility(True) # Show all points
pointListDisplayNode.SetSelectedColor(1,1,0) # Set color to yellow
pointListDisplayNode.SetViewNodeIDs(["vtkMRMLSliceNodeRed", "vtkMRMLViewNode1"]) # Only show in red slice view and first 3D view

```

but crosshair node don’t have display node ,is it possible to make crosshair node invisible in yellow slice view window?

---

<div class="post-metadata">

**Author:** ![jay1987](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jay1987/32/16183_2.png) [@jay1987](https://discourse.slicer.org/u/jay1987)\
**Post date:** [August 24, 2023, 12:56am UTC](https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304/2 "2023-08-24T00:56:41Z")

</div>

may be you need to hard code into C++ code?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 24, 2023, 5:16am UTC](https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304/3 "2023-08-24T05:16:05Z")

</div>

I would indeed expect the following code to work:

```python
for viewerName in ["Red", "Green", "Yellow"]:

    sliceNode = slicer.util.getNode(f"vtkMRMLSliceNode{viewerName}")
    sliceLogic = slicer.app.applicationLogic().GetSliceLogic(sliceNode)

    # The vtkMRMLSliceDisplayNode controls appearance of slice intersections
    # in slice views and slices in 3D views.
    sliceDisplayNode = sliceLogic.GetSliceDisplayNode()

    # Display slice intersection on all views expect the "Yellow" one
    sliceDisplayNode.SetViewNodeIDs(["vtkMRMLViewNode1", "vtkMRMLSliceNodeRed", "vtkMRMLSliceNodeGreen"])

```

After a cursory check, this feature is missing, it could be added to the following functions:

- `vtkMRMLSliceIntersectionInteractionRepresentation::UpdateFromMRML()`
- `vtkMRMLSliceIntersectionInteractionRepresentation2D::UpdateFromMRML()`

Is it something you could help with ?

---

<div class="post-metadata">

**Author:** ![icedream](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@icedream](https://discourse.slicer.org/u/icedream)\
**Post date:** [August 24, 2023, 11:37am UTC](https://discourse.slicer.org/t/is-it-possible-to-make-crosshair-node-invisible-in-yellow-slice-view-window/31304/4 "2023-08-24T11:37:02Z")

</div>

thank you @jcfr ,these code may work for intersection line , do you know how to make crosshair node invisible in the Yellow Slice Window?
