# How to measure the angle?

**URL:** https://discourse.slicer.org/t/how-to-measure-the-angle/1031
**Category:** Support
**Created:** [September 11, 2017, 3:15am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031 "2017-09-11T03:15:19Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 11, 2017, 3:15am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/1 "2017-09-11T03:15:20Z")

</div>

Hello everyone!  
In 3D-Slicer software,is there any module can measure the angle between two or three,four thread in one plate?  
Thanks 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: [September 11, 2017, 3:56am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/2 "2017-09-11T03:56:20Z")

</div>

You can modify this Python scripted module to measure angle between any number of lines (defined by rulers): _(link removed, see updated link below)_

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 11, 2017, 8:13am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/3 "2017-09-11T08:13:00Z")

</div>

Execuse me,Professor Lassoa,the web page can not be openned correctlly.  
What is wrong with this?

---

<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: [September 11, 2017, 1:40pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/4 "2017-09-11T13:40:58Z")

</div>

This link should work better:

> <https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14>

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 12, 2017, 2:33pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/5 "2017-09-12T14:33:59Z")

</div>

When i click the link,the result i got is “the webpage in not exist”!  
The module about angle measurement has not been finished,is it right?  
Thanks 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: [September 12, 2017, 2:55pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/6 "2017-09-12T14:55:23Z")

</div>

The webpage ([https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14](https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14)) does exist and loads fine for me. Check your network settings and try again.

The preview in the post shows the first 10 lines, but the module is complete (see at the link), you can use it as is.

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 17, 2017, 2:20pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/7 "2017-09-17T14:20:33Z")

</div>

Hello,professor Andras Lasso!  
After I have tried some times,the webpage still can not been openned eventually.I checked my computer and the web setting,but there was no problem.  
So I want to know is there any other methods or modules can measure the angle between two lines?  
Thanks 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: [September 17, 2017, 3:50pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/8 "2017-09-17T15:50:22Z")

</div>

The GitHub link above ([https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14](https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14)) still works, I’ve just checked this again.

Which country you are in? Do you have access to github and gists on github in general?

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 18, 2017, 6:47am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/9 "2017-09-18T06:47:30Z")

</div>

hello,professor Lassoan!  
I am in China,probably the webpage was forbidden by “some authorities”.I do not know the reason.What I want to do is to measure the angle between two lines or three lines,the question troubled me for a long time!can you teach me some other ways or methods?

Thank you very much!

---

<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: [September 19, 2017, 1:06am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/10 "2017-09-19T01:06:53Z")

</div>

Do you have access to github repositories? For example, do you see files in [this repository](https://github.com/lassoan/Slicer)?

Do you have access to github gists? For example, you can try to create a gist and see if you can access that.

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 20, 2017, 2:41pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/11 "2017-09-20T14:41:53Z")

</div>

Thanks a lot,Professor Lassoan!  
I have registered an account on the GitHub web and I can open the repository you gave me.  
Because I am a new user of 3D Slicer,I donnot know what I should do next?  
Would you like show me the details about how to measure the angle between lines?  
Thank you very much!  
无标题|690x387

---

<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: [September 20, 2017, 7:19pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/12 "2017-09-20T19:19:55Z")

</div>

Add the directory where the .py file is located to the “Additional module paths” in Application settings / Modules section. If you restart Slicer then the “Angle measurement” module will show up in “Quantification” category in the module list.

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 21, 2017, 5:49am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/13 "2017-09-21T05:49:28Z")

</div>

Thanks a lot!  
But how can i get the \*.py file?  
Is in my computer already? or I should download it from the link you give me?  
Thank you very much for your attention, Professor Lassoan!

---

<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: [September 21, 2017, 11:09am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/14 "2017-09-21T11:09:16Z")

</div>

You download the file and save as [AngleMeasurement.py](http://AngleMeasurement.py)

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 22, 2017, 2:52pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/15 "2017-09-22T14:52:46Z")

</div>

I have tried some methods some times,but the webpage([3D Slicer scripted module for measuring angle between rulers · GitHub](https://gist.github.com/lassoan/9bf334743871e400f7e3b3745b312b14)) cannot be openned and I cannot find ` **the file** ` in the end.So the problem have not be solved.Is there any way can I get the file?  
Thank you very much,Proffesor Lassoan!

 ![error](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d1cf31567ae53100dc7301d96ecdc9c443ea511c.jpeg)

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 22, 2017, 3:19pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/16 "2017-09-22T15:19:25Z")

</div>

Hello,Professor Lassoan!  
After open the home page,what should I do or which file should I search in the page?  
Thanks a lot!

 ![home page](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/c/1c9b455ed04c575c185c9dbe5573be0598e09fa4.jpeg)

---

<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: [September 23, 2017, 7:02pm UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/17 "2017-09-23T19:02:44Z")

</div>

What file sharing service is allowed in China?

---

<div class="post-metadata">

### Author: ![doc-xie](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@doc-xie](https://discourse.slicer.org/u/doc-xie)
#### Post date: [September 26, 2017, 8:35am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/18 "2017-09-26T08:35:17Z")

</div>

Thanks,Professor Lassoan!  
Do you mind send the file(\*.py) to my mail account?  
My mail address is [522802876@qq.com](mailto:522802876@qq.com).  
Thanks a lot!

---

<div class="post-metadata">

### Author: ![shrimanti](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@shrimanti](https://discourse.slicer.org/u/shrimanti)
#### Post date: [November 3, 2017, 1:10am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/19 "2017-11-03T01:10:20Z")

</div>

Hello,

I wanted to calculate the angle between two ruler lines in Slicer. I found the [AngleMeasurement.py](http://AngleMeasurement.py) file.  
But where should I put this file and I wanted to know the steps how to add that file in Slicer and how to measure the angle?

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [November 3, 2017, 1:09am UTC](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/20 "2017-11-03T01:09:44Z")

</div>

Hi,

Similar question was answered here: [How to measure the angle?](https://discourse.slicer.org/t/how-to-measure-the-angle/1031/12?u=jcfr)

Otherwise, to provide some background, similarly to the [ruler](https://www.slicer.org/wiki/Documentation/4.8/SlicerApplication/MainApplicationGUI#Mouse_Modes), there is preliminary work to support angle and it would still need some work. Code can be found in the [Annotations](https://github.com/Slicer/Slicer/tree/master/Modules/Loadable/Annotations) module.

[Next page](https://discourse.slicer.org/t/how-to-measure-the-angle/1031.md?page=2)
