iRoCS Toolbox
1.1.0
|
The DericheFilter class implements the Deriche filter, which approximates a Gaussian filter using a recursive formulation. More...
#include "libArrayToolbox/DericheFilter.hh"
Public Types | |
typedef DataT | ResultT |
Public Member Functions | |
DericheFilter (BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Constructor. More... | |
DericheFilter (blitz::TinyVector< double, Dim > const &sigmaUm, BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Constructor. More... | |
virtual | ~DericheFilter () |
Destructor. More... | |
virtual void | apply (Array< DataT, Dim > const &data, Array< DataT, Dim > &result, iRoCS::ProgressReporter *pr=NULL) const |
Apply the filter to the given Array. More... | |
void | apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, iRoCS::ProgressReporter *pr=NULL) const |
Application of the Deriche filter onto the data Array using the standard deviations passed to the filter object. More... | |
virtual void | applyAlongDim (Array< DataT, Dim > const &data, Array< DataT, Dim > &result, int dim, iRoCS::ProgressReporter *pr=NULL) const |
Apply the filter along the specified dimension. More... | |
void | applyAlongDim (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, int dim, iRoCS::ProgressReporter *pr=NULL) const |
Application of the Deriche filter onto the data Array 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... | |
void | setSigmaUm (blitz::TinyVector< double, Dim > const &sigmaUm) |
Set the standard deviations of the Deriche filter. More... | |
void | setSigmaUmInDim (int dim, double sigmaUm) |
Set the standard deviation of the Deriche filter along the given dimension. More... | |
blitz::TinyVector< double, Dim > const & | sigmaUm () const |
Get the standard deviations of the Deriche filter. More... | |
double | sigmaUmInDim (int dim) const |
Get the standard deviation of the Deriche filter along the given dimension. More... | |
Static Public Member Functions | |
static void | DericheFilter (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, blitz::TinyVector< double, Dim > const &sigmaUm, BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero, iRoCS::ProgressReporter *pr=NULL) |
Application of the Deriche filter onto the data Array using the standard deviations passed. More... | |
static void | DericheFilter (Array< DataT, Dim > const &data, Array< DataT, Dim > &filtered, blitz::TinyVector< double, Dim > const &sigmaUm, BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero, iRoCS::ProgressReporter *pr=NULL) |
Application of the Deriche filter onto the data Array using the standard deviations passed. More... | |
Protected Attributes | |
BoundaryTreatment< DataT, Dim > * | p_bt |
The boundary treatment object to use for out-of-Array access. More... | |
The DericheFilter class implements the Deriche filter, which approximates a Gaussian filter using a recursive formulation.
The filter runs in , where
is the number of Array elements compared to
for a full Gaussian convolution, where
is the kernel size. Beware of the fact, that the approximation is not good enough to give rotation invariant filter responses.
Let and
be a line of an Array to be filtered, then the recursive filter is defined by
where
and
Definition at line 74 of file DericheFilter.hh.
typedef DataT atb::DericheFilter< DataT, Dim >::ResultT |
Definition at line 79 of file DericheFilter.hh.
atb::DericheFilter< DataT, Dim >::DericheFilter | ( | BoundaryTreatmentType | btType = ValueBT , |
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Constructor.
btType | Defines the border treatment of this filter. The following border treatments are available: ValueBT , RepeatBT , MirrorBT , CyclicBT , CropBT |
boundaryValue | The value to use for out-of-Array positions if the btType is ValueBT |
atb::DericheFilter< DataT, Dim >::DericheFilter | ( | blitz::TinyVector< double, Dim > const & | sigmaUm, |
BoundaryTreatmentType | btType = ValueBT , |
||
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Constructor.
sigmaUm | The standard deviations in micrometers. If you pass values ![]() |
btType | Defines the border treatment of this filter. The following border treatments are available: ValueBT , RepeatBT , MirrorBT , CyclicBT , CropBT |
boundaryValue | The value to use for out-of-Array positions if the btType is ValueBT |
|
virtual |
Destructor.
|
static |
Application of the Deriche filter onto the data Array using the standard deviations passed.
data | The data Array to convolve |
elementSizeUm | The voxel extents in micrometers |
filtered | The convolution result |
sigmaUm | The standard deviations per dimension in micrometers |
btType | The boundary treatment to apply |
boundaryValue | When using ValueBT this value is used for outside data access |
|
static |
Application of the Deriche filter onto the data Array using the standard deviations passed.
data | The data Array to convolve |
filtered | The convolution result |
sigmaUm | The standard deviations per dimension in micrometers |
btType | The boundary treatment to apply |
boundaryValue | When using ValueBT this value is used for outside data access |
double atb::DericheFilter< DataT, Dim >::sigmaUmInDim | ( | int | dim | ) | const |
Get the standard deviation of the Deriche filter along the given dimension.
dim | The dimension to get the filter standard deviation for |
void atb::DericheFilter< DataT, Dim >::setSigmaUmInDim | ( | int | dim, |
double | sigmaUm | ||
) |
Set the standard deviation of the Deriche filter along the given dimension.
dim | The dimension to set the filter standard deviation for |
sigmaUm | The new standard deviation along dimension dim. If you pass a value ![]() |
blitz::TinyVector<double,Dim> const& atb::DericheFilter< DataT, Dim >::sigmaUm | ( | ) | const |
Get the standard deviations of the Deriche filter.
void atb::DericheFilter< DataT, Dim >::setSigmaUm | ( | blitz::TinyVector< double, Dim > const & | sigmaUm | ) |
Set the standard deviations of the Deriche filter.
sigmaUm | The new standard deviations in micrometers. If you pass values ![]() |
|
virtual |
Application of the Deriche filter onto the data Array along the specified dimension.
data | The data Array to convolve |
elementSizeUm | The voxel extents in micrometers |
filtered | The filter result |
dim | The dimension along which to apply the filter |
Implements atb::SeparableFilter< DataT, Dim, DataT >.
|
virtual |
Application of the Deriche filter onto the data Array using the standard deviations passed to the filter object.
data | The data Array to convolve |
elementSizeUm | The voxel extents in micrometers |
filtered | The convolution result |
Implements atb::Filter< DataT, Dim, DataT >.
|
virtualinherited |
Apply the filter along the specified dimension.
data | The data Array to filter |
result | The filter result |
dim | The dimension along which to apply the filter |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
|
inherited |
Get a read-only reference to the boundary treatment object associated with this filter.
|
inherited |
Change the boundary treatment type to the type specified.
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
|
inherited |
Change the boundary treatment type to the type specified.
bt | The boundary treatment this filter uses |
|
virtualinherited |
Apply the filter to the given Array.
data | The Array to apply the filter to |
result | The filtering result |
pr | If given progress will be reported to this ProgressReporter |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
|
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.