Extending ITK DemonsRegistration Module to Use Custom Smoothing for Displacement Field

Hello,

I’ve been working with the various Demons registration filters from SimpleITK as part of my graduate research in image registration. And I’ve been wondering if it possible to extend or change some of functionality in this library.

Specifically, I would like to experiment with using a custom smoothing operation for the displacement/update fields for some of the demons filters. Normally, a simple isotropic Gaussian kernel is used to smooth the update and displacements but I would like to use a variable-size kernel when applying the smoothing.

I’m wondering what is the best/easiest way for me to do this. Can this be done with SimpleITK (python) or should I try to make changes in ITK (with c++) and recompile it? Should I create a method in ITK fashion and somehow plug that into the smoothing component of demons?

I’d be glad for any recommendations on this.

Sincerely,
Bassam Bikdash

SimpleITK mostly contains glue code for various languages. The filters are implemented in C++, in ITK.

The easiest way to tinker with it is to make your own branch of ITK, where you only modify the thing you are experimenting with (smoothing operation for the displacement/update fields). Then compile that, and point the rest of your application to this new build of ITK.

If you think your flavor is valuable and you are ready to share this with the world, you can make your flavor conditional on some flag in the filter, and then make a PR to ITK.

2 Likes