# creating best fit planes and best fit sphere

**URL:** <https://discourse.slicer.org/t/creating-best-fit-planes-and-best-fit-sphere/6403>\
**Category:** Support\
**Created:** [April 5, 2019, 12:08pm UTC](https://discourse.slicer.org/t/creating-best-fit-planes-and-best-fit-sphere/6403 "2019-04-05T12:08:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clauzi](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@clauzi](https://discourse.slicer.org/u/clauzi)\
**Post date:** [April 5, 2019, 12:08pm UTC](https://discourse.slicer.org/t/creating-best-fit-planes-and-best-fit-sphere/6403/1 "2019-04-05T12:08:44Z")

</div>

Operating system: windows  
Slicer version: 4.10.1  
Expected behavior:  
Actual behavior:

Hi,  
I am trying to calculate angles between planes (working with AnglePlane module) and need to create a plane where I cannot use just 3 landmarks but it needs to be a best fit plane of the acetabular rim to create the acetabular plane.

I am also trying to define the acetabulum using a best fit sphere.

Thanks so much for your help. This is great!

Claudia

---

<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:** [April 5, 2019, 12:20pm UTC](https://discourse.slicer.org/t/creating-best-fit-planes-and-best-fit-sphere/6403/2 "2019-04-05T12:20:01Z")

</div>

> [@clauzi](#):
>
> 3 landmarks but it needs to be a best fit plane of the acetabular rim to create the acetabular plane.

You can align slice plane with 3 landmark points by copy-pasting these few lines of code to Slicer’s Python interactor (menu: View / Python interactor): [Documentation/Nightly/ScriptRepository - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Fit_slice_plane_to_markup_fiducials)

> [@clauzi](#):
>
> I am also trying to define the acetabulum using a best fit sphere.

You can manually define/visualize a sphere as shown here:  
[https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Manipulating\_objects\_in\_the\_slice\_viewer](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Manipulating_objects_in_the_slice_viewer)  
You may be able to register a sphere by creating a sphere and segmenting the acetabulum and use Segment Registration module to automatically align them.

---

<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:** [April 15, 2022, 11:10am UTC](https://discourse.slicer.org/t/creating-best-fit-planes-and-best-fit-sphere/6403/3 "2022-04-15T11:10:38Z")

</div>

2 posts were merged into an existing topic: [Please some help about making best fit sphere of humeral head](https://discourse.slicer.org/t/please-some-help-about-making-best-fit-sphere-of-humeral-head/22975/2)
