How does imregister work?

60 views (last 30 days)
Marina Marina
Marina Marina on 25 Apr 2013
Commented: Roohi Moosavi on 22 Apr 2014
Hi, I'm using imregister to compute an affine registration between 2 different volume (3d CBCT scans). I set mean square error as metric and Regular Step Gradient descend as optimizer. I use 3 pyramidal steps, default setup, but i don't know how imregister work in these levels! Does it use different voxel subsets?
I try to find documentation about imregister workflow, but i don't find anything useful and complete.
Someone has others information about imregister and it's pyramid levels?
  1 Comment
Roohi Moosavi
Roohi Moosavi on 22 Apr 2014
Hi Alex Thank you for your effort in this function. I have two question about this. First one is the type of "imregtform".Is it categorized in "Feature based" registration or "Intensitybased"?
The second question is about using "control points". In each of my reference and target images, I have two correspond control point that know exactly x,y about them. Can I apply these control points into "imregtform" algorithm to improve accuracy of my work? By the way, the type of my images is binary images (like curve) as I attached and the control points are start and end points of it. Thank you in advance.

Sign in to comment.

Accepted Answer

Alex Taylor
Alex Taylor on 25 Apr 2013
Thank you the feedback. The documentation for imregtform/imregister could be improved to include more information about Pyramiding. I will see to it we take care of that.
In the meantime: The algorithm used by imregtform/imregister build an image pyramid that has N levels. Each pyramid level decreases the resolution by a factor of 2 in each dimension. If you start with a 64x64 image, and have three pyramid levels, then your pyramid will consist of a 64x64 grid, a 32x32 grid, and a 16x16 grid. Optimization starts at the coarsest level of the pyramid (16x16) and continues at this level until either MaximumIterations is reached, or until the optimizer converges. At this point, the optimizer starts again by attempting to refine the current transformation estimate on the next pyramid level (32x32). This process continues until you get back to the original full resolution data that you provided to imregister.
In short, yes, imregister/imregtform internally build a multi-resolution pyramid in memory and solve an optimization problem on each level of the pyramid. Please let me know if there is any aspect of your question that I did not address.
Manu on 8 Aug 2013
Edited: Manu on 9 Aug 2013
Hi Alex,
This was also exactly my question regarding what interpolation does imregister apply in its algorithm and how are the pyramids obtained. You have answered the pyramid question but interpolation one still remains. After digging into the imregister code to just before where it enters into the mex file, it says that it uses ITK based registration. Apparently it uses ITK image registration library. This gives rise to two questions: (1) Why is no reference made to ITK in the documentation? (2) If it uses ITK registration, then can the users be given option to specify what interpolation to choose because ITK provides several options to choose interpolation. (3) I would also like to know what kind of smoothing is done prior to registering. For example is it isotropic or anisotropic?
Thanks Manu

Sign in to comment.

More Answers (4)

Alex Taylor
Alex Taylor on 17 Apr 2014
Hi Kahaki,
This question keeps coming up, so I will see if there is something better we can do in the documentation. In the meantime: other than in survey papers such as Zitova:
The basic framework of using numeric optimization with a scalar image similarity metric is not commonly discussed in literature. Instead, the literature tends to focus on specific numeric optimization techniques and/or specific similarity metrics. As such, there isn't a "basic reference" for imregister/imregtform. The references would depend on which optimizer and metric you are using. Also, the Mean Square Error similarity metric and Gradient Descent optimization are so old/common that I'm not aware of a reference citation for these.
For OnePlusOneEvolutionary optimization:
Evaluation of 2D/3D bias correction with 1+1ES-optimization" Martin Styner, Prof. Dr. G. Gerig (IKT, BIWI, ETH Zuerich), TR-197 (<>)
For Mutual Information: (Violla and Wells, this is also a reasonable reference as a discussion of an optimizer/similarity metric framework).
Nonrigid multimodality image registration" D. Mattes, D. R. Haynor, H. Vesselle, T. Lewellen and W. Eubank Medical Imaging 2001: Image Processing, 2001, pp. 1609-1620. (This is the Mutual Information metric in IPT. It avoids the need for bin selection when forming the joint histogram).

Alex Taylor
Alex Taylor on 11 Aug 2013
Hi Manu,
During the iterative solution of the registration, imregister uses bilinear optimization. If you want to change the interpolation method used to construct the final resampled image, you can call imregtform to obtain the geometric transformation estimate:
And then use imwarp to obtain the resampled registered image:
Hope that helps.
Manu on 8 Sep 2013
Edited: Manu on 8 Sep 2013
I already got the answer to my above question that I just asked from the imregtform page in the tips section:
"*Both imregtform and imregister use the same underlying registration algorithm.* imregister performs the additional step of resampling moving to produce the registered output image from the geometric transformation estimate calculated by imregtform. Use imregtform when you want access to the geometric transformation that relates moving to fixed. Use imregister when you want a registered output image."
So, because both imregister and imregtform use the same underlying algorithm, I am assuming that imregform also uses bilinear interpolation at each step. Thanks again for your help. Manu

Sign in to comment.

Seyed Mostafa Mousavi Kahaki
Hi Alex,
Kindly, I need the basic imregister and imregtform algorithms references(i mean the reference where the algorithms come from). Manu mentioned that it is based on ITK registration, if yes! which algorithm from which paper, if not, please mention the reference journal papers of the methods.
Best Regards. Kahaki.

Seyed Mostafa Mousavi Kahaki
Hi Alex,
Thank you very much for your time and effort to response the questions and finding the references. While some of the MATLAB users use it as a powerful tool in academic and research area, it is extremely important for them to refer to an academic reference or journal paper for the techniques. in my university there are several people faced to this problem which they can not find the references for the MATLAB function. We appreciate your helps in advance if you helps us to solve this.
Best Regards, Kahaki.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by