Landmarks and mesh not aligned

Hi everyone, I created a symmetric 3D human facial mesh in R (exported as .ply using vcgPlyWrite function in Rvcg) and also digitised 5 midfacial landmarks along the facial axis of symmetry (exported as fcsv using write.fcsv in Morpho). In R, plotting reveals that the 5 landmarks are exactly along facial midline. However, when I load the .ply and .fcsv into Slicer3d, the landmarks no longer lie along facial midline.

This is the face and landmarks in R:

This is the face and landmarks in Slicer3d:

Similarly, I noted that although the Sample Data Gorilla_template_LM1.fcsv lie on 3D mesh of Gor_template_low_res.ply, when I import both files into R and plot, the landmarks no longer lie on the surface of the mesh.

This is the R code to load and plot the Gorilla data:

This is a screeshot of the plot generated:

I want to know why the landmarks that are correctly positioned in R appear incorrectly positioned in Slicer3d and vice versa. What should be done to have the facial landmarks lie along facial midline and on the facial surface in Slicer3d?


I am not sure what exactly causes this issue, but it looks like the fiducials/markers are maintaining a relative position/orientation with respect with each other, just not the model… perhaps the model and the fiducials/markers don’t share the same origin?

If I were you, I would start by placing some fiducials on the model using slicer, perhaps on the symmetric face model since there are only 4-5. Then, I would export those landmarks as a .fcsv file and compare the data in the file to the one you generated using R.

Let me know if this helps,

Thank you for the reply. I agree that probably the issue is due to different origin. I followed your suggestion to place several fiducials in slicer, exported the landmarks, and plotted in R. The points lie perfect well on facial surface as I have done in R.

However, I really need to import some externally digitized landmarks into slicer. Therefore, I wish to figure out how these externally digitized landamrks, when loaded into slicer, could still be correctly positioned.

I have uploaded my facial .ply and .fscv file into GitHub so that my issue might be better helped.

I can’t comment on why your external landmarks showing up displaced in Slicer, as @Fluvio_Lobo commented there might be other things going on and you will need to troubleshoot it yourself.

As for the gorilla LMs being different in R, I assume that’s because the model was in LPS and R is reading it as if it is RAS. If you negate the first two coordinates of LMs in R, they should line up.

You can try the SlicerMorphR package and see if the read/write markups function (along with options to specify coordinate system) helps you. See at GitHub - SlicerMorph/SlicerMorphR: R convenience functions for importing SlicerMorph dataset

1 Like

Thank you so much for the explanation. Errors for both data are due to the issue of LPS/RAS. Solved.