[MORPHMET] An R tool to align portions of a 3D model virtually divided

2016-04-14 Thread antonio.profico

Dear morphometricians,

 

I am writing to ask if you would to be so kind to support anonymously a 
research of the Palaeoanthropology and Bio-archaeology laboratory in Sapienza 
University in Rome directed by Prof. Giorgio Manzi. 

We are developing an R tool useful as first step in the digital reconstruction 
procedures through a landmark-based approach. In this framework, we are 
interested to compare the efficiency of our R tool (a landmark-based approach) 
compared to a virtual alignment performed by expert in the field without the 
aid of reference material (hence no overlapping of transparent reference model, 
no landmark alignment, etc…)

 

In fact, in our case we are interested in aligning two portions of a skull 
virtually divided, whose margins were partly removed to simulate natural 
breakage, hence there is no surface of contact between the two halves. 

 

It would be great to have a comparison sample of alignment performed fully 
manually in virtual environment without any type of reference model normally 
used. At the end of this project I would be very happy to share with you the R 
code for future applications and methodological improvements.

 

The test can be performed either anonymously or non-anonymously, in both cases 
you will be acknowledged in the paper.

 

For details please contact: antonio.prof...@uniroma1.it

 

Best,

 

Antonio






__

Antonio Profico
PhD 
Department of Environmental Biology – Dipartimento di Biologia Ambientale
SAPIENZA Università di Roma

Lab.  06 4991 2690
Mob. 3293440766
-- 
___
INVESTI SUL FUTURO, FAI CRESCERE L’UNIVERSITÀ:

*DONA IL 5 PER MILLE ALLA SAPIENZA*

CODICE FISCALE *80209930587*

-- 
___
INVESTI SUL FUTURO, FAI CRESCERE L’UNIVERSITÀ:

*DONA IL 5 PER MILLE ALLA SAPIENZA*

CODICE FISCALE *80209930587*

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
--- 
You received this message because you are subscribed to the Google Groups 
"MORPHMET" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.


[MORPHMET] R code to reduce information loss caused by surface smoothing

2016-04-08 Thread antonio.profico

Dear morphometricians,
 
I wish to alert you to a new paper (doi: 10./2041-210X.12576), accepted in 
Methods in Ecology and Evolution, in which we propose and describe an R tool 
conceived to find the optimal smoothing settings when decimation is desired on 
a 3D mesh.
In fact, 3D imaging techniques generate a series of alterations on the 
reconstructed surfaces, due to inaccuracies in the processes of acquisition and 
rendering. The topological simplification, by decimating vertices and facets of 
a mesh, can solve these problems by facilitating the subsequent steps in 
surface processing. By applying an optimal smoothing filter on the decimated 
model, it is possible to recover a percentage of anatomical information lost 
during the decimation procedure. 




This first release of the tool is designed for those cases in which 
semi-landmarks are used. 




Specifically, our tool finds the optimal smoothing filter (algorithm type, 
iteration, scale factor parameter), just requiring a 3D mesh, a landmark set 
and a semi-landmark set as inputs.




In the paper http://onlinelibrary.wiley.com/doi/10./2041-210X.12576/epdf is 
reported a detailed description of the tool with an example of application on a 
3D simplified model of Saccopastore 1.




The R code, 3D model and landmark and semi-landmark sets are available as 
Supporting information and they are also accessible via Github 
https://github.com/Arothron/Arothron and Dryad repositories 
http://doi:10.5061/dryad.28631 .
In the Arothron R package other useful functions are embedded, in particular to 
import Amira data in the R environment (e.g. landmark set, surface.path), for 
details see (Profico et al. 2016 Filling the gap. Human cranial remains from 
Gombore II (Melka Kunture, Ethiopia; ca. 850 ka) and the origin of Homo 
heidelbergensis doi 10.4436/JASS.94019) 




Best,

Antonio 

__

Antonio Profico
PhD student
Department of Environmental Biology – Dipartimento di Biologia Ambientale
SAPIENZA Università di Roma

Lab.  06 4991 2690
Mob. 3293440766

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
--- 
You received this message because you are subscribed to the Google Groups 
"MORPHMET" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.


Re: [MORPHMET] Read .landmarkAscii file into R

2016-02-16 Thread antonio.profico
Dear David,


when you do many operations in Amira or Avizo for a bug the landmarkAscii file 
is converted in a 2setlandmarkAscii file, in fact a second empty matrix will be 
added…


I report two functions to convert a landmarkAscii file or a folder containing 
the amira/avizo Landmark files in an array k*3*n, where k=number of landmarks 
and n=number of specimens. 

My functions read only the matrix between the @1 and @2. 



Let me know if it works or not…


Best,

Antonio


