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

The SeparableFilter class specifies methods a separable filter provides additionally to the filter methods defined in Filter. More...

#include "libArrayToolbox/SeparableFilter.hh"

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

Public Member Functions

 SeparableFilter (BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
 Constructor. More...
 
virtual ~SeparableFilter ()
 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...
 
virtual void applyAlongDim (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &result, int dim, iRoCS::ProgressReporter *pr=NULL) const =0
 Apply the filter along the specified dimension. More...
 
virtual void applyAlongDim (Array< DataT, Dim > const &data, Array< ResultT, Dim > &result, int dim, iRoCS::ProgressReporter *pr=NULL) const
 Apply the filter along the specified dimension. 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::SeparableFilter< DataT, Dim, ResultT >

The SeparableFilter class specifies methods a separable filter provides additionally to the filter methods defined in Filter.

See also
Filter

Definition at line 53 of file SeparableFilter.hh.

Constructor & Destructor Documentation

◆ SeparableFilter()

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

Constructor.

Parameters
btTypeDefines the border treatment of this filter. The following border treatments are available: ValueBT, RepeatBT, MirrorBT, CyclicBT, CropBT
boundaryValueThe value to use for out-of-Array positions if the btType is ValueBT

◆ ~SeparableFilter()

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

Destructor.

Member Function Documentation

◆ applyAlongDim() [1/2]

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

Apply the filter along the specified dimension.

Parameters
dataThe data Array to filter
elementSizeUmThe data voxel extents in micrometers
resultThe filter result
dimThe dimension along which to apply the filter
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

Implemented in atb::CentralHessianUTFilter< DataT, Dim >, atb::DericheFilter< DataT, Dim >, atb::SeparableConvolutionFilter< DataT, Dim >, atb::LocalSumFilter< DataT, Dim >, atb::CentralHessianFilter< DataT, Dim >, atb::SeparableCorrelationFilter< DataT, Dim >, and atb::CentralGradientFilter< DataT, Dim >.

◆ applyAlongDim() [2/2]

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

Apply the filter along the specified dimension.

Parameters
dataThe data Array to filter
resultThe filter result
dimThe dimension along which to apply the filter
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

◆ boundaryTreatment()

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

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 
)
inherited

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)
inherited

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 virtualinherited

◆ 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
virtualinherited

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
protectedinherited

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: