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.
We developed the pseudoLM + ALPACA pipeline exactly for situations like this. Did you try that? (you don’t need to have semiLMs for your target models. (see figure 5 in this paper. Computational anatomy and geometric shape analysis enables analysis of complex craniofacial phenotypes in zebrafish - PMC)
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.
If you have any ideas, I’m willing to hear them.
(Attachment ExampleData.zip is missing)
The zip did not attach, so here is a dropbox file. Dropbox - ExampleData.zip - Simplify your life
Forum doesn’t include the attachments in the email. Can you upload on the cloud and share the link here? (or you can email me directly).
@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.
So while you shouldn’t get a file with fixed LM outputs (and we will see why that’s the case), I don’t think it is going to work as is anyways.
Maybe you can try adding a few LMs in other axis, even if they are approximate they are still much better than having none.
Perfect. Thank you so much for the help. I have struggled with this dataset and think your advice will come in handy.
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.