geomorphR / geomorph

Geomorph is a software package for performing all stages of geometric morphometric shape analysis of landmark points and curves in 2-and-3-dimensions as well as 3D surfaces in the R statistical computing environment. This repository is dedicated to providing stable and beta versions between CRAN uploads
73 stars 20 forks source link

error using buildtemplate for imported .ply file #24

Closed ENewham closed 4 years ago

ENewham commented 5 years ago

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

mlcollyer commented 5 years ago

Elis,

Would you mind sharing the version of R and the version of rgl you are using?

You can find the R version plus all package versions by typing in the console:

sessionInfo()

I ask because both R and rgl updated to new versions just over two weeks ago. We also have a geomorph update pending with CRAN. We do not get the same error - which is an rgl error, not a geomorph error - when we use buildtemplate, but we are using the most up to date versions of each package.

I think the incompatibility might be because of mismatched rgl/R versions, but I am not sure. It might be easier to investigate if we know which versions of the packages you had when you triggered the error.

Others have had the same problem, so if anyone wants to respond with session info, it would be appreciated!

Many thanks! Mike

On Mar 29, 2019, at 7:46 AM, ENewham notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geomorphR/geomorph/issues/24, or mute the thread https://github.com/notifications/unsubscribe-auth/AGjacq20C3cjniC512Ji5AgspXp5wQM1ks5vbf0jgaJpZM4cSN_B.

ENewham commented 5 years ago

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

ENewham commented 5 years ago

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?

mlcollyer commented 5 years ago

The only difference I see between yours and mine is the Mac OS (mine is macOS Mojave 10.14.4). I know it works on a version of Windows OS too. You might ask your colleague about her OS. I think it is a long-shot, but if we start eliminating variables, we might discover the problem. (I do not know if updating your Mac OS would help and do not want to suggest it until we identify that as an issue.)

If you have not restarted your computer after the updates you might want to try that. If you also run R-Studio, you might want to update that before restarting your computer.

These are shot-in-the-dark type suggestions, but because rgl has to launch Xquartz on a Mac, a computer restart might help.

Hope it works! Mike

On Mar 29, 2019, at 8:44 AM, ENewham notifications@github.com wrote:

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?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geomorphR/geomorph/issues/24#issuecomment-477984326, or mute the thread https://github.com/notifications/unsubscribe-auth/AGjacl4nldbczXTboA08c61D1l9D7Bolks5vbgqlgaJpZM4cSN_B.

ENewham commented 5 years ago

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

deanadams commented 5 years ago

Please send the file and I will try to carve out some time.

D

Dr. Dean C. Adams Director of Graduate Education, EEB Program Professor Department of Ecology, Evolution, and Organismal Biology Iowa State University https://www.eeob.iastate.edu/faculty/adams/ phone: 515-294-3834

From: ENewham notifications@github.com Sent: Friday, March 29, 2019 8:52 AM To: geomorphR/geomorph geomorph@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [geomorphR/geomorph] error using buildtemplate for imported .ply file (#24)

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/geomorphR/geomorph/issues/24#issuecomment-478005043, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGSvqbYhsQk-6lZIFG8QZstPAppSDztcks5vbhqAgaJpZM4cSN_B.

ENewham commented 5 years ago

Hi Dr Adams,

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

deanadams commented 5 years ago

Ok, will investigate when I have a little time.

D

Dr. Dean C. Adams Director of Graduate Education, EEB Program Professor Department of Ecology, Evolution, and Organismal Biology Iowa State University https://www.eeob.iastate.edu/faculty/adams/ phone: 515-294-3834

From: ENewham notifications@github.com Sent: Friday, March 29, 2019 9:02 AM To: geomorphR/geomorph geomorph@noreply.github.com Cc: Adams, Dean [EEOBS] dcadams@iastate.edu; Comment comment@noreply.github.com Subject: Re: [geomorphR/geomorph] error using buildtemplate for imported .ply file (#24)

Hi Dr Adams,

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/geomorphR/geomorph/issues/24#issuecomment-478008625, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGSvqRpC8DOBgyHxLzEvwME7xeCiZ5HXks5vbhzzgaJpZM4cSN_B.

ENewham commented 5 years ago

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

mlcollyer commented 5 years ago

Thanks, Elis!

Knowing this, as a minimum, we might be able to add a catch and detailed warning response so people can solve similar problems.

Thanks for the help! Mike

Sent from my iPhone

On Mar 30, 2019, at 6:54 AM, ENewham notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.