Building a Gaussian process shape model using solid tetrahedral mesh

70 views
Skip to first unread message

Michael Lennon

unread,
Jun 16, 2021, 3:56:45 AM6/16/21
to scalismo
Hello,

I have a general question about whether it is currently possible to build a qp model on a solid tetrahedral mesh in Scalismo?

I have attached a tetrahedral humerus model that I am able to read and view in Scalismo. I am interested if a gp model was possible then a process similar to that demonstrated in the tutorial on "Parametric, non-rigid registration" could be used to create registration to a surface mesh of another humerus bone.  This would enable the creation of a set of different solid bone shapes that have corresponding tetrahedral meshes.

Alternatively, I have heard of a process of mesh morphing a solid mesh to a corresponding surface mesh using transformation vectors between the surface nodes.  This does not require a gp model of course but I was wondering if that is possible currently in Scalismo.

Thank you for considering my question and I hope it makes some sense what I am asking.
humerus.vtu

Marcel Luethi

unread,
Jun 16, 2021, 4:47:21 AM6/16/21
to Michael Lennon, scalismo
Dear Michael

Yes, you can build a gp model of tetrahedral meshes in Scalismo. It works exactly in the same way as building a triangle mesh. You just use as a reference mesh a tetrahedral mesh instead of a TriangleMesh and adapt the type signatures accordingly.

Here is an example:

object TetrahedralExample extends App {
scalismo.initialize()
implicit val rng = scalismo.utils.Random(42)

val ui = ScalismoUI()

val refMesh : TetrahedralMesh[_3D] = ??? // your reference

// building the gp
val cov = DiagonalKernel3D(GaussianKernel3D(100) * 100, 3)
val gp = GaussianProcess3D[EuclideanVector[_3D]](cov)

// approximating the gp
val lowRankGP = LowRankGaussianProcess.approximateGPCholesky(
refMesh,
gp,
1e-1,
NearestNeighborInterpolator())

val pdm = PointDistributionModel(refMesh, lowRankGP)

val modelGroup = ui.createGroup("model")
ui.show(modelGroup, pdm, "tetrahedral-mesh-model")
}

Registration might be a bit more tricky, as you need to define what correspondence means for the inner parts of the structure you model (does point to point correspondence even make sense there)? If not, you can always extract the outer surface using tetrahedralMesh.operations.getOuterSurface. You may also want to read this blog post https://scalismo.org/blog/pdms-scalismo-090 to see how you can move between different types of models.

Best regards,

Marcel


--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/7c1d16f9-cfcc-45c0-9f8f-dad0173fd5b0n%40googlegroups.com.

Michael Lennon

unread,
Jun 16, 2021, 5:43:25 AM6/16/21
to Marcel Luethi, scalismo
Thank you very much Marcel.  This is very helpful and I will try coding tomorrow.
Reply all
Reply to author
Forward
0 new messages