<div>Hi Luis, </div>
<div>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 </div>
<div> </div>
<div><a href="http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html</a></div>
<div> </div>
<div> </div>
<div>by </div>
<div>DenseFiniteDifferenceImageFilter::ApplyUpdate(TimeStepType dt)<br>{<br> // Set up for multithreaded processing.<br> DenseFDThreadStruct str;<br> str.Filter = this;<br> str.TimeStep = dt;<br> this->GetMultiThreader()->SetNumberOfThreads(this->GetNumberOfThreads());<br>
this->GetMultiThreader()->SetSingleMethod(this->ApplyUpdateThreaderCallback,<br> &str);<br> // Multithread the execution<br> this->GetMultiThreader()->SingleMethodExecute();</div>
<div> // Explicitely call Modified on GetOutput here<br> // since ThreadedApplyUpdate changes this buffer<br> // through iterators which do not increment the<br> // output timestamp<br> this->GetOutput()->Modified();<br>
}<br></div>
<div>is the </div>
<div> </div>
<div> this->ApplyUpdate(dt); // FiniteDifferenceImageFilter<TInputImage, TOutputImage>::GenerateData()</div>
<div> </div>
<div>that will generate an approximation at iteration n of f_n</div>
<div><br>Thanks, <br><br></div>
<div class="gmail_quote">On Mon, May 3, 2010 at 1:17 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi Elhadj,<br><br>The FiniteDifferenceImageFilter is designed as a base class:<br><br><a href="http://www.itk.org/Doxygen/html/classitk_1_1FiniteDifferenceImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1FiniteDifferenceImageFilter.html</a><br>
<br>You should create a new filter that derives from it and in that<br>derived class you can re-implement several of its methods.<br><br>See for example, its derived class:<br><br><a href="http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html</a><br>
<br>that in turn, is derived into:<br><br><a href="http://www.itk.org/Doxygen/html/classitk_1_1CurvatureFlowImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1CurvatureFlowImageFilter.html</a><br>
<br>Other examples are:<br><br><a href="http://www.itk.org/Doxygen/html/classitk_1_1GradientAnisotropicDiffusionImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1GradientAnisotropicDiffusionImageFilter.html</a><br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1MinMaxCurvatureFlowImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1MinMaxCurvatureFlowImageFilter.html</a><br><a href="http://www.itk.org/Doxygen/html/classitk_1_1VectorGradientAnisotropicDiffusionImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1VectorGradientAnisotropicDiffusionImageFilter.html</a><br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1VectorCurvatureAnisotropicDiffusionImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1VectorCurvatureAnisotropicDiffusionImageFilter.html</a><br>
<br><br>Could you describe the type of Finite Differences<br>processing that you are trying to implement ?<br><br>It is likely that there are more specific image filters<br>already in ITK from which you could start your<br>
implementation.<br><br><br> Please let us know,<br><br><br> Thanks<br><br><br> Luis<br><br><br>-----------------------------------------------------------------------------<br>On Sun, May 2, 2010 at 5:39 PM, elhadj meljane <<a href="mailto:elhadj.meljane@gmail.com">elhadj.meljane@gmail.com</a>> wrote:<br>
> Hi all,<br>> I try to use itkFiniteDifferenceImageFilter to iterate with<br>> f_{n+1} = f_n +dt*A_n<br>> and I don't know how to introduce the A_n in this filter, I guess is done in<br>> the filter with ?<br>
> FiniteDifferenceImageFilter<..>::GenerateData()<br>> {<br>> ...<br>> this->ApplyUpdate()<br>> ...<br>> }<br>><br>> is there an itk simple example of an implemntation of the ApplyUpdate() and<br>
> how to use it to iterate with this filter.<br>><br>> Thanks,<br>> Elhadj,<br>> _____________________________________<br>> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
><br>> Visit other Kitware open-source projects at<br>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>><br>> Please keep messages on-topic and check the ITK FAQ at:<br>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>><br>><br></blockquote>
</div><br>