I would like to use the semi-automated landmarking approach ALPACA to auto-landmark clavicles.
However, I seem to be unable to find suitable parameters for the auto-landmarking process, and I was hoping you could point me in the right direction. As far as I can tell the surface alignment operates well. However, the output of semilandmarks is not comprehensible. If I run the algorithm with the default settings, all landmarks of all surfaces culminate in one point, i.e. the output.fcsv files contain replicates of one point in 3D space.
When I check the box ‘Skip projection’, all output.fcsv files contain different landmark arrays, as one would expect. I can read those with the read.fcsv() function from the Morpho package in R, but when I perform a Procrustes fit via ProcSym(), all landmark configurations are identical. The same happens when I use the GPA module in Slicer - all specimens share one set of Procrustes coordinates.
I was hoping that this is a common mistake in my approach of the program. I looked through the Slicer Forum and FAQ, and there seems to be nothing remotely similar to my issue. I would be grateful for any help you can offer.
How do I register those landmarks in a way that they actually differ?
I am a little surprised that landmarks are not transferred correctly, even though the alignment seems reasonable.
During the transfer of landmarks from the source to target mesh, sometimes landmarks can be a few voxels away from the target mesh. Projecting them to the closest point on the mesh takes care of them. Skipping projection, will disable this step. But for reasonably aligned meshes, this shouldn’t make a large difference.
Would be possible for you to share plys of two clavicles and a set of semi-landmarks for one of them for us to see what the issue?
Hi Alex. As Murat mentioned, that is a very odd error. Never had anything like that happened. It would be really useful if you could share an example pair of meshes + landmarks. That way, we can examine more directly what the source of the problem might be. If I understood correctly, the whole pairwise alignment is working well, and you get landmarks that look reasonable on your target surface (after the deformable step). Is that correct? If so, that would suggest an issue with the exporting of landmarks to a file, which is an odd error to have since it relies on internal Slicer features. In any case, any more information you would be willing to share would be really helpful for our troubleshooting.
Thank You both for your swift reply.
Here is some sample data: Box
clavR0 corresponds to the landmark set.
Yes, the landmark projection looks reasonable. However, in detail it seems to eliminate all differences between specimens.
There are a bunch of things going on with your data:
Scale of data is completely off. Values displayed are in the meters range, which is unlikely for the clavicle.
The coordinate system of reference mesh and LM is not the same. It is easy to see when you just to R0 sample mesh and fcsv file into Slicer. Your models appear to be in RAS coordinate. But Slicer by default assumes they are in LPS coordinate. You can manually change the coordinate when you load the model individually into Slicer, but when ALPACA is reading them, there is no way for us to know what the correct coordinate system is.
The easiest solution is to transform your landmarks coordinates to match that of the models. For that you need to create a transform in which the first two diagonal values are -1 (and everything else) is untouched. When you apply and harden this transformation, your LMs appear on the surface as intended. Once I saved this transformed LM set, and rerun everything with the default settings, the landmarks transformed onto the target in a reasonable manner. The rest is for you to investigate.
However, before going forward too much, I would suggest where the data scale issue is coming from, and fixing it; particularly if your goal is quantitative morphology.
Thank You so much!
The landmarks are scaled by micrometers, so I will need to reunite the new new grid values with the models. That should be straightforward, though.
When I multiply the x- and y-coordinates with -1, the landmarks do indeed fit to the model, and the algorithm works without difficulties.
Problem solved.
Thank You Murat!
You can try to set the units to micrometers in Slicer. However, the unit support is not consistent across the modules, so your mileage would vary. I would suggest scaling everything (both the models and fiducials) by 0.001 to bring the units to millimeters, which is default unit in Slicer.