I am trying to produce surface landmarks on an extremely variable sclarite (hard bits of spiders/insects); however, when I run ProjectSemiLM, the data that is being generated seems to overwrite each line with the same information, producing a file that has the same landmark coordinates for every landmark. See details below:
There are no homologous landmarks for this object, so I used semilandmarks that follow the dorsal midline of the sclarite as my base landmarks. In PseudoLMGenerator, I project surface landmarks onto sclarite for the most average object (according to PCA of curves). In ProjectSemiLM, I used the most average shape for mesh, semilandmarks from curves as base landmarks, and pseudolandmarks as base semi-landmarks. When I run the program, it does not produce any errors in the python interactor section, but when I open the .fcsv file in a text editor, I can see each line being overwritten (see gif made from a video where each update overwrites the lines).
Procedure you describe sounds right. Can you share some of your data so that we cna look into it. SPecificaly we need a pair models, the base lm for the target and reference, and the pseudoLM set for the reference.
By the way, people usually prefer projecting pseudoLM to a surface via TPS deformation (what ProjectSemiLM does), because they use anatomical (fixed) landmarks to anchor the deformation. If you are using semiLMs to do that method should still perform but you may get push back from your reviewers.
A partial dataset is attached as a zip file to this email.
Unfortunately, with these sclerites, there are no homologous landmarks, and when I tried the pseudoLM + ALPACA, the sclerites did not seem to orient to one another correctly. There is so much variation in shape that primarily automated processes have a difficult time with alignment.
I think I need to hold the object in place (anterior → posterior and dorsal → ventral) somehow in order to generate pseudolandmarks for these sclerites.
@smrolfe will look into a bit more detailed why you are getting a set of fix coordinates, but I don’t think this TPS based deformation is going to work for you. Mostly because you have sampled your pseudoLMs on the entire sclerite, but those 10 equidistant points that will define the transformation is only the 1/2 of the perimeter of the specimen, and worse they are planar.
This error is caused by the failure to calculate an inverse TPS transform from this set of source/target points. I will update the module catch/fix this error, but the results will still not be meaningful. The TPS transform needs to capture more of the shape to estimate the homologous points between the samples, as @muratmaga suggested. If you can add some additional semi-landmarks it would be great to see the results.