iRoCS Toolbox
1.1.0
|
The IsotropicPercentileFilter class implements the n-dimensional percentile filter. More...
#include "ArrayToolbox/IsotropicPercentileFilter.hh"
Public Types | |
typedef DataT | ResultT |
Public Member Functions | |
IsotropicPercentileFilter (double radiusUm=1.0, double percentile=50.0) | |
Constructor. More... | |
virtual | ~IsotropicPercentileFilter () |
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 |
Apply the filter to the given Array. 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... | |
BoundaryTreatment< DataT, Dim > const & | boundaryTreatment () const |
Get a read-only reference to the boundary treatment object associated with this filter. More... | |
double | filterRadiusUm () const |
Get the filter radius in micrometers. More... | |
double | percentile () const |
Get the percentile. 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 | setFilterRadiusUm (double radiusUm) |
Set the filter radius in micrometers. More... | |
void | setPercentile (double percentile) |
Set the percentile. More... | |
Static Public Member Functions | |
static void | apply (blitz::Array< DataT, Dim > const &data, blitz::Array< ResultT, Dim > &filtered, double radiusUm, iRoCS::ProgressReporter *pr=NULL) |
Apply the filter to the given Array. More... | |
Protected Attributes | |
BoundaryTreatment< DataT, Dim > * | p_bt |
The boundary treatment object to use for out-of-Array access. More... | |
The IsotropicPercentileFilter class implements the n-dimensional percentile filter.
The percentile filter is a generalization of the median filter, that takes an arbitrary percentile in the sorted intensity array instead of the median element. A percentile filter with percentile 50 is equivalent to the median filter, a percentile value of 0 results in a minimum filter and a percentile value of 100 in a maximum filter.
Definition at line 56 of file IsotropicPercentileFilter.hh.
typedef DataT atb::IsotropicPercentileFilter< DataT, Dim >::ResultT |
Definition at line 61 of file IsotropicPercentileFilter.hh.
atb::IsotropicPercentileFilter< DataT, Dim >::IsotropicPercentileFilter | ( | double | radiusUm = 1.0 , |
double | percentile = 50.0 |
||
) |
Constructor.
In contrast to other filters the percentile filter always uses crop boundary treatment. Therefore any changes in the setting of the boundary treatment are bogus and do not change the behaviour of the filter.
radiusUm | The filter radius in micrometers |
percentile | The filter percentile in per cent |
|
virtual |
Destructor.
double atb::IsotropicPercentileFilter< DataT, Dim >::filterRadiusUm | ( | ) | const |
Get the filter radius in micrometers.
void atb::IsotropicPercentileFilter< DataT, Dim >::setFilterRadiusUm | ( | double | radiusUm | ) |
Set the filter radius in micrometers.
radiusUm | The filter radius in micrometers. |
double atb::IsotropicPercentileFilter< DataT, Dim >::percentile | ( | ) | const |
Get the percentile.
void atb::IsotropicPercentileFilter< DataT, Dim >::setPercentile | ( | double | percentile | ) |
Set the percentile.
percentile | The percentile in per cent. |
|
virtual |
Apply the filter to the given Array.
data | The blitz++ Array to apply the filter to |
elementSizeUm | The element size of the Array |
result | The filtering result |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
Implements atb::Filter< DataT, Dim, DataT >.
|
static |
Apply the filter to the given Array.
data | The blitz++ Array to apply the filter to |
filtered | The filtering result |
radiusUm | The filter radius in micrometers |
percentile | The filter percentile in per cent |
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.