[Insight-users] Re: Jacobian determinant image of the deformation field

Mathieu De Craene decraene at tele.ucl.ac.be
Wed Jul 11 13:46:04 EDT 2007


On Wed, 2007-07-11 at 12:07 -0400, Luis Ibanez wrote:
> Hi Mathieu, Tom,
> 
> Thanks a lot for pointing out this problem.
> 
> We are trying to figure out what is the best way to fix this issue.
> 
> 
> 
> There seems to be three issues here:
> 
> 
> 1) Mismatch documentation between the filter
>     and its actual computation
> 
> 2) Whether the filter is intended for
> 
>     Deformation field versus Transformation
> 
>     Deformation field will have zeros for an identity transformation
>     while the Transformation will have an identity matrix.
> 
> 3) Misnaming of the filter.
> 
> 
> ---
> 
> About (1), we should just remove the comment about adding 1.0
> to the output, since it is not really equivalent to adding
> the Identity matrix to the Jacobian before computing the
> determinant.
> 
>  From Tom comment, it seems that the filter name is actually
> correct, so (3) may not be an issue.
> 
> The filter is indeed intended for a Deformation field and
> not for a transformation. This seems to be clear in the
> documentation.
> 
> 
> However, an additional filter is needed where an Identity
> matrix is added to the Jacobian before computing the
> determinant.
> 
> We could factorize the common code of both filters, and
> only have to overload the method:
> 
> 
>         EvaluateAtNeighborhood()
> 
> 
> So, here are the proposed action items:
> 
> 
> 1) Create a base class X with the current code of the
>     DeformationFieldJacobianDeterminantFilter.
> 
> 2) Add a class WarpJacobianDeterminantFilter that derives
>     from X, and overload  EvaluateAtNeighborhood().
> 
> 3) Make DeformationFieldJacobianDeterminantFilter derive
>     from X too and overload EvaluateAtNeighborhood().
> 
> 4) Remove the comment about adding 1.0 from the documentation
>     of the DeformationFieldJacobianDeterminantFilter.
> 
> 
> If that make sense we can log this as a feature request/bug fix
> in the phpBugTracker.
> 
> 



Hi Luis.


This plan is really rigorous but adds a lot of classes to the toolkit.
What about the dirty solution of having a flag called

        m_ComputeTransformationJacobian


that when set to "on" would add 1. on the diagonal of the jacobian
matrix and when set to "off" (value by default), would not affect the
behavior of the class.



Math

> 
>    Please let us know what you think,
> 
> 
> 
>       Thanks
> 
> 
> 
>           Luis
> 
> 
> ----------------------
> Tom Vercauteren wrote:
> > Hi Mathieu,
> > 
> > Just my two cents about it. I do agree with you that the current
> > implementation is not computing a really meaningful quantity. However,
> > the current name is misleading. Without adding an Id matrix, it
> > actually computes the Jacobian of the deformation field, but what we
> > usually need is the Jacobian of the spatial transformation... In my
> > code, I have added an itk::WarpJacobianDeterminantFilter to make
> > things a bit clearer.
> > 
> > Best,
> > Tom
> > 
> > On 9/6/07, Mathieu De Craene <decraene at tele.ucl.ac.be> wrote:
> > 
> > Hi ITK folks,
> > 
> > 
> > I found this email on the mailing list
> > 
> >        
> > http://public.kitware.com/pipermail/insight-users/2006-August/019246.html
> > 
> > and I think these two users are right.
> > 
> > I was wondering if we shouldn't add the following line at line 250 of
> > itkDeformationFieldJacobianDeterminantFilter.h to correct the problem
> > 
> >        if (i == j) J[i][j] += 1.;
> > 
> > 
> > so that we effectively compute
> > 
> > 
> >        det[ dT/dx ] = det[ I + du/dx ]
> > 
> > 
> > 
> > Thanks for any comment,
> > 
> > 
> > 
> > Mathieu
> > _______________________________________________
> > 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