# Measurement on a plane

**URL:** <https://discourse.slicer.org/t/measurement-on-a-plane/30862>\
**Category:** Support\
**Created:** [July 28, 2023, 7:12pm UTC](https://discourse.slicer.org/t/measurement-on-a-plane/30862 "2023-07-28T19:12:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)\
**Post date:** [July 28, 2023, 7:12pm UTC](https://discourse.slicer.org/t/measurement-on-a-plane/30862/1 "2023-07-28T19:12:52Z")

</div>

is it possible to snap drawing points / measurements on a plane made in markups?

if not any suggestion

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 28, 2023, 8:12pm UTC](https://discourse.slicer.org/t/measurement-on-a-plane/30862/2 "2023-07-28T20:12:34Z")

</div>

Here’s one way to do that, there may be simpler ways.

Reformat a slice view to the plane, i.e., the slice view and the plane have the same normal.

You can get the first control point of the plane with GetNthControlPointPositionWorld(), and the plane’s normal with GetNormalWorld(). Next is to get a tangent for this normal, you can use vtkMath::Perpendiculars() for that. With these information, you can reformat a slice view using SetSliceToRASByNTP().

The slice view will reorient itself such that it contains the plane. It’s then trivial to place points in the slice view for whatever purpose.

You can then script all these for future needs. Such a script lies [here](https://github.com/chir-set/RcHacks7).

---

<div class="post-metadata">

**Author:** ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)\
**Post date:** [July 28, 2023, 8:34pm UTC](https://discourse.slicer.org/t/measurement-on-a-plane/30862/3 "2023-07-28T20:34:09Z")

</div>

Thank you for feedback . I’m working with stl model only . No Dicom . Trying to measurement some pre post surgery. Because nature of the models I needed to measure on a plane but point won’t snap to it
