# Measuring angles on stack with defined reference plane

**URL:** <https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891>\
**Category:** Support\
**Created:** [February 10, 2022, 12:59pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891 "2022-02-10T12:59:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/igor_s/32/14237_2.png) [@Igor\_S](https://discourse.slicer.org/u/Igor_S)\
**Post date:** [February 10, 2022, 12:59pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/1 "2022-02-10T12:59:37Z")

</div>

Hello,  
a beginner’s question.  
How could i measure an angle on CT examination (from two lines / from a line and a point) that are defined on different slices and measured in reference plane: for instance HKA line (which is defined as an angle between femoral and tibial mehanical axis in coronal plane) but in a custom coronal/paracoronal planes.  
Furthermore, how could i define a custom plane by two lines (not three points)?

Thank you for your answers.

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [February 10, 2022, 4:23pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/2 "2022-02-10T16:23:41Z")

</div>

There is an angle measurement tool in Slicer used by placing 3 control points. These points can be arbitrarily placed in 3D and do not need to be placed on the same slice view. Using two lines to define a plane is problematic because there is not any plane which contains two non-parallel and non-intersecting lines. If the two lines do intersect, then the three points defining the plane containing both lines can be the intersection point plus any one other point from each line. If you need to identify the intersection point, then I’m not sure you’re really better off defining the plane using two intersecting lines than you are choosing the three points of the angle measurement tool. What isn’t working well for your purposes using the angle measurement tool?

---

<div class="post-metadata">

**Author:** ![Igor\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/igor_s/32/14237_2.png) [@Igor\_S](https://discourse.slicer.org/u/Igor_S)\
**Post date:** [February 10, 2022, 6:14pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/3 "2022-02-10T18:14:54Z")

</div>

I know about the tool but I’m interested in an angle between two separate lines. I’ve found the script in the repository and it works, but the problem is that I don’t really know what angle it measures (I’m only interested in angle that is projected from lines to the custom specified plane).

I want to specify the custom plane for the projection of angles (for the HKA case plane that is paralel to line that connects center of femoral head to center of ankle and also paralel to line that connects posterior femoral condyles) and measure angle from lines that are projected on this custom plane.

Is this possible?

---

<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:** [February 10, 2022, 7:09pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/4 "2022-02-10T19:09:23Z")

</div>

> [@mikebind](#):
>
> There is an angle measurement tool in Slicer used by placing 3 control points.

There are 3 plane placement modes: `point normal`, `three points`, and `plane fit`. If you want to fit to two lines then that is basically a 4-point fit, so the `plane fit` mode should work well.

> [@Igor\_S](#):
>
> I know about the tool but I’m interested in an angle between two separate lines. I’ve found the script in the repository and it works, but the problem is that I don’t really know what angle it measures (I’m only interested in angle that is projected from lines to the custom specified plane).

I would recommend to use the [angle between lines](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#measure-angle-between-two-markup-lines) script, just [project the lines to the plane](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#project-a-line-to-a-plane) before you compute the angles.

---

<div class="post-metadata">

**Author:** ![Igor\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/igor_s/32/14237_2.png) [@Igor\_S](https://discourse.slicer.org/u/Igor_S)\
**Post date:** [February 10, 2022, 8:26pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/5 "2022-02-10T20:26:18Z")

</div>

I’m sorry I’ve been trying to evoke the `plane fit` mode for some time but without success. Where to I change the default `three points` mode to plane fit.

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [February 10, 2022, 8:32pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/6 "2022-02-10T20:32:56Z")

</div>

In the Markups module, with the plane selected, you can change the type here:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/28fed33a5ecd646d3c8d2595724da7fe379bb592.png)

---

<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:** [February 10, 2022, 8:33pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/7 "2022-02-10T20:33:38Z")

</div>

Plane fit is available in recent Slicer Preview Releases, probably not in the current Slicer Stable Release.

---

<div class="post-metadata">

**Author:** ![Igor\_S](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/igor_s/32/14237_2.png) [@Igor\_S](https://discourse.slicer.org/u/Igor_S)\
**Post date:** [February 12, 2022, 4:00pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/8 "2022-02-12T16:00:48Z")

</div>

It works with Preview version!

Thank you.

---

<div class="post-metadata">

**Author:** ![esomjai](https://avatars.discourse-cdn.com/v4/letter/e/e274bd/32.png) [@esomjai](https://discourse.slicer.org/u/esomjai)\
**Post date:** [April 27, 2023, 11:38am UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/9 "2023-04-27T11:38:22Z")

</div>

Hi there,  
I came across this thread when looking for a solution to measure angles between a reference plane and axis (established line between landmarks). I tried the angle measurement tool and the recommended line-line intersection, but I get different results. I am concerned as to the directionality of the angle measurements in each process.  
Please see reference pictures.

 ![angle measurement tool.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/2/d29bf273370b474fb49522c8f3c4a3093b6e2010.jpeg)  
 ![with line projection.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/74acade562673550b049a0d54c7913b97b2b76e5.jpeg)

Thank you for your time and assistance.

---

<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:** [May 2, 2023, 7:28pm UTC](https://discourse.slicer.org/t/measuring-angles-on-stack-with-defined-reference-plane/21891/10 "2023-05-02T19:28:14Z")

</div>

Angle between a plane and a line is always \<90deg. In your screenshot you marked an angle \>90deg. You need some extra reference direction, point, or plane that specifies the plane for your angle measurement.