#' read.amira.set
#'
#' This function convert a file landmark set of Amira in a array
#' @param name.file character: path of landamrkascii file
#' @param nland numeric: number of landmark sampled in Amira, if is set on 
"auto" will be automatically recognized the landmark number
#' @return array.set numeric: an array with landmark coordinates (kxdxn)
#' @author Antonio Profico
#' @export
#' 


read.amira.set=function(name.file,nland){
A <- readLines(name.file, n = 100)
end <- which(A == "@1")
end_2 <- which(A == "@2")
if(length(end_2!=0)){
print(paste("file named",name.file, "contains a second matrix of 000"))
B_junk=read.table(name.file,skip=end,nrows=(end_2-end-2))
if(nland!="auto"){
if (dim(B_junk)[1] != nland){
print(paste("nland is different from dim(matrix)[1]: 
",paste("nland=",nland,",",sep=""),
  paste("dim(matrix)[1]=", dim(B_junk)[1],sep="")))  
B=matrix(NA,ncol=3,nrow=nland)}
if(dim(B_junk)[1]==nland){
B=B_junk  
}}
if(nland=="auto"){
B=read.table(name.file,skip=end,nrows=(end_2-end-2))
}}
if(length(end_2)==0){
B_junk=read.table(name.file,skip=end)
if(nland!="auto"){
if (dim(B_junk)[1] != nland){
print(paste("nland is different from dim(matrix)[1]: 
",paste("nland=",nland,",",sep=""),
paste("dim(matrix)[1]=", dim(B_junk)[1],sep="")))
B=matrix(NA,ncol=3,nrow=nland)}
if(dim(B_junk)[1]==nland){
B=B_junk  
}}
if(nland=="auto"){
B=B_junk}}
array.set=array(as.matrix(B),dim=c(dim(B)[1],3,1))
dimnames(array.set)[[3]]=list(name.file)
return(array.set)}






#' read.amira.dir
#'
#' This function read and store in array the coordinated allocated in a folder 
in separate files (format
#' @param path.dir character: path of the folder
#' @param nland numeric: number of landmark sampled in Amira
#' @return array.set numeric: a kxdxn array with landmark coordinates
#' @author Antonio Profico
#' @export


read.amira.dir=function(path.dir,nland){
names=list.files(path.dir)
if(nland=="auto"){
dims=c()
for(i in 1:length(names)){
dims[i]=dim(read.amira.set(paste(path.dir,"/",names[i],sep=""),"auto"))[1]}
array.amira=array(NA,dim=c(as.numeric(names(sort(-table(dims)))[1]),3,length(names)))}
else{array.amira=array(NA,dim=c(nland,3,length(names)))}
for(i in 1:length(names)){
array.amira[,,i]=read.amira.set(paste(path.dir,"/",names[i],sep=""),nland) 
}
if(length(names)==1){
dimnames(array.amira)[[3]]=list(names)}
if(length(names)!=1){
dimnames(array.amira)[[3]]=names}
return(array.amira)
}








__

Antonio Profico
PhD student
Department of Environmental Biology – Dipartimento di Biologia Ambientale
SAPIENZA Università di Roma

Lab.  06 4991 2690
Mob. 3293440766






Da: David Katz
Data invio: ‎mercoledì‎ ‎20‎ ‎gennaio‎ ‎2016 ‎06‎:‎49
A: Emma Sherratt
Cc: MORPHMET





I won't get back to my office, and the hard drive where the files are stored, 
for about a week. I'll send something along then. 



Thanks, Emma.

David



On Wed, Jan 20, 2016 at 12:08 AM, Emma Sherratt  wrote:



Hi David,




Not sure what the file actually looks like since you’ve not included a sample 
here. However I suggest taking a look at the readland functions in geomorph R 
package to see how we tackle the different types. If you want, send it through 
to us and we can take a look. If there’s a lot of people using AVIZO for 
digitising, we can include a function in geomorph.




Regarding a read function writing? Nope, never heard of that.




Em



~~~
Emma Sherratt, PhD.


Lecturer in Zoology,

Zoology Division, School of Environmental and Rural Science, 

Room L112 Bldg C02, 

University of New England, 

Armidale, NSW, Australia, 2351

Tel: +61 2 6773 5041

email: emma.sherr...@une.edu.au

Twitter: @DrEmSherratt



Caecilians are legless amphibians...
  __
(\   .-.   .-.   /_")
 \\_//^\\_//^\\_//
  `"`   `"`   `"`
learn more about them here: www.emmasherratt.com/caecilians




On 20 January 2016 at 14:50:38, David Katz (dck...@ucdavis.edu) wrote:







Hi everyone,  



I've collected 3D landmarks on a series of cranial surface models in Avizo. 
Avizo's landmark editor outputs .landmarkAscii files, which I would like to 
read into R. The way I've done the reading has the following very unexpected 
effect: sometimes, it writes additional data to my .landmarkAscii files. I'd 
like to understand why, but am mostly interested in finding a solution.




To read in the landmark files for a specimen...





# Below, avz.file is