[Insight-users] how can I make modification to a filter already exists in ITK?

Luis Ibanez luis.ibanez at kitware.com
Thu Jul 1 15:57:59 EDT 2004


Hi Gourong,

The easy way to create variants of the Demons deformable
registration algortihm is to create two new classes based
on:

 Insight/Code/Algorithms/
               itkDemonsRegistrationFilter
               itkDemonsRegistrationFunction

You should probably start by copying and renaming the files
of these classes in order to have somethinng like

          itkNonUniformDemonsRegistrationFilter
          itkNonUniformDemonsRegistrationFunction

Note that most of ITK is using C++ templates, so you dont
really need to rebuilg anything, except your own project.

You *must* write a test for this class however. For that,
you can follow the example of the test in

   Insight/Testing/Code/Algorithms/
                   itkDemonsRegistrationFilterTest.cxx

and of course rename it as

        itkNonUniformDemonsRegistrationFilterTest.cxx


We will be happy to add your new class to the toolkit
if you are willing to share it with the ITK community.


You are also encouraged to consider writing a description
of your filter as a paper for the INSIGHT JOURNAL.


Please let us know if you need any help,


    Thanks



       Luis



----------------
Guorong Wu wrote:

> hello everyone:
>       I am planing to make some improvent to demons algorithms[Thirion 98](Registration/DeformableRegistration2.cxx). Demons algorithm may cause non-uniform deformation field which will oversmooth at the rigion of lower contrast. My modification includes: 1. control the force field smoothing according to gradients by add a weight at each iteration; 2. prevent oversmoothing the deformation field at lower contrast region with statistical model at each iteration.
>       So I want write a new filter named ModifiedDemonsRegistrationFilter. I refer to charpter 13 in ITKSoftwareGuide but not quite clear about how to do. Since I only want to make some modification of force field and deformation field which could be computered with original DemonsRegistrationFilter at each iteration, Should I override PDEDeformableRegistrationFilter and DemonsRegistrationFunction and make modification there? And another question, Assuming I have writen the filter, for example, ModifiedDemonsRegistrationFilter.cxx, Should I rebuild ITK to make it work or simply put it at my personal directory? Thanks. Hoping for your reply. 
>         		
> 
>         Guorong Wu
>         grwu at sjtu.edu.cn
>           2004-07-01
> 
> =============================================================
> Guorong Wu	
> The Department of Computer Science and Technology
> Shanghai Jiao Tong University
> 1954 Huashan RD
> Shanghai China    
> 200030
> Tel:  +86 21 3226 1236  , 6293 2089
> =============================================================
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list