![]() |
aimsalgo
5.0.5
Neuroimaging image processing
|
Base class for separable infinite impulse response filters. More...
#include <aims/signalfilter/iirfilter.h>
Public Member Functions | |
IIRFilterBase () | |
Constructor / Destructor / Copy. More... | |
IIRFilterBase (const IIRFilterBase &other) | |
virtual | ~IIRFilterBase () |
IIRFilterBase & | operator= (const IIRFilterBase &other) |
template<typename T > | |
carto::VolumeRef< double > | execute (const carto::VolumeRef< T > &in) const |
Execution. More... | |
carto::VolumeRef< double > | execute (carto::VolumeRef< double > &in, bool inplace=false) const |
virtual void | filter1d (const carto::VolumeRef< double > in, carto::VolumeRef< double > out, int dir=-1) const =0 |
Actual 1d filter that should be implemented by derived classes. More... | |
virtual const std::vector< bool > & | directions () const |
Parameters. More... | |
virtual void | setDirections (const std::vector< bool > &dir) |
virtual void | setDirections (bool dirx, bool diry, bool dirz, bool dirt) |
virtual void | setDirectionX (bool dirx) |
default: true More... | |
virtual void | setDirectionY (bool diry) |
default: true More... | |
virtual void | setDirectionZ (bool dirz) |
default: true More... | |
virtual void | setDirectionT (bool dirt) |
default: false More... | |
virtual const FilterType::Boundary & | boundary () const |
Because the filter is infinite, the signal must be extended outisde the image domain. More... | |
virtual void | setBoundary (const FilterType::Boundary &boundary) |
virtual void | setVerbose (int verbose=1) |
Verbosity level. More... | |
virtual void | setQuiet () |
Set verbosity level to 0 -> Remove all possible traces. More... | |
Protected Member Functions | |
virtual void | filter (carto::VolumeRef< double > vol) const |
Helpers. More... | |
virtual void | filter1d (carto::VolumeRef< double > vol, int dir=-1, carto::VolumeRef< double > tmp=carto::VolumeRef< double >((carto::Volume< double > *) 0)) const |
redirection for in place fitlering More... | |
virtual double & | at (carto::VolumeRef< double > &vector, long k, int dir) const |
Fast access : k must be in [0, size-1]. More... | |
virtual const double & | at (const carto::VolumeRef< double > &vector, long k, int dir) const |
Fast access : k must be in [0, size-1]. More... | |
virtual double | at (const carto::VolumeRef< double > &vector, long k, int dir, long fullsize, int binf) const |
Mirror access : k can be outside [0, size - 1]. More... | |
virtual long | mirrorCoeff (long i, long size) const |
If i is outside [0, size-1], it is mirrored to fall inside. More... | |
virtual long | selectCoeff (long i, long fullsize, int binf) const |
If i is outside [binf, fullsize-1], it is mirrored to fall inside. More... | |
virtual long | computeK0 (double pole, double tolerance=-1.) const |
compute K0 so that pole^K0 < precision More... | |
Protected Attributes | |
int | _verbose |
std::vector< bool > | _dir |
FilterType::Boundary | _boundary |
FilterType::CopyType | _copy |
Base class for separable infinite impulse response filters.
This class implements all shared functionalities such as recursive calls to 1D filters, axis of filtering, border strategy, verbosity. Actual IIR implementations should derive from this class and implement the filter1d() method.
Definition at line 57 of file iirfilter.h.
aims::IIRFilterBase::IIRFilterBase | ( | ) |
Constructor / Destructor / Copy.
aims::IIRFilterBase::IIRFilterBase | ( | const IIRFilterBase & | other | ) |
|
virtual |
|
protectedvirtual |
Fast access : k must be in [0, size-1].
|
protectedvirtual |
Fast access : k must be in [0, size-1].
|
protectedvirtual |
Mirror access : k can be outside [0, size - 1].
If borders are allocated, they will be used, else outside values will be infered according to the border strategy. However, for spline interpolation, note that border values should mirror inside values. It is the caller role to ensure that eventual borders are properly filled.
|
virtual |
Because the filter is infinite, the signal must be extended outisde the image domain.
This extension can be by mirroring inside voxels about the borders, by using the nearest inside voxels or by using null values.
|
protectedvirtual |
compute K0 so that pole^K0 < precision
|
virtual |
Parameters.
Axis slong which the fitlering is performed. By default, filtering is performed along the X, Y and Z axes.
carto::VolumeRef<double> aims::IIRFilterBase::execute | ( | const carto::VolumeRef< T > & | in | ) | const |
Execution.
Apply the filtering process to a volume. Under certain conditions, it can be done in place (the input volume will contain the result). Else an output volume will be created.
Referenced by aims::SplinePyramidBuilder::execute(), and aims::InterpolatedVolume::setVolume().
carto::VolumeRef<double> aims::IIRFilterBase::execute | ( | carto::VolumeRef< double > & | in, |
bool | inplace = false |
||
) | const |
|
protectedvirtual |
Helpers.
Generic multidimensional filter. Calls filter1d successively in each direction.
|
pure virtual |
Actual 1d filter that should be implemented by derived classes.
Implemented in aims::SymAllPoleIIRFilter, and aims::CausalSinglePoleIIRFilter.
|
protectedvirtual |
redirection for in place fitlering
|
protectedvirtual |
If i is outside [0, size-1], it is mirrored to fall inside.
IIRFilterBase& aims::IIRFilterBase::operator= | ( | const IIRFilterBase & | other | ) |
Referenced by aims::DirectBSplineFilter::execute().
|
protectedvirtual |
If i is outside [binf, fullsize-1], it is mirrored to fall inside.
|
virtual |
|
virtual |
Referenced by aims::SplinePyramidBuilder::execute().
|
virtual |
|
virtual |
default: false
|
virtual |
default: true
|
virtual |
default: true
|
virtual |
default: true
|
virtual |
Set verbosity level to 0 -> Remove all possible traces.
|
virtual |
Verbosity level.
Default value is carto::verbose that is usually set at the command level.
Referenced by aims::SplinePyramidBuilder::execute().
|
protected |
Definition at line 151 of file iirfilter.h.
|
protected |
Definition at line 152 of file iirfilter.h.
|
protected |
Definition at line 150 of file iirfilter.h.
|
protected |
Definition at line 149 of file iirfilter.h.