[Insight-users] Re: Image Divergence

Luis Ibanez luis.ibanez at kitware.com
Wed, 28 Apr 2004 19:47:19 -0400


Hi Andy,

There is no specific filter at this point for computing the
divergence of a vector field.  However you could easily
create one by modifying one of the existing ITK filter.

...and of course we will be happy to get the new filter
contributed back to ITK  :-)

Here are some options:

1) Take the VectorGradientMagnitudeFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorGradientMagnitudeImageFilter.html
    and change the use for sqrt( sum squares ) by
    just the sum.

OR

2) Take the GradientRecursiveGAussian image filter
    add a Index selector plug the internal pipeline for
    computing the derivatives of one Vector component at
    a time.  Then in the post processing stage, simply
    compute the sum.


Please let us know if you need help implementing any
of these two options.


   Thanks


      Luis



----------------
Andy Eow wrote:

> Hi Luis,
>  
> I'd like to compute the divergence at every point of a 2D deformation 
> field in ITK. Is there any existing filter that is able to do this? Thanks.
>  
> Cheers,
> Andy