# Segmentation Comparison via alignment and deformation

Hi,

I have been working on segmenting the pelvis from a pre-CT scan and then a post CT scan with a fracture. I have both of the segmentations in the same window in Slicer and I have been able to transform the pre-CT on top of the post CT by using the IGT-Fiducials Registration Wizard. However, I want to measure how well these 2 structures are aligning and if there is any deformation/rotation in the axis of these 2. Is there any way that I can easily measure the deformation between these 2 segmentations now that I have them overlapping each other? I hope this makes sense that you are able to help.

Thanks!

One option is to use SegmentComparison module in the SlicerRT extension

https://www.slicer.org/wiki/Documentation/Nightly/Modules/SegmentComparison

Yes I have used that. Is there anyway I can measure deformation between the points I have selected on the pre CT vs. the post CT?

I want to measure how the orientation could be different from the pre to post CT, if that makes sense.

I know you aren’t a math professor, but how would one calculate the the translation magnitude or total rotation in degrees from the transformation matrix using linear algebra?

Translation is not uniform across the image. You can convert the transform to a a displacement magnitude image (using Transforms module Convert section) and compute all the displacement statistics that you need from there. You can use Segment statistics module or get the voxels as a numpy array and compute anything you need using standard numpy functions.

You can compute rotation from the computed 4x4 homogeneous transformation matrix that is displayed in Transforms module. There are many parametrizations, such as variants of Euler angles.

Hi Andras,

I am trying to use the convert section in the transforms module to compute the displacement statistics. Where can I access the data after I press convert? Nothing new pops up in the data window.

A new volume or transform node should be generated that shows up in Data module. If you don’t see a new node then reason for the error is probably described in the application log.