# Projection of interpolated points on open curve markup

**URL:** <https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566>\
**Category:** Development\
**Created:** [March 17, 2022, 3:33pm UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566 "2022-03-17T15:33:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhodesdante22](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rhodesdante22](https://discourse.slicer.org/u/rhodesdante22)\
**Post date:** [March 17, 2022, 3:33pm UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566/1 "2022-03-17T15:33:12Z")

</div>

I am developing a module where I use the open curve markups with spline interpolation to plot points. I have SetSliceProjection(True) so that the projected control points show up on the 2D slice viewers. However, I cannot find a means to get the whole curve (including the interpolated points between the control points) to project onto the slice viewer and create a smooth curve. Is there a simple way to achieve this effect? Thank you very much.

---

<div class="post-metadata">

**Author:** ![rhodesdante22](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rhodesdante22](https://discourse.slicer.org/u/rhodesdante22)\
**Post date:** [March 23, 2022, 7:09pm UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566/2 "2022-03-23T19:09:34Z")

</div>

Hi Slicer Support community,

Please let me know if there is any additional information I should post to receive guidance on this issue. I am new to the forum and want to make sure I provide adequate information so I can receive support!

Thank you very much.

---

<div class="post-metadata">

**Author:** ![ebrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ebrahim/32/13403_2.png) [@ebrahim](https://discourse.slicer.org/u/ebrahim)\
**Post date:** [March 23, 2022, 7:54pm UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566/3 "2022-03-23T19:54:06Z")

</div>

There’s probably a better answer from someone who knows how the markups display manager works, but here’s a hacky and not great idea that I’ll throw out: resample the curve to produce lots of control points, and then adjust the display properties of the control points to make their display area cover the curve in a connected way.

---

<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:** [April 1, 2022, 4:57am UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566/4 "2022-04-01T04:57:19Z")

</div>

You can configure the fade-out distance of the curve in slice views (distance from slice at the curve starts to fade and distance at the curve completely disappears). If you set these distances to a large value (e.g., 1000mm) then the entire curve will be visible in the slice.

```python
curveNode.GetDisplayNode().SetLineColorFadingStart(1000.0)
curveNode.GetDisplayNode().SetLineColorFadingEnd(1001.0)

```

---

<div class="post-metadata">

**Author:** ![rhodesdante22](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rhodesdante22](https://discourse.slicer.org/u/rhodesdante22)\
**Post date:** [April 2, 2022, 9:40pm UTC](https://discourse.slicer.org/t/projection-of-interpolated-points-on-open-curve-markup/22566/5 "2022-04-02T21:40:44Z")

</div>

Great, this is fantastic. Thank you both for the suggestions.
