# GPA + PCA Error: Load landmark data failed

**URL:** <https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468>\
**Category:** Support\
**Tags:** slicermorph\
**Created:** [May 29, 2024, 1:53pm UTC](https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468 "2024-05-29T13:53:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgies10](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@kgies10](https://discourse.slicer.org/u/kgies10)\
**Post date:** [May 29, 2024, 1:53pm UTC](https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468/1 "2024-05-29T13:53:06Z")

</div>

Operating system: Mac OS 14.4.1  
Slicer version: 5.6.2  
Expected behavior: Generate GPA and PCA  
Actual behavior: The following Error and warning messages:

> QRegularExpressionPrivate::doMatch(): called on an invalid QRegularExpression object
> 
> QRegularExpressionPrivate::doMatch(): called on an invalid QRegularExpression object
> 
> QRegularExpressionPrivate::doMatch(): called on an invalid QRegularExpression object
> 
> QRegularExpressionPrivate::doMatch(): called on an invalid QRegularExpression object

AND then:

> Load landmark data failed: Could not create an array from landmark files

I’m looking at 8 specimens I’ve landmarked using ALPACA. I’ve moved all the .mrk.json landmark files produced from running ALPACA into a single directory to run the GPA +PCA. I’ve examined the files briefly to make sure they have the same number of landmarks and they have all have 4066 pseudolandmarks. I’ve tried running GPA on only 2 or 3 specimens and get the same errors.

When I ran ALPACA, it took my computer several hours. Did I do something wrong when I ran ALPACA? I left scaling and projection unchecked. I’ve included an image of some of the specimens and landmarks. Thank you for your help. I am a SlicerMorph novice and appreciate any insight you can provide. Thanks.

 ![Screenshot 2024-05-28 at 9.14.19 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/28d9cdbfba6ca84f02aa82e96f8d76db38b1d4c8.jpeg)

---

<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:** [May 29, 2024, 3:20pm UTC](https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468/2 "2024-05-29T15:20:21Z")

</div>

> [@kgies10](#):
>
> I’m looking at 8 specimens I’ve landmarked using ALPACA. I’ve moved all the .mrk.json landmark files produced from running ALPACA into a single directory to run the GPA +PCA. I’ve examined the files briefly to make sure they have the same number of landmarks and they have all have 4066 pseudolandmarks. I’ve tried running GPA on only 2 or 3 specimens and get the same errors.

If you can share the data we can take a look.

---

<div class="post-metadata">

**Author:** ![kgies10](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@kgies10](https://discourse.slicer.org/u/kgies10)\
**Post date:** [May 29, 2024, 4:10pm UTC](https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468/3 "2024-05-29T16:10:27Z")

</div>

Thank you for your reply! I reran the analysis and used fewer landmarks (600 instead of 4k) and checked projection and scaling and now it works! I used the projected landmarks in the analysis. I think it was either number of landmarks I used or that I didn’t project or scale the data.

---

<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:** [May 29, 2024, 6:55pm UTC](https://discourse.slicer.org/t/gpa-pca-error-load-landmark-data-failed/36468/4 "2024-05-29T18:55:57Z")

</div>

> [@kgies10](#):
>
> project or scale the data.

Projecting the points can take a while for dense point clouds like this. Try the original without choosing the project points. The caveat it they may end up not on the surface of the target model.
