[Insight-users] Re: about deformation field : Computing the Jacobian of a Deformation Field.

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 20 14:01:07 EDT 2004


Hi Jesse,


Almost all ITK filters are implemented as Templates.

Therefore their code is in files .h and .txx.

You don't compile the filter themselves. Instead, you
instantiate the filter type in your own code writen
in a .cxx file, and compile your own program.



Please read the Tutorials

     http://www.itk.org/HTML/Tutorials.htm

In particular

http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf

and

http://www.itk.org/CourseWare/Training/GettingStarted-III.pdf

That will save you a lot of time.



You should also read the Filtering Chapter of
the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf




   Regards,


      Luis



----------------
Jesse wrote:
> Hi Luis,
>  
> In fact, what i want to get is Determinant of the Jacobian Matrix, now I 
> want to complie and run VectorGradientMagnitudeImageFilter  , then 
> modify it for Jacobian of the deformation field , but I have a questions
>  
> I can complie VectorGradientAnisotropicDiffusionImageFilter and it runs 
> suceessfully, but VectorGradientMagnitudeImageFilter is in 
> code/BasicFilters not /example, I can't find a cxx file, how to complie 
> it, need I write a .cxx?
>  
> Thanks
>  
> Jesse
> 
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     Hi Jesse,
> 
> 
>     There is not a current filter in ITK that will compute the Jacobian
>     of a deformation field. However, you can create such a filter by
>     using the itkVectorGradientMagnitudeImageFilter as a starting point.
> 
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorGradientMagnitudeImageFilter.html
> 
> 
>     If you take the files
> 
>     Insight/Code/BasicFilters/itkVectorGradientMagnitudeImageFilter.h
>     Insight/Code/BasicFilters/itkVectorGradientMagnitudeImageFilter.txx
> 
>     rename them, and rename the class inside,
> 
>     and then modify the method
> 
>     EvaluateAtNeighborhood3D()
> 
>     that is defined in the header file, in order to return a Matrix instead
>     of a Scalar value, you can simply take the directional derivative values
>     of the vector components as they are computed in lines 311-316.
> 
> 
>     BTW, Do you want the "Jacobia! n Matrix" ?
>     or Do you want the "Determinant of the Jacobian Matrix" ?
> 
>     Unfortunately it is common to misuse the term "Jacobian"....
> 
>     If what you want is the determinant... well, you can keep
>     this method returning a scalar, and just need to invoke
>     the VNL determinant computation.
> 
> 
> 
>     Please let us know if you find any problems by implementing
>     this code.
> 
> 
>     Thanks
> 
> 
> 
>     Luis
> 
> 
>     ---------------------------
>     Jesse wrote:
> 
>      > Hi Luis
>      >
>      >
>      >
>      > I¡¯m using deformation registration on my datasets, Now I want to
>     get
>      > the Jacobian of the deformation field,
>      >
>      > SPM can do it well. but I¡¯m not sure if itk can do this too?
>      >
>      > Thanks
>      >
>      >
>      >
>      > Jesse
>      >
>      >
>     ------------------------------------------------------------------------
>      > Do you Yahoo!?
>      > vote.yahoo.com - Register online to vote today!
> 
> 
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 






More information about the Insight-users mailing list