iRoCS Toolbox  1.1.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
atb::IsotropicMedianFilter< DataT, Dim > Class Template Reference

The IsotropicMedianFilter class implements the n-dimensional isotropic median filter. More...

#include "ArrayToolbox/IsotropicMedianFilter.hh"

Inheritance diagram for atb::IsotropicMedianFilter< DataT, Dim >:
Collaboration diagram for atb::IsotropicMedianFilter< DataT, Dim >:

Public Types

typedef DataT ResultT
 

Public Member Functions

 IsotropicMedianFilter (double radiusUm=1.0)
 Constructor. More...
 
virtual ~IsotropicMedianFilter ()
 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...
 
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...
 

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...
 

Detailed Description

template<typename DataT, int Dim>
class atb::IsotropicMedianFilter< DataT, Dim >

The IsotropicMedianFilter class implements the n-dimensional isotropic median filter.

Definition at line 50 of file IsotropicMedianFilter.hh.

Member Typedef Documentation

◆ ResultT

template<typename DataT , int Dim>
typedef DataT atb::IsotropicMedianFilter< DataT, Dim >::ResultT

Definition at line 55 of file IsotropicMedianFilter.hh.

Constructor & Destructor Documentation

◆ IsotropicMedianFilter()

template<typename DataT , int Dim>
atb::IsotropicMedianFilter< DataT, Dim >::IsotropicMedianFilter ( double  radiusUm = 1.0)

Constructor.

In contrast to other filters the median 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.

Parameters
radiusUmThe filter radius in micrometers

◆ ~IsotropicMedianFilter()

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

Destructor.

Member Function Documentation

◆ filterRadiusUm()

template<typename DataT , int Dim>
double atb::IsotropicMedianFilter< DataT, Dim >::filterRadiusUm ( ) const

Get the filter radius in micrometers.

Returns
The filter radius in micrometers.

◆ setFilterRadiusUm()

template<typename DataT , int Dim>
void atb::IsotropicMedianFilter< DataT, Dim >::setFilterRadiusUm ( double  radiusUm)

Set the filter radius in micrometers.

Parameters
radiusUmThe filter radius in micrometers.

◆ apply() [1/3]

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

Apply the filter to the given Array.

Parameters
dataThe blitz++ Array to apply the filter to
elementSizeUmThe element size of the Array
resultThe filtering result
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

Implements atb::Filter< DataT, Dim, DataT >.

◆ apply() [2/3]

template<typename DataT , int Dim>
static void atb::IsotropicMedianFilter< DataT, Dim >::apply ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< ResultT, Dim > &  filtered,
double  radiusUm,
iRoCS::ProgressReporter pr = NULL 
)
static

Apply the filter to the given Array.

Parameters
dataThe blitz++ Array to apply the filter to
filteredThe filtering result
extentsPxThe filter extents in pixels
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

◆ boundaryTreatment()

BoundaryTreatment<DataT,Dim> const& atb::Filter< DataT, Dim, DataT >::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]

void atb::Filter< DataT, Dim, DataT >::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]

void atb::Filter< DataT, Dim, DataT >::setBoundaryTreatment ( BoundaryTreatment< DataT, Dim > const &  bt)
inherited

Change the boundary treatment type to the type specified.

Parameters
btThe boundary treatment this filter uses

◆ apply() [3/3]

virtual void atb::Filter< DataT, Dim, DataT >::apply ( Array< DataT, Dim > const &  data,
Array< DataT , 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

BoundaryTreatment<DataT,Dim>* atb::Filter< DataT, Dim, DataT >::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: