#include <itkFiniteDifferenceImageFilter.h>
Inheritance diagram for itk::FiniteDifferenceImageFilter:
Public Types | |
typedef FiniteDifferenceImageFilter | Self |
typedef ImageToImageFilter< TInputImage, TOutputImage > | Superclass |
typedef TInputImage | InputImageType |
typedef TOutputImage | OutputImageType |
typedef TOutputImage::PixelType | PixelType |
typedef FiniteDifferenceFunction< TOutputImage > | FiniteDifferenceFunctionType |
typedef FiniteDifferenceFunctionType::TimeStepType | TimeStepType |
Public Methods | |
virtual const char * | GetClassName () const |
itkStaticConstMacro (ImageDimension, unsigned int, OutputImageType::ImageDimension) | |
virtual unsigned int | GetElapsedIterations () const |
itkGetConstReferenceObjectMacro (DifferenceFunction, FiniteDifferenceFunctionType) | |
virtual void | SetDifferenceFunction (FiniteDifferenceFunctionType *_arg) |
Protected Methods | |
FiniteDifferenceImageFilter () | |
~FiniteDifferenceImageFilter () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | AllocateUpdateBuffer ()=0 |
virtual void | ApplyUpdate (TimeStepType dt)=0 |
virtual TimeStepType | CalculateChange ()=0 |
virtual void | CopyInputToOutput () |
virtual void | GenerateData () |
virtual void | GenerateInputRequestedRegion () |
virtual bool | Halt ()=0 |
virtual void | Initialize () |
virtual void | InitializeIteration () |
virtual TimeStepType | ResolveTimeStep (const TimeStepType *list, const bool *valid, int size) |
virtual void | SetElapsedIterations (unsigned int _arg) |
virtual void | PostProcessOutput () |
The high-level algorithm implemented by the framework can be described by the following pseudocode.
WHILE NOT convergence: FOR ALL pixels i time_step = calculate_change(i) update(i, time_step)
The following equation describes update at pixel on discrete image :
Filters for different applications are created by defining a function object to handle the numerical calculations and choosing (or creating) a solver object that reflects the requirements and constraints of the application. For example, anisotropic diffusion filters are created by plugging anisotropic diffusion functions into the DenseFiniteDifferenceImageFilter. The separation between function object and solver object allows us to create, for example, sparse-field, dense-field, and narrow-band implementations of a level-set surface evolution filter can all be constructed by plugging the same function object into three different, specialized solvers.
Some simple examples are the specific subclasses of AnisotropicDiffusionImageFilter. The leaves of the anisotropic diffusion filter tree only define the function object they use for their particular flavor of diffusion. See CurvatureAnisotropicDiffusionImageFilter and GradientAnisotropicDiffusionImageFilter for details.
Note that there is no fixed container type for the buffer used to hold the update . The container might be another image, or simply a list of values. AllocateUpdateBuffer is responsible for creating the container. CalculateChange populates this buffer and ApplyUpdate adds the buffer values to the output image (solution). The boolean Halt() method returns a true value to stop iteration.
Definition at line 122 of file itkFiniteDifferenceImageFilter.h.
|
The value type of the time step. This is distinct from PixelType because PixelType may often be a vector value, while the TimeStep is a scalar value. Reimplemented in itk::BinaryMinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::DemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, itk::MinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >, and itk::DenseFiniteDifferenceImageFilter< TDeformationField, TDeformationField >. Definition at line 148 of file itkFiniteDifferenceImageFilter.h. |
|
|
|
The pixel type of the output image will be used in computations. Reimplemented in itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >, itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >, and itk::DenseFiniteDifferenceImageFilter< TDeformationField, TDeformationField >. Definition at line 143 of file itkFiniteDifferenceImageFilter.h. |
|
|
|
|
Definition at line 166 of file itkFiniteDifferenceImageFilter.h. |
|
Definition at line 167 of file itkFiniteDifferenceImageFilter.h. |
|
This method allocates a temporary update container in the subclass. Implemented in itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. |
|
This method is defined by a subclass to apply changes to the output from an update buffer and a time step value "dt".
Implemented in itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. |
|
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.
Implemented in itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. |
|
A simple method to copy the data from the input to the output. ( Supports "read-only" image adaptors in the case where the input image type converts to a different output image type. ) Reimplemented in itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, and itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. |
|
This is the default, high-level algorithm for calculating finite difference solutions. It calls virtual methods in its subclasses to implement the major steps of the algorithm. Reimplemented from itk::ImageSource< TOutputImage >. Reimplemented in itk::AntiAliasBinaryImageFilter< TInputImage, TOutputImage >, and itk::SegmentationLevelSetImageFilter< TInputImage, TOutputImage >. |
|
FiniteDifferenceImageFilter needs a larger input requested region than the output requested region. As such, we need to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model. The filter will ask for a padded region to perform its neighborhood calculations. If no such region is available, the boundaries will be handled as described in the FiniteDifferenceFunction defined by the subclass.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, and itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >. |
|
|
Get the number of elapsed iterations of the filter. Referenced by itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >::Halt(). |
|
This method returns true when the current iterative solution of the equation has met the criteria to stop solving. Defined by a subclass. Implemented in itk::AntiAliasBinaryImageFilter< TInputImage, TOutputImage >, itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, itk::SegmentationLevelSetImageFilter< TInputImage, TOutputImage >, and itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >. |
|
This method is optionally defined by a subclass and is called before the loop of iterations of calculate_change & upate. It does the global initialization, i.e. in the SparseFieldLevelSetImageFilter, initialize the list of layers. Reimplemented in itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. Definition at line 217 of file itkFiniteDifferenceImageFilter.h. |
|
This method is optionally defined by a subclass and is called immediately prior to each iterative CalculateChange-ApplyUpdate cycle. It can be used to set global variables needed for the next iteration (ie. average gradient magnitude of the image in anisotropic diffusion functions), or otherwise prepare for the next iteration. Reimplemented in itk::BinaryMinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::DemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, itk::MinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >, itk::SegmentationLevelSetImageFilter< TInputImage, TOutputImage >, and itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >. Definition at line 225 of file itkFiniteDifferenceImageFilter.h. |
|
This method returns a pointer to a FiniteDifferenceFunction object that will be used by the filter to calculate updates at image pixels.
|
|
Dimensionality of input and output data is assumed to be the same. |
|
This method is called after the solution has been generated to allow subclasses to apply some further processing to the output. Reimplemented in itk::SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >. Definition at line 249 of file itkFiniteDifferenceImageFilter.h. |
|
|
Virtual method for resolving a single time step from a set of time steps returned from processing threads.
|
|
This method sets the pointer to a FiniteDifferenceFunction object that will be used by the filter to calculate updates at image pixels.
Referenced by itk::CurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::CurvatureAnisotropicDiffusionImageFilter(), itk::GradientAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::GradientAnisotropicDiffusionImageFilter(), itk::VectorCurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::VectorCurvatureAnisotropicDiffusionImageFilter(), and itk::VectorGradientAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::VectorGradientAnisotropicDiffusionImageFilter(). |
|
Set the number of elapsed iterations of the filter. |