The GaussianFilter class implements the Filter interface and provides a Gaussian smoothing filter.
More...
#include "libArrayToolbox/GaussianFilter.hh"
|
| GaussianFilter (BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) |
| Default Constructor. More...
|
|
| GaussianFilter (blitz::TinyVector< double, Dim > const &standardDeviationUm, blitz::TinyVector< BlitzIndexT, Dim > const &minimumKernelShapePx=BlitzIndexT(0), BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) |
| Constructor. More...
|
|
virtual | ~GaussianFilter () |
| 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...
|
|
virtual void | apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, 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...
|
|
blitz::TinyVector< BlitzIndexT, Dim > | minimumKernelShapePx () const |
| Get the minimum kernel shape of the Gaussian in pixels for all dimensions. 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 | setMinimumKernelShapePx (blitz::TinyVector< BlitzIndexT, Dim > const &minimumKernelShapePx) |
| Set the minimum kernel shape of the Gaussian in pixels for all dimensions. More...
|
|
void | setStandardDeviationUm (blitz::TinyVector< double, Dim > const &standardDeviationUm) |
| Set the standard deviation of the Gaussian in micrometers for all dimensions. More...
|
|
blitz::TinyVector< double, Dim > | standardDeviationUm () const |
| Get the standard deviation of the Gaussian in micrometers for all dimensions. More...
|
|
|
static void | apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, blitz::TinyVector< double, Dim > const &standardDeviationUm, blitz::TinyVector< BlitzIndexT, Dim > const &minimumKernelShapePx=BlitzIndexT(0), BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero, iRoCS::ProgressReporter *pr=NULL) |
| Apply the filter to the given Array. More...
|
|
static void | apply (Array< DataT, Dim > const &data, Array< ResultT, Dim > &filtered, blitz::TinyVector< double, Dim > const &standardDeviationUm, blitz::TinyVector< BlitzIndexT, Dim > const &minimumKernelShapePx=BlitzIndexT(0), BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero, iRoCS::ProgressReporter *pr=NULL) |
| Apply the filter to the given Array. More...
|
|
template<typename DataT, int Dim>
class atb::GaussianFilter< DataT, Dim >
The GaussianFilter class implements the Filter interface and provides a Gaussian smoothing filter.
Definition at line 53 of file GaussianFilter.hh.
◆ ResultT
template<typename DataT , int Dim>
◆ GaussianFilter() [1/2]
template<typename DataT , int Dim>
Default Constructor.
Creates a stub Gaussian filter.
- Parameters
-
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
◆ GaussianFilter() [2/2]
template<typename DataT , int Dim>
Constructor.
Creates a Gaussian filter with given standard deviations (in micrometers) in either dimension.
- Parameters
-
standardDeviationUm | The Gaussian standard deviation in either direction in micrometers |
minimumKernelShapePx | The minimum kernel shape in pixels. Usually the kernel has a shape of 6 * standardDeviation (in pixels) + 1 in either dimension. If you want to explicitely force larger kernels you can give the minimum kernel extents here. |
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
◆ ~GaussianFilter()
template<typename DataT , int Dim>
◆ standardDeviationUm()
template<typename DataT , int Dim>
Get the standard deviation of the Gaussian in micrometers for all dimensions.
- Returns
- The Gaussian standard deviation vector in micrometers
◆ setStandardDeviationUm()
template<typename DataT , int Dim>
void atb::GaussianFilter< DataT, Dim >::setStandardDeviationUm |
( |
blitz::TinyVector< double, Dim > const & |
standardDeviationUm | ) |
|
Set the standard deviation of the Gaussian in micrometers for all dimensions.
- Parameters
-
standardDeviationUm | The Gaussian standard deviation vector in micrometers |
◆ minimumKernelShapePx()
template<typename DataT , int Dim>
Get the minimum kernel shape of the Gaussian in pixels for all dimensions.
- Returns
- The minimum kernel shape in pixels
◆ setMinimumKernelShapePx()
template<typename DataT , int Dim>
Set the minimum kernel shape of the Gaussian in pixels for all dimensions.
- Parameters
-
minimumKernelShapePx | The minimum kernel shape in pixels |
◆ apply() [1/4]
template<typename DataT , int Dim>
◆ apply() [2/4]
template<typename DataT , int Dim>
static void atb::GaussianFilter< DataT, Dim >::apply |
( |
blitz::Array< DataT, Dim > const & |
data, |
|
|
blitz::TinyVector< double, Dim > const & |
elementSizeUm, |
|
|
blitz::Array< ResultT, Dim > & |
filtered, |
|
|
blitz::TinyVector< double, Dim > const & |
standardDeviationUm, |
|
|
blitz::TinyVector< BlitzIndexT, Dim > const & |
minimumKernelShapePx = BlitzIndexT(0) , |
|
|
BoundaryTreatmentType |
btType = ValueBT , |
|
|
DataT const & |
boundaryValue = traits< DataT >::zero , |
|
|
iRoCS::ProgressReporter * |
pr = NULL |
|
) |
| |
|
static |
Apply the filter to the given Array.
- Parameters
-
data | The blitz++ Array to apply the filter to |
elementSizeUm | The element size of the Array |
filtered | The filtering result |
standardDeviationUm | The Gaussian standard deviation vector (in micrometers) |
minimumKernelShapePx | The minimum kernel shape in pixels |
btType | The boundary treatment to apply |
boundaryValue | The out-of-Array value that should be used if btType == ValueBT |
pr | Progress will be reported through the given iRoCS::ProgressReporter |
- Exceptions
-
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
◆ apply() [3/4]
template<typename DataT , int Dim>
static void atb::GaussianFilter< DataT, Dim >::apply |
( |
Array< DataT, Dim > const & |
data, |
|
|
Array< ResultT, Dim > & |
filtered, |
|
|
blitz::TinyVector< double, Dim > const & |
standardDeviationUm, |
|
|
blitz::TinyVector< BlitzIndexT, Dim > const & |
minimumKernelShapePx = BlitzIndexT(0) , |
|
|
BoundaryTreatmentType |
btType = ValueBT , |
|
|
DataT const & |
boundaryValue = traits< DataT >::zero , |
|
|
iRoCS::ProgressReporter * |
pr = NULL |
|
) |
| |
|
static |
Apply the filter to the given Array.
- Parameters
-
data | The blitz++ Array to apply the filter to |
filtered | The filtering result |
standardDeviationUm | The Gaussian standard deviation vector (in micrometers) |
minimumKernelShapePx | The minimum kernel shape in pixels |
btType | The boundary treatment to apply |
boundaryValue | If btType is Value, this value is assumed outside the Arrays |
btType | The boundary treatment to apply |
boundaryValue | The out-of-Array value that should be used if btType == ValueBT |
pr | Progress will be reported through the given iRoCS::ProgressReporter |
- Exceptions
-
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
◆ boundaryTreatment()
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]
Change the boundary treatment type to the type specified.
- Parameters
-
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
◆ setBoundaryTreatment() [2/2]
Change the boundary treatment type to the type specified.
- Parameters
-
bt | The boundary treatment this filter uses |
◆ apply() [4/4]
Apply the filter to the given Array.
- Parameters
-
data | The Array to apply the filter to |
result | The filtering result |
pr | If given progress will be reported to this ProgressReporter |
- Exceptions
-
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
◆ p_bt
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: