ITK
4.6.0
Insight Segmentation and Registration Toolkit
|
#include <itkRecursiveGaussianImageFilter.h>
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
RecursiveGaussianImageFilter is the base class for recursive filters that approximate convolution with the Gaussian kernel. This class implements the recursive filtering method proposed by R.Deriche in IEEE-PAMI Vol.12, No.1, January 1990, pp 78-87, "Fast Algorithms for Low-Level Vision"
Details of the implementation are described in the technical report: R. Deriche, "Recursively Implementing The Gaussian and Its Derivatives", INRIA, 1993, ftp://ftp.inria.fr/INRIA/tech-reports/RR/RR-1893.ps.gz
Further improvements of the algorithm are described in: G. Farneback & C.-F. Westin, "On Implementation of Recursive Gaussian Filters", so far unpublished.
As compared to itk::DiscreteGaussianImageFilter, this filter tends to be faster for large kernels, and it can take the derivative of the blurred image in one step. Also, note that we have itk::RecursiveGaussianImageFilter::SetSigma(), but itk::DiscreteGaussianImageFilter::SetVariance().
Definition at line 62 of file itkRecursiveGaussianImageFilter.h.
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
virtual bool | GetNormalizeAcrossScale () const |
void | SetFirstOrder () |
virtual void | SetNormalizeAcrossScale (bool _arg) |
void | SetSecondOrder () |
void | SetZeroOrder () |
virtual ScalarRealType | GetSigma () const |
virtual void | SetSigma (ScalarRealType _arg) |
virtual void | SetOrder (OrderEnumType _arg) |
virtual OrderEnumType | GetOrder () const |
Public Member Functions inherited from itk::RecursiveSeparableImageFilter< TInputImage, TOutputImage > | |
virtual unsigned int | GetDirection () const |
const TInputImage * | GetInputImage (void) |
virtual void | SetDirection (unsigned int _arg) |
void | SetInputImage (const TInputImage *) |
Public Member Functions inherited from itk::InPlaceImageFilter< TInputImage, TOutputImage > | |
virtual bool | CanRunInPlace () const |
virtual void | SetInPlace (bool _arg) |
virtual bool | GetInPlace () const |
virtual void | InPlaceOn () |
virtual void | InPlaceOff () |
Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
const InputImageType * | GetInput (void) const |
const InputImageType * | GetInput (unsigned int idx) const |
virtual void | PopBackInput () |
virtual void | PopFrontInput () |
virtual void | PushBackInput (const InputImageType *image) |
virtual void | PushFrontInput (const InputImageType *image) |
virtual void | SetInput (const InputImageType *image) |
virtual void | SetInput (unsigned int, const TInputImage *image) |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
Public Member Functions inherited from itk::ImageSource< TOutputImage > | |
OutputImageType * | GetOutput (unsigned int idx) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *output) |
virtual void | GraftOutput (DataObject *output) |
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *output) |
OutputImageType * | GetOutput (void) |
const OutputImageType * | GetOutput (void) const |
virtual ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) ITK_OVERRIDE |
Public Member Functions inherited from itk::ProcessObject | |
virtual void | AbortGenerateDataOff () |
virtual void | AbortGenerateDataOn () |
virtual const bool & | GetAbortGenerateData () const |
NameArray | GetInputNames () const |
MultiThreader * | GetMultiThreader () const |
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
NameArray | GetOutputNames () const |
virtual const float & | GetProgress () const |
NameArray | GetRequiredInputNames () const |
bool | HasInput (const DataObjectIdentifierType &key) const |
bool | HasOutput (const DataObjectIdentifierType &key) const |
virtual DataObjectPointer | MakeOutput (const DataObjectIdentifierType &) |
virtual void | PrepareOutputs () |
virtual void | PropagateRequestedRegion (DataObject *output) |
virtual void | ResetPipeline () |
virtual void | SetAbortGenerateData (bool _arg) |
virtual void | Update () |
virtual void | UpdateLargestPossibleRegion () |
virtual void | UpdateOutputData (DataObject *output) |
virtual void | UpdateOutputInformation () |
void | UpdateProgress (float progress) |
DataObjectPointerArray | GetInputs () |
DataObjectPointerArray | GetOutputs () |
DataObjectPointerArray | GetIndexedInputs () |
DataObjectPointerArray | GetIndexedOutputs () |
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
void | SetProgress (float progress) |
virtual void | SetReleaseDataFlag (bool flag) |
virtual bool | GetReleaseDataFlag () const |
void | ReleaseDataFlagOn () |
void | ReleaseDataFlagOff () |
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
virtual void | ReleaseDataBeforeUpdateFlagOn () |
virtual void | ReleaseDataBeforeUpdateFlagOff () |
virtual void | SetNumberOfThreads (ThreadIdType _arg) |
virtual const ThreadIdType & | GetNumberOfThreads () const |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) const |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary (void) |
const MetaDataDictionary & | GetMetaDataDictionary (void) const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
virtual void | Register () const ITK_OVERRIDE |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) ITK_OVERRIDE |
virtual void | UnRegister () const ITK_OVERRIDE |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkCloneMacro (Self) | |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Private Member Functions | |
void | ComputeDCoefficients (ScalarRealType sigmad, ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2, ScalarRealType &SD, ScalarRealType &DD, ScalarRealType &ED) |
void | ComputeNCoefficients (ScalarRealType sigmad, ScalarRealType A1, ScalarRealType B1, ScalarRealType W1, ScalarRealType L1, ScalarRealType A2, ScalarRealType B2, ScalarRealType W2, ScalarRealType L2, ScalarRealType &N0, ScalarRealType &N1, ScalarRealType &N2, ScalarRealType &N3, ScalarRealType &SN, ScalarRealType &DN, ScalarRealType &EN) |
void | ComputeRemainingCoefficients (bool symmetric) |
void | operator= (const Self &) |
RecursiveGaussianImageFilter (const Self &) | |
Private Attributes | |
bool | m_NormalizeAcrossScale |
OrderEnumType | m_Order |
ScalarRealType | m_Sigma |
typedef SmartPointer< const Self > itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 70 of file itkRecursiveGaussianImageFilter.h.
typedef TOutputImage itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::OutputImageType |
Type of the output image
Definition at line 95 of file itkRecursiveGaussianImageFilter.h.
typedef SmartPointer< Self > itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 69 of file itkRecursiveGaussianImageFilter.h.
typedef Superclass::RealType itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::RealType |
Definition at line 72 of file itkRecursiveGaussianImageFilter.h.
typedef Superclass::ScalarRealType itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::ScalarRealType |
Definition at line 73 of file itkRecursiveGaussianImageFilter.h.
typedef RecursiveGaussianImageFilter itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Definition at line 67 of file itkRecursiveGaussianImageFilter.h.
typedef RecursiveSeparableImageFilter< TInputImage, TOutputImage > itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 68 of file itkRecursiveGaussianImageFilter.h.
enum itk::RecursiveGaussianImageFilter::OrderEnumType |
Enum type that indicates if the filter applies the equivalent operation of convolving with a gaussian, first derivative of a gaussian or the second derivative of a gaussian.
Enumerator | |
---|---|
ZeroOrder | |
FirstOrder | |
SecondOrder |
Definition at line 92 of file itkRecursiveGaussianImageFilter.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 160 of file itkRecursiveGaussianImageFilter.h.
|
private |
|
private |
Compute the D coefficients in the recursive filter.
|
private |
Compute the N coefficients in the recursive filter.
|
private |
Compute the M coefficients and the boundary coefficients in the recursive filter.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
virtual |
Type macro that defines a name for this class
Reimplemented from itk::RecursiveSeparableImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
Set/Get the Order of the Gaussian to convolve with.
|
virtual |
Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.
|
static |
Method for creation through the object factory.
|
private |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::RecursiveSeparableImageFilter< TInputImage, TOutputImage >.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetFirstOrder | ( | ) |
Explicitly set a first order derivative.
|
virtual |
Set/Get the flag for normalizing the gaussian over scale-space.
This flag enables the analysis of the differential shape of features independent of their size ( both pixels and physical size ). Following the notation of Tony Lindeberg:
Let
be the scale-space representation of image
where
is the Gaussian function and
denotes convolution. This is a change from above with
.
Then the normalized derivative operator for normalized coordinates across scale is:
The resulting scaling factor is
where N is the order of the derivative.
When this flag is ON the filter will be normalized in such a way that the values of derivatives are not biased by the size of the object. That is to say the maximum value a feature reaches across scale is independent of the scale of the object.
For analyzing an image across scale-space you want to enable this flag. It is disabled by default.
|
virtual |
Set/Get the Order of the Gaussian to convolve with.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetSecondOrder | ( | ) |
Explicitly set a second order derivative.
|
virtual |
Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.
|
protectedvirtual |
Set up the coefficients of the filter to approximate a specific kernel. Here it is used to approximate a Gaussian or one of its derivatives. Parameter is the spacing along the dimension to filter.
Implements itk::RecursiveSeparableImageFilter< TInputImage, TOutputImage >.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetZeroOrder | ( | ) |
Explicitly set a zeroth order derivative.
|
protectedvirtual |
Verifies that the process object has been configured correctly, that all required inputs are set, and needed parameters are set appropriately. If not valid an exceptions will be thrown.
This method is called before UpdateOutputInformation is propagated to the inputs.
The ProcessObject's implementation verifies that the NumberOfRequiredInputs are set and not null.
Reimplemented from itk::ProcessObject.
|
private |
Normalize the image across scale space
Definition at line 198 of file itkRecursiveGaussianImageFilter.h.
|
private |
Definition at line 200 of file itkRecursiveGaussianImageFilter.h.
|
private |
Sigma of the gaussian kernel.
Definition at line 195 of file itkRecursiveGaussianImageFilter.h.