Page 1 of 1

Model pose comparison based on geometry meshes?

Posted: Thu May 30, 2024 4:42 am
by birgitt.peeters
Hi!

I've recently developed a method to create OpenSim models from medical images and I am trying to validate my models using validation models, but I've been running into some issues and was hoping for ideas on how to solve them. I'm working on patients with scoliosis and I am trying to create more personalized models of these patients with a correct spinal alignment (as this is impossible to obtain with generic models). To do that, I need to define the new bones (bodies), intervertebral joints, and the correct spinal alignment.
A short description of the different models:
  • Validation models: models that have been manually created based on manual segmentations, manual definition of the intervertebral joints, and spinal alignment corresponding to the medical image. The images used are CT, only used for the segmentation and biplanar radiographs for the joints and spinal alignment. For each subject, there are multiple models, one model for each biplanar-imaging pose (upright stance and some bending poses), and each of these models has a different intervertebral joint definition. The subjects had reflective markers on the spine during image acquisition.
  • New models: models that were automatically generated based only on CT (segmentation, intervertebral joint definition, and spinal alignment). This means that the geometry files of the vertebrae in this model are different from those of the corresponding validation model, also the body reference frame is different, as well as the intervertebral joint definition. The markers in this model are defined in a way that the relative position of the marker to the vertebral geometry in this model is the same as in the validation model.
Currently, I simulate my new models to the bending poses of the validation models using the marker data and calculate the error in marker positions. I was asked to also provide some sort of orientation error (angles), but I am struggling to get an orientation measure out. It's not possible to calculate differences in joint angles or body rotations, since the joints and bodies were defined differently in the different models.

So my question is if anyone has a suggestion on how I can still compare the 2 model poses? Is this possible in OpenSim, or would it require creating a different GUI that allows to compare the geometries of the models based on the meshes instead of based on frames?

Re: Model pose comparison based on geometry meshes?

Posted: Tue Jun 04, 2024 10:30 am
by ongcf
One way we've compared orientations between frames with a single number is using the "angle" measure of the axis-angle representation of the rotation between the two frames. This was done, for instance, in the OpenSense validation paper (see Eq. 1 in https://nmbl.stanford.edu/wp-content/up ... ations.pdf).

Re: Model pose comparison based on geometry meshes?

Posted: Thu Jun 06, 2024 1:08 am
by birgitt.peeters
Hi Carmichael,
Thank you for the reply!
The issue in my case is that the reference frames of the bodies are different (they were defined using different methods so there will always be an offset in orientation and position between reference frames of the same bodies). Our main goal is to evaluate if we can still have a preferably identical model pose despite the different reference frame definitions. So far, I only managed to compare marker positions, since the markers in the different models have the same position relative to the body geometry, but I'm stuck trying to get an orientation measure out.

Re: Model pose comparison based on geometry meshes?

Posted: Fri Jun 07, 2024 4:00 pm
by ongcf
Thanks for the clarification, I definitely missed the part about different body frames.

I'm not sure, but it does seem like you would still need to compare some common frame difference between the two if you need to get an orientation difference measure. Perhaps this could be done by creating axes from your geometry (e.g., finding two major axes of a vertebrae to create a frame on each). To be honest, I'm not sure if there's a good way to do that in OpenSim, so it may be easier to form those frames first and then either use OpenSim (or some other package) that can help calculate angle differences between frames from there.