This is a rather hands-on question, and without the data it is hard to see 
where it might be failing. I saw you had a similar inquiry about the 
ProjectSemiLMs in SlicerMorph on Slicer forum. Both placePatch and 
ProjectSemiLMs work in a rather similar way. They use a TPS deformation 
created by the fixed landmarks to place the semiLMs onto the target 
surface. The small difference between initial deformation is usually 
handled by projecting the semiLMs along the normal axis. Given that both 
procedures failed for you, I suspect you have an issue with your 3D model 
(perhaps the surface normals are not created correctly?), or you may have 
mixed the order of your fixed landmarks that are used in the TPS for this 
sample. Finally both these methods are very susceptible to where the fixed 
landmarks are placed. If you have couple of them on very high curvature 
area (can't tell from the picture above), you may want to just jitter them 
tiny bit and see if that helps.   

(If you zip your PLY file, it should compress considerably, and then you 
can upload to a google drive and share the link ).

On Tuesday, September 6, 2022 at 7:26:32 AM UTC-7 [email protected] wrote:

> Dear all,
>
> I am using placePatch function in Morpho package in R to project surface 
> semilandmarks from template to specimen. I have two follow-up questions.
>
> 1. Firstly, I use the findmeanspec function to find out "lf" as the 
> temple. Then I found that the code worked well and semilandmarks were 
> projected from "lf" (template) to "lxx" (specimen). But the same code did 
> not work from "lf"(template) to "zzq"(specimen). Some semilandmarks were 
> inside of the bone and gathered together.I tried to change the value of 
> inflate, but I failed. what should I do? Is it reasonable to slide the 
> semilandmarks and ignore it?
> code:
> library(Morpho)
> library(SlicerMorphR)
> library(rgl)
> library(Rvcg)
>
> #import landmark
> file<- "zzq.fcsv"
> zzq <- read.markups.fcsv(file = file, forceLPS = TRUE)
> file<- "lf.fcsv" 
> a <- read.markups.fcsv(file = file, forceLPS = TRUE)  # lf'slandmarks 
> ,total 26 points
> file <- "PseudoLandmarks.fcsv"
> b <- read.markups.fcsv(file = file, forceLPS = TRUE)  #lf's  semilandmarks
> lf <-rbind(a,b) #lf
>
> # Import mesh
> zzq.mesh <- vcgImport("zzq_1.ply")
> lf.mesh <- vcgImport("lf_1.ply")
>
> #create atlas
> atlas <- createAtlas(lf.mesh, landmarks =lf[c(1:26),], patch=lf[-c(1:26),])
> plotAtlas(atlas)
> #patch
> data <- zzq[c(1:26),]
> patched <- placePatch(atlas, data, prefix="zzq_1",path="./",inflate = 
> 5,rhotol = pi/2)
> #view
> open3d()
> wire3d(zzq.mesh,col=3)
> spheres3d(patched)
>
> 2. I try to transfer semilandmarks from a template to all specimens in a 
> sample at the same time, and [image: lxx.png][image: lxx2.png]finally I 
> get an array of semilandmarks. How to deal with it easily?
> The ply. file is too big to upload, what should I do next?
>
> Best wishes,
> Sam
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/morphmet2/7bed3a71-74d1-4052-ad33-ee6e6bba07dcn%40googlegroups.com.

Reply via email to