How to align two models (stl) and then do landmarks on it?

I have two models(stl) of torso (pregnant) and I am trying to align them one after another (superimpose) and then I want to do landmarks on the specific points where there are electrodes placed (checking position of electrodes from both the files) ?

You don’t really need to align the models if you just want to landmark them.

But if you do, you can use the FastModelAlign to rigidly register one model to the other, and then you can do the landmarks on the rigidly registered model.

1 Like

Thank you so much Professor Maga

Someone knows how to align two models but with a code in python?

Hi @muratmaga, I am super interested in aligning a batch of stl files to a target. I cannot use batch ALPACA or MALPACA directly since I do not have any reference landmarks and the PseudoLMGenerator does not do the job nicely. Is there a way to implement the FastAlignModel module in a smooth way in Python so I do not have to align all of them one by one? I would like to skip this manual work since afterwards I intend to compute a loss to decide which is the optimal source mesh to do the alignment to. I will use that one for later generating an average shape model based on the registered ones, so I need to find the optimal registration based on the optimal source and those many comparisons would be feasible only if automating the process.

We really don’t have bandwidth to implement the batch mode in FastModelAlign. The source code is available and perhaps you can do and contribute back using the ALPACA as an example.