# SPHARM-PDM alignment 

**URL:** <https://discourse.slicer.org/t/spharm-pdm-alignment/15943>\
**Category:** SlicerSALT\
**Created:** [February 10, 2021, 11:02pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943 "2021-02-10T23:02:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikhsannk](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@ikhsannk](https://discourse.slicer.org/u/ikhsannk)\
**Post date:** [February 10, 2021, 11:02pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943/1 "2021-02-10T23:02:08Z")

</div>

Hello, Beatriz, Martin, and others. My name is Ikhsan and I would like to ask a few things regarding SPHARM-PDM.

Firstly, I have looked at the tutorial and worked on the hippocampus example dataset. It functions properly on my laptop and I got the same output with those mentioned in the tutorial, except for the \*SPHARM\_procalign.vtk file which appears to be missing. My questions are:

1. How do I get the \*SPHARM\_procalign.vtk file? I have exactly followed the tutorial (using the hippocampus dataset provided) and tried to use my dataset as well but it doesn’t shows up.

2. Can I use the mean shape that I got from the ShapeVariationAnalyzer as a template for Rigid Procrustes alignment? Or do you have any recommendation which file should I use for the registration template?

Thank you in advance.

Regards,  
Ikhsan

---

<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:** [February 12, 2021, 8:01pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943/2 "2021-02-12T20:01:30Z")

</div>

Hi Ikhsan,

Thank you for using SPHARM-PDM!

> How do I get the \*SPHARM\_procalign.vtk file? I have exactly followed the tutorial (using the hippocampus dataset provided) and tried to use my dataset as well but it doesn’t shows up.

You will need a previously computed spharm model and to use it as registration template

![Screen Shot 2021-02-12 at 3.01.05 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/0/f018feb2a33ca11f7cb083f3c1c5dcc46bdf0cc1.png)

> Can I use the mean shape that I got from the ShapeVariationAnalyzer as a template for Rigid Procrustes alignment? Or do you have any recommendation which file should I use for the registration template?

That is definitely an option, but it does not need to be.

I hope that helps!!  
Thanks,

Bea

---

<div class="post-metadata">

**Author:** ![ikhsannk](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@ikhsannk](https://discourse.slicer.org/u/ikhsannk)\
**Post date:** [February 16, 2021, 1:28pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943/3 "2021-02-16T13:28:43Z")

</div>

Hello Bea,

Thank you for the answer, I have now successfully generated the \*procalign.vtk file.

If I may ask once again, I have read in some articles that mentioned about the scaling normalization for the head size (intracranial volume) after the rigid-body Procrustes alignment. Can I perform this step on the SPHARM-PDM module, or should I use another module on the SlicerSALT?

I am currently exploring other modules as well, but so far I couldn’t find it on the SPHARM-PDM tutorial.

Thank you once again for your response, I really appreciate it.

Best regards,  
Ikhsan

---

<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:** [February 16, 2021, 2:40pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943/4 "2021-02-16T14:40:56Z")

</div>

Hi Ikhsan,

Great to hear that you were able to get your procrustes aligned models!

Currently we still do not have a SlicerSALT module to do procrustes alignment (with and without scaling). There is however, a C++ CLI in SPHARM-PDM that does this, it is called [MeshMath.](https://github.com/NIRALUser/SPHARM-PDM/blob/master/Modules/CLI/MetaMeshTools/MeshMath.cxx#L225).

We will definitely look into incorporating this functionality in SlicerSALT soon.  
Thank you!

Bea

---

<div class="post-metadata">

**Author:** ![ikhsannk](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@ikhsannk](https://discourse.slicer.org/u/ikhsannk)\
**Post date:** [February 16, 2021, 3:45pm UTC](https://discourse.slicer.org/t/spharm-pdm-alignment/15943/5 "2021-02-16T15:45:56Z")

</div>

Hi Bea,

Thank you so much for the quick response. I will try to look deeper into MeshMath while continuing my shape analysis.

Many thanks,  
Ikhsan
