# Mandible registration

**URL:** <https://discourse.slicer.org/t/mandible-registration/9902>\
**Category:** SlicerCMF\
**Created:** [January 22, 2020, 2:25am UTC](https://discourse.slicer.org/t/mandible-registration/9902 "2020-01-22T02:25:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 22, 2020, 2:25am UTC](https://discourse.slicer.org/t/mandible-registration/9902/1 "2020-01-22T02:25:25Z")

</div>

![color map but no defects shown](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/5/2531ed8880e91ddff8f4c41289e406ca78c1e514.jpeg)  
I am using dry mandible so predefect and postdefect periodontal bone changes can be superimposed then the difference can be detected in color map. I have converted CBCT dicom files to gipl then manual approximation then segment using ITK then surface register in stl then harden it using transform then model to model but I still get the color map with only one color(no post periodontal bone defect is shown)  
Please let me know if you know what I am doing wrong.

@bpaniagua

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 22, 2020, 7:11pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/2 "2020-01-22T19:11:24Z")

</div>

Hi,

The workflow i use which works is,

1. Import DICOM data

2. registration can be done of the two DICOM image sets with General registration.

[![](https://img.youtube.com/vi/cS1l1izbBqk/maxresdefault.jpg "image registration in 3d slicer, using general registration") ](https://www.youtube.com/watch?v=cS1l1izbBqk)

or you can go to segmentation editor first and then do the segmentation and make the segments and do the registration,

or

use ITK if you reallywant to segment in that one and import the STL and register the models with

IGT fiducial registration wizard or CMF registration → surface registration or ROI

I don’t know which way to register is the most accurate will be but we can see the accuracy of the registration once we have the color maps.

1. Use model to model distance module to measure the difference

2. Load it in the shape population viewer (signed distance)

 ![Screenshot from 2020-01-22 20-08-16](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/1/a1d92c96b8443d3c4f6cabf71ada7886f4a44868.png)

you will have to figure out the color map values to make a meaningful conclusion in a case like yours as you are dealing with difficult and highly subjective segmentation.

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 24, 2020, 1:55am UTC](https://discourse.slicer.org/t/mandible-registration/9902/3 "2020-01-24T01:55:31Z")

</div>

Thanks for your input.

Does that mean I can just use 3d slicer 4.1 and do all registration and segmentation?

In other words, just foollow step 1 to 4 without using segment editor nor ITK nor CMF?

Please let me know.

Thanks,

ERin

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 24, 2020, 8:00am UTC](https://discourse.slicer.org/t/mandible-registration/9902/4 "2020-01-24T08:00:51Z")

</div>

yes you can use just the 3D Slicer for everything you want to do and the workflow will be very less complicated.

---

<div class="post-metadata">

**Author:** ![bpaniagua](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bpaniagua/32/20_2.png) [@bpaniagua](https://discourse.slicer.org/u/bpaniagua)\
**Post date:** [January 27, 2020, 1:29pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/5 "2020-01-27T13:29:48Z")

</div>

Hi @erin_hong and @manjula

I agree with Manjula that the first step here is to see a bit more of what type of distances you have computed. Take into account that the color mapping in SPV by default will happen by setting your highest value in your distances to the color in your colorbar on the right and the lowest to the other end of the colorbar.

Could you please look at the attributes/ranges tab in SPV and see what is your min and max value in the distance map you have calculated, and let us know?

Thanks,  
Bea

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 28, 2020, 3:07pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/6 "2020-01-28T15:07:50Z")

</div>

Please see two screenshots with values for attributes/ranges.

Thanks,

Erin

 ![Screen Shot 2020-01-28 at 10.00.52 AM.png](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/e/6e9733bc50aee8675bd57c42ec78cdf6fc800eb5.png)

 ![Screen Shot 2020-01-28 at 10.06.55 AM.png](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/3/93d5dbfa21d1841534859eed3193e652849c2b06.png)

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 28, 2020, 3:15pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/7 "2020-01-28T15:15:56Z")

</div>

These are after I changed my range from -10 to 10.

 ![Screen Shot 2020-01-28 at 10.14.33 AM.jpg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/4/1400d624e0ad691594995ed0beb76690e54ad2b6.jpeg)

 ![Screen Shot 2020-01-28 at 10.14.25 AM.jpg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/9/e970653e8ac86008b1dad723cf6a4f86d6e8ce0b.jpeg)

---

<div class="post-metadata">

**Author:** ![bpaniagua](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bpaniagua/32/20_2.png) [@bpaniagua](https://discourse.slicer.org/u/bpaniagua)\
**Post date:** [January 28, 2020, 3:45pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/8 "2020-01-28T15:45:36Z")

</div>

Hi Erin,

You dont see much because you are visualizing the “normals” map. The magnitude of those maps goes from -1 to 1 (the magnitude of unit vectors pointing in or out)

In the attribute drop down menu, please change to “Signed”, there your values go from -8 to 8 mm (roughly). Play with changing the range to -5 to 5 and you should definitely see something.

Please let us know how it goes,  
Bea

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 28, 2020, 6:56pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/9 "2020-01-28T18:56:11Z")

</div>

In my screenshot above i have rounded in white where you need to change the attribute from normal to signed. Then changes the value range to -5 to 5 or far as it makes sense in the range section which i have pointed too.

 ![Screenshot from 2020-01-22 20-08-16](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/8/b8d7afeddfd9c1c1bf507640418b823b0cb7eb67.png)

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 29, 2020, 4:41am UTC](https://discourse.slicer.org/t/mandible-registration/9902/10 "2020-01-29T04:41:24Z")

</div>

Hi!

Please see my screenshot below. The defect change especially #30 D is about 5mm so I should see more definite color(green or red) but I do not see it.

Please let me know!

Thanks!

 ![Screen Shot 2020-01-28 at 11.33.58 PM.jpg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/3/f3da384e4b941f6960ab11246917271fde377b6a.jpeg)

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 29, 2020, 8:16am UTC](https://discourse.slicer.org/t/mandible-registration/9902/11 "2020-01-29T08:16:17Z")

</div>

Hi Lexus,

Can you please add a two points to the color map near the median with different color and move it around a bit.

 ![Screenshot from 2020-01-29 09-09-46](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/b/fbcbcf9d57f82afc5df18e78988ac8d7becf1d45.png)

If it does not work i guess there is some problem at Model to model distance measurement step or even at the registration step. If you could share some screenshots of the process or share your models some one might be able to help

---

<div class="post-metadata">

**Author:** ![bpaniagua](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bpaniagua/32/20_2.png) [@bpaniagua](https://discourse.slicer.org/u/bpaniagua)\
**Post date:** [January 29, 2020, 1:02pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/12 "2020-01-29T13:02:49Z")

</div>

Agreeing with Manjula here, continue saturating the color map (go down to -1,1, or lower) until you see something. It seems to be a difference in the crop between the two models, particularly in the mandibular area towards the chin and that is driving the most of the color interpolation.

Could you please take a snapshot of the two models overlayed with transparency and share that with us??

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 30, 2020, 2:22am UTC](https://discourse.slicer.org/t/mandible-registration/9902/13 "2020-01-30T02:22:48Z")

</div>

![Screen Shot 2020-01-29 at 9.09.20 PM.png](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d75b3c1f6da705d4dd8ec059ec03ffdc70e1cc0f.png)

Thanks for the feedback!

May I have your email address? I will send you pre and post STL models via google drive. I can also share pre/post dicom files as well, if you want. Perhaps registration and hardening are issues as you both stated.

I will also send you screenshots of each step and send them. I would like to start from the dicom files.

Many thanks,

Erin

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 30, 2020, 2:12pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/14 "2020-01-30T14:12:56Z")

</div>

Hi Erin,

I tried with your data. I think it works well. I did not do a good registration so the teeth are not well aligned. I think there is a error in your workflow. I will try to write the workflow in the afternoon.

 ![Screenshot from 2020-01-30 15-10-03](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/5/053fe4e65f63eea75e81eb8a69d0f7d4c3ed2dfd.jpeg)

---

<div class="post-metadata">

**Author:** ![Lexus\_H](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lexus_h/32/4110_2.png) [@Lexus\_H](https://discourse.slicer.org/u/Lexus_H)\
**Post date:** [January 30, 2020, 4:25pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/15 "2020-01-30T16:25:22Z")

</div>

Looking forward to a more detailed workflow. Since I am working with CBCT scans not CT nor MRI, I was using Slicer CMF, FYI.

Thanks,

Erin

---

<div class="post-metadata">

**Author:** ![bpaniagua](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bpaniagua/32/20_2.png) [@bpaniagua](https://discourse.slicer.org/u/bpaniagua)\
**Post date:** [January 30, 2020, 5:54pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/16 "2020-01-30T17:54:08Z")

</div>

Hi all,

Manjula, thanks for that snapshot. The registration seems wrong, as illustrated for a pattern of positive distances parallel to the longest axis of the model. Erin, is it possible to see both of your models?

Also, have you tried to manually approximating your models to see if you can generate a better colormap?

Thanks,  
Bea

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 30, 2020, 7:47pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/17 "2020-01-30T19:47:55Z")

</div>

yes registration is wrong. i did not did the registration properly. it was just a quick test !

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 30, 2020, 9:02pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/18 "2020-01-30T21:02:32Z")

</div>

Hi @Lexus_H and @bpaniagua

Sorry i was bit busy.

I did use the models Erin send for registration with CMF Regis - surface registration

With max iterations and max landmarks.

 ![Screenshot](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/2/8206cd6c11e4129b82c01da7e22c3eb2d4dc5cba.jpeg)

Please see the video

https://www.youtube.com/embed/JST4mpQrMUs?feature=oembed&wmode=opaque

The registration is not good. This is similar to problem i encountered with my previous work.

> [@Revisiting Rigid Mesh Registration](https://discourse.slicer.org/t/revisiting-rigid-mesh-registration/9424/5):
>
> @lassoan These are the results I get with the cloud compare fine registration with RMS. As you can see when i look at the model to model distance and view it in shape population viewer with the same setting… our land marks show almost exact matches ( Green ) in the viewer. I get almost same resutls with the cloud compare iteration method al…

I solve my problem with cloud compare but i wanted to stick to one software for my work and i got good results with CMR- ROI registration.

In this case i did not do the ROI registration because i again encountered the bug that i reported on this some time back.

> [@CMFReg - ROI registration Bug](https://discourse.slicer.org/t/cmfreg-roi-registration-bug/9443):
>
> There is a bug with CMF reg ROI registration method. I found this in the stable version as well as the nightly build. This is from the nightly build. Landmarks ROI does change dynamically and is kept at a fixed value. Can some one please tell me how to fix this ? ROI is stuck at 10. I did get rid of the all the configurations files and started with fresh install. (i am using Linux)

I use these models in cloud compare even with default setting i got good results.

please check the color maps with both registration methods

https://www.youtube.com/embed/qU1iyDtL6Us?feature=oembed&wmode=opaque

Erin i think you can try CMF ROI method. I think it should work pretty well.

Also since you have DICOM data why don’t you do the Image registration (General Registration -BRAINS) and then do the segmentation. Then your segments will be created properly registered. It would be great if @bpaniagua or Prof @lassoan can tell further about this.

Is registration on DICOM will be more accurate than registering the Surface models/Segments ?

Despite the answer to me previously by Prof Lasso on registration i am still baffled by the accuracy of cloud compare registration over CMF Surface registration. 🤩

In any case the problem that we set out to see seems like you are not measuring the model to model distance properly. Please see the video.

https://www.youtube.com/embed/-KhemBa7wbs?feature=oembed&wmode=opaque

---

<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:** [January 30, 2020, 9:44pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/19 "2020-01-30T21:44:29Z")

</div>

> [@manjula](#):
>
> Is registration on DICOM will be more accurate than registering the Surface models/Segments ?

Image registration would try to align soft tissues as well, so you would need to apply masking, but that would be essentially the same kind of thresholding that you do to extract the surface. Image-based registration would be also more vulnerable to image artifacts (due to presence of metals). So, unless you register a small region, such as a single tooth, surface registration is probably more appropriate. It also allows you to use the same method to register CBCT/CBCT and CBCT/intra-oral surface scan.

> [@manjula](#):
>
> Despite the answer to me previously by Prof Lasso on registration i am still baffled by the accuracy of cloud compare registration over CMF Surface registration. 🤩

Rigid surface registration of low-noise surfaces with good initialization is trivial, using ICP. Maybe the problem is that the cut surface is included in the registration, which of course must be excluded because they are not exactly the same on the two models. If you cut those off (leaving the cut-off ends open) then registration must be accurate.

It would be nice to add a surface selection tool to SlicerCMF that would allow to select a part of a surface for registration.

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [January 30, 2020, 10:18pm UTC](https://discourse.slicer.org/t/mandible-registration/9902/20 "2020-01-30T22:18:53Z")

</div>

Thank you for the explanations. First questions is answered understood.

With regard to second question i am not sure what you meant by the cut surface ?

In any case the way i understood was the anterior and posterior ends of the mandible.

So i just clipped around the teeth and did the CMF surface registration with 4000 iterations and the results were much better. Then i applied the transform to the whole model and got a much better color map. I dont know is that what you meant.

 ![Screenshot](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/e/0e9a5d43bbe924796b78b63f7fc10ed71275add4.png)

 ![Screenshot_1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/a/dacaf4f531076f0544d8638624a7b2881b063d82.jpeg)

And ofcourse if we can select the surface then it will absolutely solve this problem i guess… 😀

[Next page](https://discourse.slicer.org/t/mandible-registration/9902.md?page=2)
