# Calculate angle between two planes

**URL:** <https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [May 12, 2020, 3:09am UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497 "2020-05-12T03:09:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![syh91006](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/syh91006/32/6805_2.png) [@syh91006](https://discourse.slicer.org/u/syh91006)\
**Post date:** [May 12, 2020, 3:09am UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497/1 "2020-05-12T03:09:27Z")

</div>

Operating system: windows 10  
Slicer version: version 4.11.0 revision 29053 built 2020-05-11  
Expected behavior: calculate angle between two planes  
Actual behavior:  
After I used extensions manager installing “AnglePlanesExtension”  
AnglePlanesExtension did not show up in modules, even after I restarted the 3d slicer

And this is show in my Python interactor  
Traceback (most recent call last):  
File “”, line 1, in   
File “C:\Users\syh\AppData\Local\NA-MIC\Slicer 4.11.0-2020-04-10\lib\Python\Lib\imp.py”, line 170, in load\_source  
module = \_exec(spec, sys.modules[name])  
File “”, line 618, in \_exec  
File “”, line 674, in exec\_module  
File “”, line 781, in get\_code  
File “”, line 741, in source\_to\_code  
File “”, line 219, in \_call\_with\_frames\_removed  
File “C:/Users/syh/AppData/Roaming/NA-MIC/Extensions-28945/AnglePlanesExtension/lib/Slicer-4.11/qt-scripted-modules/AnglePlanes.py”, line 73  
print “-------Angle Planes Widget Setup-------”  
^  
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print("-------Angle Planes Widget Setup-------")?

what’s wrong ? or Is there other way to calculate angle between two planes?

Thx a lot.

---

<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 12, 2020, 3:29am UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497/2 "2020-05-12T03:29:22Z")

</div>

Probably the AnglePlanesExtension has not been updated to work with latest Slicer version.

While that’s being fixed, you can measure angle between two planes by copy-pasting scripts into the Python console:

- [measure angle between two markup planes](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Measure_angle_between_two_markup_planes)
- [measure angle between two slice planes](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Measure_angle_between_two_slice_planes)

---

<div class="post-metadata">

**Author:** ![syh91006](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/syh91006/32/6805_2.png) [@syh91006](https://discourse.slicer.org/u/syh91006)\
**Post date:** [May 12, 2020, 4:03am UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497/3 "2020-05-12T04:03:16Z")

</div>

thanks a lot!! really helpful!

Is there any scripts can calculated angle between two markup lines?  
I know there is is an “angle” tool in “create and place”, but I would like to measure angle between two markup lines. It’s slightly different. Thanks again.

---

<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 12, 2020, 7:03pm UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497/4 "2020-05-12T19:03:39Z")

</div>

I’ve added one more example:

- [measure angle between two markup lines](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Measure_angle_between_two_markup_lines)

---

<div class="post-metadata">

**Author:** ![syh91006](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/syh91006/32/6805_2.png) [@syh91006](https://discourse.slicer.org/u/syh91006)\
**Post date:** [May 14, 2020, 1:47am UTC](https://discourse.slicer.org/t/calculate-angle-between-two-planes/11497/5 "2020-05-14T01:47:44Z")

</div>

Thank you very much!!
