[Insight-users] Implementations of CalculateChange() and ApplyUpdate()

Bing Jian bjian at cise.ufl.edu
Sun Aug 15 13:47:21 EDT 2004


Hi Luis,

    Thank you for pointing out this.  Actually I remembered that I  
examined DenseFiniteDifferenceImageFilter
before and did not find the implementations of CalculateChange() and 
ApplyUpdate().  I am not very sure
because I updated my cvs check out last night before getting your 
reply.  Now the time stamp of 
itkDenseFiniteDifferenceImageFilter.h  is :

  Date:      $Date: 2004/02/20 19:55:47 $
  Version:   $Revision: 1.27 $

and I can find the implementations of those 2 member functions here.

But according to the
http://www.itk.org/Doxygen16/html/classitk_1_1DenseFiniteDifferenceImageFilter-members.html
which I checked last night, there is no CalculateChange() and 
ApplyUpdate() in its complete list of members

Seems next time I need to always use the 
http://www.itk.org/Doxygen/html/index.html for reference. :-)
And just want to know in the previous version, where are the 
implementations of  CalculateChange() and ApplyUpdate().
when they are not in DenseFiniteDifferenceImageFilter. Just curious 
about that.
.

Luis Ibanez wrote:

>
> Hi Bing,
>
>
> You missed the itkDenseFiniteDifferenceImageFilter class
> in the hierarchy of the itkAnisotropicDiffusionImageFilter.
>
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1DenseFiniteDifferenceImageFilter.html 
>
>
> This class implements the CalculateChange() method.
>
>
> If you look at the .h header file of the itkAnisotropic
> DiffusionImageFilter or consult its Doxygen documentation
>
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html 
>
>
>
> You will notice that the hierarchy is:
>
>
>     itkFiniteDifferenceImageFilter
>                   |
>                   |
>   itkDenseFiniteDifferenceImageFilter
>                   |
>                   |
>    itkAnisotropicDiffusionImageFilter
>
>
>
>
>
>   Regards,
>
>
>
>      Luis
>
>
>
> ---------------------------
> Bing Jian wrote:
>
>> Hi, there,
>>
>>    I am reading the source code of AnisotropicDiffusionImageFilter
>> but feel very confused on one thing.
>>
>>    In the GenerateData() of its superclass FiniteDifferenceImageFilter,
>> I see following code in itkFiniteDifferenceImageFilter.txx:
>>      ...
>>      dt = this->CalculateChange();
>>     this->ApplyUpdate(dt);
>>      ...
>>
>> and the definitions of CalculateChange() and ApplyUpdate() in
>> itkFiniteDifferenceImageFilter.h
>>
>>   /** This method is defined by a subclass to apply changes to the
>> output
>>    * from an update buffer and a time step value "dt".
>>    * \param dt Time step value. */
>>   virtual void ApplyUpdate(TimeStepType dt) = 0;
>>
>>   /** This method is defined by a subclass to populate an update
>> buffer
>>    * with changes for the pixels in the output.  It returns a time
>>    * step value to be used for the update.
>>    * \returns A time step to use in updating the output with the
>> changes
>>    * calculated from this method. */
>>   virtual TimeStepType CalculateChange() = 0;
>>
>>
>>  Obviously, these two member functions are declared here as pure
>> virtual functions and are supposed to be implemented in a subclass.
>> But I feel surprised because I can not find the corresponding
>> implementations in all of its children AnisotropicDiffusionImageFilter,
>> GradientAnisotropic and CurvatureAnisotropic. So strange!
>>
>> Also from online documentation for FiniteDifferenceImageFilter,
>> http://www.itk.org/Doxygen14/html/classitk_1_1FiniteDifferenceImageFilter.html#b4 
>>
>>
>>   template<class TInputImage, class TOutputImage>
>> virtual void itk::FiniteDifferenceImageFilter< TInputImage,
>> TOutputImage >::ApplyUpdate     (      TimeStepType      dt      )
>> [protected, pure virtual]
>>
>>
>> This method is defined by a subclass to apply changes to the output
>> from an update buffer and a time step value "dt".
>>
>> Parameters:
>>         dt     Time step value.
>>
>> Implemented in itk::ParallelSparseFieldLevelSetImageFilter<
>> TInputImage, TOutputImage >, itk::SparseFieldLevelSetImageFilter<
>> TInputImage, TOutputImage >, itk::FiniteDifferenceSparseImageFilter<
>> TInputImageType, TSparseOutputImageType >,
>> itk::SparseFieldLevelSetImageFilter< TInputImage, Image<
>> TOutputPixelType,::itk::GetImageDimension< TInputImage
>>
>>> ::ImageDimension > >, and itk::FiniteDifferenceSparseImageFilter<
>>
>>
>> TInputImage, TSparseOutputImage >.
>>
>>
>> No AnisotropicDiffusionFilter appears in above list. That makes me
>> really confused. Am I missing something?
>>
>> Many thanks in advance!
>>
>
>
>
>


-- 
Best wishes,
Bing Jian
bjian at cise.ufl.edu




More information about the Insight-users mailing list