A way to project the 3D set into 2D: If you have acquired only the outline of the articular surface area, you can use the package morphomap for PCA, sorting points on the curve, and calculating the area using the Shoelace formula:
library(morphomap) PCA<-prcomp(yourset,scale=F) plot(PCA$x,asp=1) morphomapArea(morphomapSort(PCA$x)) If you have acquired a sparse set of points on the surface area, you can use PCA combined with a convex hull to calculate the area: library(sp) PCA<-prcomp(yourset,scale=F) box.hpts <- chull(PCA$x) box.hpts <- c(box.hpts, box.hpts[1]) box.chull.coords <- PCA$x[box.hpts,] chull.poly <- Polygon(box.chull.coords[,c(1,2)], hole=F) chull.area <- chull.poly@area ________________________________ Da: morphmet2@googlegroups.com <morphmet2@googlegroups.com> per conto di Antonio Profico <antonio.prof...@unipi.it> Inviato: venerdì 10 gennaio 2025 00:58:53 A: Jordan Guerra; Morphmet Oggetto: Re: [MORPHMET2] Re: Calculating surface areas from 3D landmarks Dear Jordan, try this code: library(Arothron) library(Rvcg) library(Morpho) library(rgl) set<-read.amira.set("insertherethepath","auto")[,,1] sur<-vcgBallPivoting(set) open3d() wire3d(sur,col="blue") spheres3d(set,radius=1) vcgArea(sur) #calculate the area mesh2ply(sur,"mysur") #export the triangulated set #Since you mentioned Amira right click on the set-> pointWrap #it's similar to the R function vcgBallPivoting or right click on the set -> Delaunay2D on the surface right click -> measure -> surfaceArea -> apply -> show Best, Antonio ________________________________ Da: morphmet2@googlegroups.com <morphmet2@googlegroups.com> per conto di Jordan Guerra <jordansgue...@gmail.com> Inviato: giovedì 9 gennaio 2025 23:18:54 A: Morphmet Oggetto: [MORPHMET2] Re: Calculating surface areas from 3D landmarks Correction to my original message: My surfaces were not aligned to orthogonal planes when I collected the data On Thursday, January 9, 2025 at 4:21:07 PM UTC-5 Jordan Guerra wrote: Dear all, Happy new year to everyone! I'm looking for some advice on how to best/efficiently calculate the area of an articular surface using R. I have 3D landmark data (collected in Amira) that I want to use to calculate the area of different articular surfaces. I want my surfaces were not aligned to orthogonal planes when I collected the data What I've tried so far is to re-align the landmarks of the surfaces I'm interested to one of the orthogonal planes (using 3 points) and then removing one of the dimensions so that I have a 2D polygon that I can use Gauss's area formula. However, because I am only using 3 points to determine the 'new' orthogonal plane, I have doubts that this is the best way to do this since not all of other landmarks fall on this plane. Does anyone have any suggestions on how to do this better or is there an R-package that does this already? All the best, Jordan -- 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 morphmet2+unsubscr...@googlegroups.com<mailto:morphmet2+unsubscr...@googlegroups.com>. To view this discussion visit https://groups.google.com/d/msgid/morphmet2/86c45ae8-a681-4cb8-bab4-4b904e09a3a1n%40googlegroups.com<https://groups.google.com/d/msgid/morphmet2/86c45ae8-a681-4cb8-bab4-4b904e09a3a1n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 morphmet2+unsubscr...@googlegroups.com<mailto:morphmet2+unsubscr...@googlegroups.com>. To view this discussion visit https://groups.google.com/d/msgid/morphmet2/beeb8e960bdd498183c8e0749ebbc63e%40unipi.it<https://groups.google.com/d/msgid/morphmet2/beeb8e960bdd498183c8e0749ebbc63e%40unipi.it?utm_medium=email&utm_source=footer>. -- 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 morphmet2+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/morphmet2/9f43ce73e4e8414482493feaea1ea4a1%40unipi.it.