Finding landmark pairing information from PseudoLMGenerator

I am PseudoLMGenerator to create symmetric pseudolandmarks on a 3D human facial surface mesh.

  1. I have coordinate information for midfacial landmarks, which could be used as the Plane. However, in Markups module, the plane has to be created by manually placing landmark. I wonder if it is possible to directly use the existing coordinate data of midfacial landmarks to define the Plane, without having to do this manually. Manual operation means that there will inevitable be some degree of deviation from the true plane of symmetry, although I am not sure how much this affects the symmetry of the resulting pseudolandmarks.

  2. While coordiantes of the symmetric landmarks are stored in SymmetricPseudoLandmarks, I wish to obtain a file that explictly tell me which landmarks on the left pairs which landmarks on the right and which landmarks are midfacial landmarks. It could be a two column file with entries being the landmark index. For example, if row 1 is 34, 35, then I know the point represented by the 34th row of SymmetricPseudoLandmarks pairs with that represented by the 35th row of the file. If row 2 is 20, 20, then I know the point represented by the 20th row of the file is a midfacial landmark.

  3. Is there a way to obtain the triangulation file associated with the SymmetricPseudoLandmarks?

There is no such requirement. You can create the plane programmatically in whichever you want, and specify that particular plane to be used in PseudoLMGenerator.

This is already there, midline landmarks have prefix of m_, left of the symmetry plane is n_, right of symmetry plane is i_ See the tutorial Tutorials/PseudoLMGenerator at main · SlicerMorph/Tutorials · GitHub

Thats already there. After clicking the “generate template” button, switch to data module and you will see a node called templateModel.

Thank you for the response. For Q1, I realised that I could first manually pick the landmarks used to define the Plane first, then manually modify the associated coordinate values so that the Plane lies exactly along the midline. But may I have any idea about how this could be done programmatically? Perhaps directing me to some revevant file will help as well.

I am not sure if there is a specific function to create a best fitting plane from a series of points immediately available, but if you browser through the examples in the Slicer’s script repository for Markups, you should be able to do what you want:

Keep in mind that for practical purposes there is no such thing as an exact midline for any biological structure as there is always subtle asymmetries. If you do want to create perfect midline, you need to reflect your original specimen, and create a symmetrized version by fusing the original and reflected one.

You can use ACPC transform module to compute a transform (that can be used to position a plane or to move the object to a canonical pose) from a list of mid-sagittal points and a “horizontal” direction.

1 Like

For my question on triangulation file associated with the generated pseudolandmarks, I followed Dr. Murat’s suggestion to look at the templateModel. While this file did contain triangulation information, it seems that the triangulation is not complete. I exported the templateModel as ply and visualized it in MeshLab:

It can be seen that this file contains so many holes which should have been filled by triangular facets. I also check the sample data and here is the MeshLab view:

Unwanted holes are there two. My conclusion is that although there is indeed triangulation file associated with the templateModel, it is not complete, leaving many holes. This happens not just to my own data, but also the sample data. So this is unlikely to be due to something specific to my sample, but rather an issue generally associated with PseudoLMGenerator. Have I done something wrong? How to obtain a complete mesh triangulation file that when plotted, leave no holes among vertices?

The gaps are there not because there are missing vertices, but because surface normals are not calculated. We don’t need normal for our purposes, only the vertices. It is a model that’s not meant be used beyond visualizing the surface geometry (so that you can decide you need more sparse or dense sampling). You can’t and shouldn’t use this for anything more than that.

Why do you need this model, what is your goal?