[Insight-users] DenseFiniteDifferenceImageFilter and Pipelines

Tom Vercauteren tom.vercauteren at m4x.org
Wed Aug 9 09:04:10 EDT 2006


Hi all,

I have been working with the finite difference solver hierarchy and
came across a problem.

In itkDenseFiniteDifferenceImageFilter.txx

The CalculateChange() function basically does the following:
   for each pixel
      m_UpdateBuffer( pixel ) = df->ComputeUpdate( pixel )
   end

The ApplyUpdate(TimeStepType dt) function basically does the following:
   for each pixel
      this->GetOutout()( pixel ) += dt * m_UpdateBuffer( pixel )
   end

These two loops are performed using iterators, which as far as I know
does not change the modification time of the images. If I am right, we
should therefore call:
- m_UpdateBuffer->Modified() at the end of CalculateChange() and
- this->GetOutout()->Modified() at the end of ApplyUpdate(TimeStepType dt)

Because of this my filters were only updated during the first
iteration. This could therefore also cause problems in other ITK
filters deriving from DenseFiniteDifferenceImageFilter (e.g.
DemonsRegistrationFilter).

I just wanted to be sure I understood things correctly before logging
it in the bug tracker.

Best regards,
Tom Vercauteren


More information about the Insight-users mailing list