# How to make a "mandible template"from many mandibles in slicermorph?

**URL:** <https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241>\
**Category:** SlicerMorph\
**Tags:** segmentation\
**Created:** [September 5, 2024, 3:43pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241 "2024-09-05T15:43:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yijie3091](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yijie3091/32/80324_2.png) [@yijie3091](https://discourse.slicer.org/u/yijie3091)\
**Post date:** [September 5, 2024, 3:43pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/1 "2024-09-05T15:43:56Z")

</div>

How to make a "mandible template"from many mandibles in slicermorph to match others?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 5, 2024, 7:39pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/2 "2024-09-05T19:39:15Z")

</div>

The answer to this depends on what modality you have the data in.

If you have 3D models and at least some landmarks, you can use our DeCa extension to generate template. This is an iterative process where a model is used to as a reference to rigidly align all the others, and then use the rigidly aligned ones to generate a population template.

You can find the paper at: [https://www.researchgate.net/publication/375111739\_DeCA\_A\_Dense\_Correspondence\_Analysis\_Toolkit\_for\_Shape\_Analysis](https://www.researchgate.net/publication/375111739_DeCA_A_Dense_Correspondence_Analysis_Toolkit_for_Shape_Analysis)

DeCA is not part of the extension catalogue yet, but you can download the repository and manually install the extension.

If you do not have 3D models and landmarks, but volumetric data (e.g., CT scans), you will need to us an atlas-building framework, such as the one provided by ANTs.

[GitHub - ANTsX/ANTs: Advanced Normalization Tools (ANTs)](https://github.com/ANTsX/ANTS?tab=readme-ov-file) (scroll down to find the tutorial for Brian Template)

---

<div class="post-metadata">

**Author:** ![yijie3091](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yijie3091/32/80324_2.png) [@yijie3091](https://discourse.slicer.org/u/yijie3091)\
**Post date:** [September 6, 2024, 11:06am UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/3 "2024-09-06T11:06:38Z")

</div>

I have some mandibles whose foremat is ply.,so as follows as your mean,i can use the the DeCa extension ,right?  
And i make some fixed landmarks manually to make the template aligh more precisely, is it necessary?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 6, 2024, 4:37pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/4 "2024-09-06T16:37:33Z")

</div>

If you have 3D models, yes you can use DeCa. Anatomical (fixed) landmarks makes challenging registration problems a little easier. You don’t have to have a lot of them, anywhere from 6-10 should be sufficient.

---

<div class="post-metadata">

**Author:** ![yijie3091](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yijie3091/32/80324_2.png) [@yijie3091](https://discourse.slicer.org/u/yijie3091)\
**Post date:** [September 8, 2024, 7:08am UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/5 "2024-09-08T07:08:17Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/7/97506df18ada2fca497ea76418497d4df5fd0f8f.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/b/bb90617d8b8b1af1377585a18474f73e1426856a.png)  
Is there a mistake in my steps？I can’t download it in my slicer.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 8, 2024, 5:20pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/6 "2024-09-08T17:20:29Z")

</div>

The chinese characters in the path might be playing tricks. Instead unzip the file, and drag the DeCa folder inside the zip archive (not the DeCa-main) to Slicer application window. Then answer OK, to **Add Python scripted modules to the application**. Then, you are set.

---

<div class="post-metadata">

**Author:** ![yijie3091](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yijie3091/32/80324_2.png) [@yijie3091](https://discourse.slicer.org/u/yijie3091)\
**Post date:** [September 15, 2024, 7:04am UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/7 "2024-09-15T07:04:45Z")

</div>

Thank you very much.I have mandible datas such as this picture,but this "generate tab"show aligned mesh directory.Do I need make mesh?How can I make mesh?Do you have some video tutorial which can help me,because github can’t show tutorial step by step.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/a/1a5e161dc434814a59dd7ce00753a62163a47c3f.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/e/6e3e73a3e1bcf3196ad7a5affbb49d5b1526a3ab.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 15, 2024, 5:04pm UTC](https://discourse.slicer.org/t/how-to-make-a-mandible-template-from-many-mandibles-in-slicermorph/38241/8 "2024-09-15T17:04:25Z")

</div>

We are going to change and simplify the UI, so there is currently no tutorial.

Before you can generate mean model, you need to align all your samples using a reference model and a set of landmarks. Once you accomplish that those two fields in the Generate Mean (aligned mesh directory, and aligned landmark directory) will be auto-populated.

To run Rigid alignment:

1. Choose one model and its corresponding landmark as reference.
2. Specify the input model directory
3. Specify the input landmark directory (note that filename prefixes for models and landmarks needs to be the same. That’s how matching is done)
4. Specify the output folders for aligned models and landmarks.

then run rigid alignment. This should be quick, from then, you can switch to the mean model and generate your template.
