geomorphR/geomorph

error using buildtemplate for imported .ply file

Closed this issue · 10 comments

Hello everyone,

I am brand new to geomorph and am trying to use it for my own surfaces, saved as .ply files in meshlab.

I can load my surfaces using "read.ply" with no problem. However, when I try and assign landmarks using "buildtemplate" I receive the following error message:

"
Error in rgl.material(...) : NAs in foreign function call (arg 2)
In addition: Warning message:
In rgl.material(...) : NAs introduced by coercion
"

Does this mean that there is an issue with the mesh in the .ply file that I next to fix in meshlab first? Or is this something that I can bypass in geomorph?

Many thanks,

Elis

Hi Mike,

Many thanks for the swift reply! This is the conclusion a colleague reached also as she could run the "buildtemplate" function with no errors in her own r console with the same dataset. I've now completely reinstalled my r and rstudio packages and so will try again with a new geomorph download - I will let you know how this goes.

Many thanks,

Elis

Hi Mike,

I still get the same error message unfortunately. my session info is as follows:

R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

other attached packages:
[1] mgcv_1.8-27 nlme_3.1-137 geomorph_3.1.0 rgl_0.100.19
[5] RRPP_0.4.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 knitr_1.22
[3] magrittr_1.5 splines_3.5.3
[5] xtable_1.8-3 ape_5.3
[7] lattice_0.20-38 R6_2.4.0
[9] jpeg_0.1-8 tools_3.5.3
[11] parallel_3.5.3 webshot_0.5.1
[13] grid_3.5.3 xfun_0.5
[15] miniUI_0.1.1.1 htmltools_0.3.6
[17] crosstalk_1.0.0 yaml_2.2.0
[19] digest_0.6.18 Matrix_1.2-15
[21] shiny_1.2.0 later_0.8.0
[23] htmlwidgets_1.3 promises_1.0.1
[25] manipulateWidget_0.10.0 mime_0.6
[27] compiler_3.5.3 jsonlite_1.6
[29] httpuv_1.5.0

Does this clarify anything?

My colleague's OS is 10.13.2 high sierra, which is the same as mine. I've now started installing the latest OSX so finger's crossed that should sort things out. But I've now tried installing everything on a new machine with the same high sierra OSX, with no previous installs of r, rstudio or XQuartz. After restarting my system I have installed geomorph and all dependables, re-read the .ply and I still get the same error message. Would you possibly have time to see if buildtemplate works with this file on your system?

Again, many thanks for all your help so far!

Elis

Hi Dr Adams,

Thank you so much for your offer of help - I've sent the file to your email account.

Hi all,

So I have cracked the problem! By going into the attribute lists of the example file "myply" (created from scallopPLY$ply in the quick guide) and comparing them to my .ply files, the main difference was that my $material was NULL. I managed to change this by literally colouring the mesh in meshalb using the z brush tool and re-exporting into rstudio. This created a field for $material and now all the functionality works. - Phew!

Many thanks for all your help,

Elis