Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Affine registration of similar images #1833
Hi dipy team and users,
I am having some troubles with the dipy.align.imaffine functions' results when I try to register images with very little to no differences.
I know that anyway it's not very common to register an image to itself. However, I am trying to write a function to create a template of longitudinal MRI data with an algorithm similar to what freesurfer does but entirely in python.
Do you have any idea of how I could obtain a transformation closer to none when the images are very similar?
Maybe it's because I used the default parameters?
Thank you in advance and have a great day,
Way to reproduce
Tested with both python 2 and 3 and dipy version 0.16.0
In this example is the final norm is around 0.009294 with the translation + rigid + affine transformations.
I followed the examples but maybe the default parameters are not adapted to this particular case, I don't know.
Thank you for this complete report. For this particular case, I suppose you do not really need the multiscale registration so I will use these parameters:
it should give you a better result for this case.
@skoudoro could you please reformat the initial question, allow code so it is easier to read
In theory, it should not, I agree.
@chrisfoulon, After a bit more of thinking, I know that the default condition value for the optimizer to stop is 1e-4 (
Thank you for your answers, I attached some sample data I used for this example. The first one is the MNI152 in 3mm and the second the MNI152 in 1mm from FSL.
I tried with your suggestion with the gtol, but the results are still the same :S
OH! Good call, I tried with FSL using the mutual information instead of the correlation ratio and I also have a big distance between the same images! (I'm sorry I'm not yet familiar with all the parameters and what they imply).