iRoCS Toolbox  1.1.0
Public Member Functions | Protected Attributes
atb::Filter< DataT, Dim, ResultT > Class Template Referenceabstract

The Filter class is the base class for all filter implementations. More...

#include "libArrayToolbox/Filter.hh"

Inheritance diagram for atb::Filter< DataT, Dim, ResultT >:
Collaboration diagram for atb::Filter< DataT, Dim, ResultT >:

Public Member Functions

 Filter (BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
 Constructor. More...
 
virtual ~Filter ()
 Destructor. More...
 
virtual void apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &result, iRoCS::ProgressReporter *pr=NULL) const =0
 Apply the filter to the given Array. More...
 
virtual void apply (Array< DataT, Dim > const &data, Array< ResultT, Dim > &result, iRoCS::ProgressReporter *pr=NULL) const
 Apply the filter to the given Array. More...
 
BoundaryTreatment< DataT, Dim > const & boundaryTreatment () const
 Get a read-only reference to the boundary treatment object associated with this filter. More...
 
void setBoundaryTreatment (BoundaryTreatmentType bt, DataT const &boundaryValue=traits< DataT >::zero)
 Change the boundary treatment type to the type specified. More...
 
void setBoundaryTreatment (BoundaryTreatment< DataT, Dim > const &bt)
 Change the boundary treatment type to the type specified. More...
 

Protected Attributes

BoundaryTreatment< DataT, Dim > * p_bt
 The boundary treatment object to use for out-of-Array access. More...
 

Detailed Description

template<typename DataT, int Dim, typename ResultT>
class atb::Filter< DataT, Dim, ResultT >

The Filter class is the base class for all filter implementations.

It is responsible for handling the boundary treatment and provides apply() methods to filter different types of Arrays.

Definition at line 55 of file Filter.hh.

Constructor & Destructor Documentation

◆ Filter()

template<typename DataT, int Dim, typename ResultT>
atb::Filter< DataT, Dim, ResultT >::Filter ( BoundaryTreatmentType  bt = ValueBT,
DataT const &  boundaryValue = traits< DataT >::zero 
)

Constructor.

Parameters
btThe boundary treatment this filter uses
boundaryValueIf bt is ValueBT, this value will be used for out-of-Array access

◆ ~Filter()

template<typename DataT, int Dim, typename ResultT>
virtual atb::Filter< DataT, Dim, ResultT >::~Filter ( )
virtual

Destructor.

Member Function Documentation

◆ boundaryTreatment()

template<typename DataT, int Dim, typename ResultT>
BoundaryTreatment<DataT,Dim> const& atb::Filter< DataT, Dim, ResultT >::boundaryTreatment ( ) const

Get a read-only reference to the boundary treatment object associated with this filter.

Returns
A reference to the associated BoundaryTreatment object

◆ setBoundaryTreatment() [1/2]

template<typename DataT, int Dim, typename ResultT>
void atb::Filter< DataT, Dim, ResultT >::setBoundaryTreatment ( BoundaryTreatmentType  bt,
DataT const &  boundaryValue = traits< DataT >::zero 
)

Change the boundary treatment type to the type specified.

Parameters
btThe boundary treatment this filter uses
boundaryValueIf bt is ValueBT, this value will be used for out-of-Array access

◆ setBoundaryTreatment() [2/2]

template<typename DataT, int Dim, typename ResultT>
void atb::Filter< DataT, Dim, ResultT >::setBoundaryTreatment ( BoundaryTreatment< DataT, Dim > const &  bt)

Change the boundary treatment type to the type specified.

Parameters
btThe boundary treatment this filter uses

◆ apply() [1/2]

template<typename DataT, int Dim, typename ResultT>
virtual void atb::Filter< DataT, Dim, ResultT >::apply ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::Array< ResultT, Dim > &  result,
iRoCS::ProgressReporter pr = NULL 
) const
pure virtual

◆ apply() [2/2]

template<typename DataT, int Dim, typename ResultT>
virtual void atb::Filter< DataT, Dim, ResultT >::apply ( Array< DataT, Dim > const &  data,
Array< ResultT, Dim > &  result,
iRoCS::ProgressReporter pr = NULL 
) const
virtual

Apply the filter to the given Array.

Parameters
dataThe Array to apply the filter to
resultThe filtering result
prIf given progress will be reported to this ProgressReporter
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

Field Documentation

◆ p_bt

template<typename DataT, int Dim, typename ResultT>
BoundaryTreatment<DataT,Dim>* atb::Filter< DataT, Dim, ResultT >::p_bt
protected

The boundary treatment object to use for out-of-Array access.

This is set during Filter object creation and can be changed by calling the setBoundaryTreatment() method. It gets destroyed, when the filter is deleted. If you delete the BoundaryTreatment object in a subclass, you must set this pointer to the NULL pointer.

Definition at line 159 of file Filter.hh.


The documentation for this class was generated from the following file: