Hello @cdcooke,
These look very close, based on eyeballing the final parameter values. Admittedly this is not the correct way to compare two transformations, better to use Target Registration Error. In this case take a random set of points inside your region of interest and compute ||T_0(p_i) - T_1(p_i)||, see this function.
You should be aware that the registration involves a probabilistic component, the random choice of point set, so running the same code without setting the seed will lead to slightly different results. As you did not explicitly set the sampling strategy and percentage if using a random sample you end up using the default values (I don’t remember what they are). I believe being explicit about choices is always better, even when using the default values (I never remember what they are).
Finally, the ITK code seems to be using old strategies (user selected scales for parameters). Since ITK 4.0 the recommended approach is to use the automated scaling methods. Also, your code did not explicitly specify a sampling strategy or percentage if it was random sampling. Plesae see attached modifiedSimpleITK_RigidRegistrationExample.cs (4.9 KB) code (comments starting with “zivy” are where code was modified).
I really recommend that you go through the SimpleITK notebooks and write your code from scratch and not try to translate from the ITK code (which appears to have only been minimally updated in the transition from 3.x to 4.0 - we are now in ITK 5.x).