# Inverting points on Spline

**URL:** <https://discourse.slicer.org/t/inverting-points-on-spline/35296>\
**Category:** Support\
**Created:** [April 4, 2024, 8:15pm UTC](https://discourse.slicer.org/t/inverting-points-on-spline/35296 "2024-04-04T20:15:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bw3232](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bw3232](https://discourse.slicer.org/u/bw3232)\
**Post date:** [April 4, 2024, 8:15pm UTC](https://discourse.slicer.org/t/inverting-points-on-spline/35296/1 "2024-04-04T20:15:58Z")

</div>

I created many splines for measurements. I wanted to use the endoscopy feature, but in the other direction that I placed the points. Is there an easy way to invert the order of the points?

---

<div class="post-metadata">

**Author:** ![rfenioux](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rfenioux/32/70007_2.png) [@rfenioux](https://discourse.slicer.org/u/rfenioux)\
**Post date:** [April 5, 2024, 9:42am UTC](https://discourse.slicer.org/t/inverting-points-on-spline/35296/2 "2024-04-05T09:42:05Z")

</div>

In the Markups module, under control points \> advanced you will find buttons to move control points up or down in the list.

Otherwise you can do this in python :

```auto
import numpy as np
curveNode = slicer.util.getNode('OC')
points_array = slicer.util.arrayFromMarkupsControlPoints(curveNode)
slicer.util.updateMarkupsControlPointsFromArray(curveNode, np.flip(points_array, axis=0))

```
