[Insight-users] Divergence of an image

Karthik Krishnan karthik.krishnan at kitware.com
Sun Mar 29 19:48:25 EDT 2009


Try subclassing itk::ImageFunction and write a function to compute the
divergence at a given voxel. It should be relatively staightforward. If you
use VTK, you can use the class vtkImageDivergence to accomplish this.

That said, you seem to be taking the divergence of the gradient, which is
nothing but the laplacian. There is a class in ITK to compute the laplacian
directly : itk::LaplacianImageFilter. You method seems a little convoluted.


-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 881 4919
Fax: 518 371 4573


On Sun, Mar 29, 2009 at 4:20 PM, A.Burak Yoldemir <yoldemir at gmail.com>wrote:

> Hello all,
>
> I am currently trying to simulate linear isotropic diffusion, which
> requires taking the divergence of the gradient of an image. To compute the
> gradient, I used the GradientRecursiveGaussianImageFilter and separated the
> covariant vectors in different directions using
> VectorIndexSelectionCastImageFilter. Now, I need to take the divergence of
> the resulting vector field, however I could not find a way to accomplish
> this. I have seen that it was formerly suggested to modify
> VectorGradientMagnitudeFilter but I could not find out how to do that. Can
> anyone provide me some pointers?
>
> Thanks in advance,
>
> Ahmet Burak Yoldemir
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090329/fd656410/attachment.htm>


More information about the Insight-users mailing list