# ALPACA TPS warped model not showing

**URL:** <https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196>\
**Category:** Support\
**Created:** [February 7, 2024, 10:44pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196 "2024-02-07T22:44:25Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 7, 2024, 10:44pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/1 "2024-02-07T22:44:25Z")

</div>

Hello,  
I am looking to analyse shape variation of different human lungs. For this, I have generated a template lung with adequate surface landmark coverage which can be used for the ALPACA function. However, when I run ALPACA with the template lung, template source landmarks, and the new sample I want superimposed, neither the warped source model or the ALPACA initial landmarks is displayed. Has anyone else experienced this issue?

 ![MicrosoftTeams-image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/f/bf079adfdaa7c750b50da059710db2f850f6c9f7.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:** [February 7, 2024, 11:56pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/2 "2024-02-07T23:56:24Z")

</div>

Did turn on the visibility for the TPS deformed model (first screenshot)? Also what Slicer version are you using? This alpaca results are either incomplete or you are using an older version. Resultant files should be now nested under a folder in the Data module (second screenshot):

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/f/cff220a78991c3e7144a9c208c9cb7c4ddad940b.png)

---

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 8, 2024, 12:31pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/3 "2024-02-08T12:31:43Z")

</div>

Ok, this version is 5.6.1, and surprisingly, the ALPACA display settings are not able to be switched on. I have provided the two screenshots showing the issue on my end, but I am grateful for any more advice on this issue.

 ![issue 1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/b/4b5d2f82d8aae01a127737c01a0506ed9ff80fed.png)

 ![issue 2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/5/a52ef53f1cb5be48a949e66cfaa33c5c129144de.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:** [February 8, 2024, 3:59pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/4 "2024-02-08T15:59:50Z")

</div>

The only time I saw this happening when ALPACA stopped working in the middle due to an error. Can you share the log file (CTRL+0), better yet can you share those two models and the LMs.

---

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 8, 2024, 4:57pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/5 "2024-02-08T16:57:23Z")

</div>

I’ve attached a google drive with the template model, template landmarks, target model, and log file for this stage: [https://drive.google.com/drive/folders/1SHq7x5Ea4qnyc-4Xl0PS9nb6gakRa\_aA?usp=drive\_link](https://drive.google.com/drive/folders/1SHq7x5Ea4qnyc-4Xl0PS9nb6gakRa_aA?usp=drive_link)  
It is possible the template may need an extra ‘dummy patch’ for fully cover the lung, which can be removed at a later date. Once again, thank you for the assistance!

---

<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:** [February 8, 2024, 5:03pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/6 "2024-02-08T17:03:25Z")

</div>

this is not publicly shared, it says I need access

---

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 8, 2024, 5:07pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/7 "2024-02-08T17:07:01Z")

</div>

My apologies, the file should be available now.

---

<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:** [February 8, 2024, 5:57pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/8 "2024-02-08T17:57:23Z")

</div>

ALPACA is failing at the end of the deformable registration (cpd), it is doing the rigid and scaling fine. We have to investigate this @smrolfe @agporto can you take a look?

Independently, your models are generating these warnings when loaded into Slicer. I don’t know if this has anything to do with how they are created, or causing an issue. But there are lots of these warnings:

`Generic Warning: In vtkMath.cxx, line 799 vtkMath::Jacobi: Error extracting eigenfunctions `

@lassoan @jcfr is this a concern, or is it harmless? I am not seeing any other 3D models generating this warning when loaded into Slicer.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d19f8385cb3eb5f696f37fe36e1206a0e62f6382.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:** [February 9, 2024, 2:15am UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/9 "2024-02-09T02:15:20Z")

</div>

> [@muratmaga](#):
>
> Generic Warning: In vtkMath.cxx, line 799 vtkMath::Jacobi: Error extracting eigenfunctions

Do you get this message when applying a thin-plate spline transform?  
The error message probably indicates some error, for example the transformation may fold into itself (and therefore become non-invertible). But this may not necessarily cause any problem (for example, if you do not need the inverse transform in regions where it cannot be computed then you do not need to worry about it).

I would recommend to use tools in Transforms module’s Display section to verify the computed transform.

---

<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:** [February 9, 2024, 2:21am UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/10 "2024-02-09T02:21:27Z")

</div>

No, the warnings are generated while loading the sample lung models. Nothing to do with transforms or alpaca.

I havent seen these warnings with any other model load, so i was wondering if there is anything unique about the.

---

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 9, 2024, 9:49am UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/11 "2024-02-09T09:49:18Z")

</div>

For clarity, the template model was originally generated in Slicer but then cleaned with an automated routine using Rvcg/Morpho packages in R. I can send further codes and files if that will help with your investigation. Thank you again for the help.

---

<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:** [February 9, 2024, 1:44pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/12 "2024-02-09T13:44:29Z")

</div>

There is something wrong with these models. Try alpaca with the model you exported directly from your slicer segmentation and see if it works.

---

<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:** [February 9, 2024, 3:13pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/13 "2024-02-09T15:13:04Z")

</div>

You can also try Surface Toolbox in Slicer to clean the model (maybe there are coincident points, incorrect normals, etc.).

---

<div class="post-metadata">

**Author:** ![ThomasVanParys](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ThomasVanParys](https://discourse.slicer.org/u/ThomasVanParys)\
**Post date:** [February 9, 2024, 4:10pm UTC](https://discourse.slicer.org/t/alpaca-tps-warped-model-not-showing/34196/14 "2024-02-09T16:10:13Z")

</div>

I am using this template to process 220 samples for a wider growth study on juvenile lung development, manually cleaning each model may be a challenge. @muratmaga I have repeated the same ALPACA process for the right lung template with successful results, and I am now batch processing my entire dataset of right lungs. This means there is a specific issue with the left lung template model, but I can’t think of anything in my process which was different to the right lung template.  
Let me know what else you might need.
