[Insight-users] DenseFiniteDifferenceImageFilter and Pipelines

Luis Ibanez luis.ibanez at kitware.com
Wed Aug 9 19:50:53 EDT 2006


Hi Tom,

Your filter should only call image->Modifed() at the end of
the GenerateData() method or the ThreadedGenerateData() method.

Note that in practice you don't need to do this, because the
pipeline will take care of updating the modified time of the
data objects produced as outputs of your filters.

It is not clear from your email what you mean by:

    "my filters were only updated
     during the first iteration."


Normally your filter will run for N iterations until
reaching convergence or exhausting the allocated maximum
number of iterations. At that point, it will allow the next
filter in the pipeline to be executed.

This is done for you int the method:

    UpdateOutputInformation()

in

    Insight/Code/Common/itkProcessObject.cxx

in lines 668-762



    Regards,



       Luis




-----------------------
Tom Vercauteren wrote:
> 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
> _______________________________________________
> 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