[Insight-users] use itkFiniteDifferenceImageFilter

elhadj meljane elhadj.meljane at gmail.com
Sun May 2 20:37:40 EDT 2010


Hi Luis,
thanks for your answer. I'm implementing a level set filter that involves to
iterate with a process f_{n+1}=f_n+dt*A_n, but I want to understand how the
itk FiniteDifference works for any problem.  In the curvature example, If I
understand the term f_n+dt*A_n will be computed in

http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html


by
DenseFiniteDifferenceImageFilter::ApplyUpdate(TimeStepType dt)
{
  // Set up for multithreaded processing.
  DenseFDThreadStruct str;
  str.Filter = this;
  str.TimeStep = dt;
  this->GetMultiThreader()->SetNumberOfThreads(this->GetNumberOfThreads());

this->GetMultiThreader()->SetSingleMethod(this->ApplyUpdateThreaderCallback,
                                            &str);
  // Multithread the execution
  this->GetMultiThreader()->SingleMethodExecute();
  // Explicitely call Modified on GetOutput here
  // since ThreadedApplyUpdate changes this buffer
  // through iterators which do not increment the
  // output timestamp
  this->GetOutput()->Modified();
}
is the

 this->ApplyUpdate(dt); // FiniteDifferenceImageFilter<TInputImage,
TOutputImage>::GenerateData()

that will generate an approximation at iteration n of f_n

Thanks,

On Mon, May 3, 2010 at 1:17 AM, Luis Ibanez <luis.ibanez at kitware.com> wrote:

> Hi Elhadj,
>
> The FiniteDifferenceImageFilter is designed as a base class:
>
>
> http://www.itk.org/Doxygen/html/classitk_1_1FiniteDifferenceImageFilter.html
>
> You should create a new filter that derives from it and in that
> derived class you can re-implement several of its methods.
>
> See for example, its derived class:
>
>
> http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html
>
> that in turn, is derived into:
>
> http://www.itk.org/Doxygen/html/classitk_1_1CurvatureFlowImageFilter.html
>
> Other examples are:
>
>
> http://www.itk.org/Doxygen/html/classitk_1_1GradientAnisotropicDiffusionImageFilter.html
>
> http://www.itk.org/Doxygen/html/classitk_1_1MinMaxCurvatureFlowImageFilter.html
>
> http://www.itk.org/Doxygen/html/classitk_1_1VectorGradientAnisotropicDiffusionImageFilter.html
>
> http://www.itk.org/Doxygen/html/classitk_1_1VectorCurvatureAnisotropicDiffusionImageFilter.html
>
>
> Could you describe the type of Finite Differences
> processing that you are trying to implement ?
>
> It is likely that there are more specific image filters
> already in ITK from which you could start your
> implementation.
>
>
>     Please let us know,
>
>
>          Thanks
>
>
>               Luis
>
>
>
> -----------------------------------------------------------------------------
> On Sun, May 2, 2010 at 5:39 PM, elhadj meljane <elhadj.meljane at gmail.com>
> wrote:
> > Hi all,
> > I try to use  itkFiniteDifferenceImageFilter to iterate with
> > f_{n+1} = f_n +dt*A_n
> > and I don't know how to introduce the A_n in this filter, I guess is done
> in
> > the filter with ?
> > FiniteDifferenceImageFilter<..>::GenerateData()
> > {
> > ...
> > this->ApplyUpdate()
> > ...
> > }
> >
> > is there an itk simple example of an implemntation of the ApplyUpdate()
> and
> > how to use it to iterate with this filter.
> >
> > Thanks,
> > Elhadj,
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.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/20100503/ee27ebea/attachment.htm>


More information about the Insight-users mailing list