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

The LaplacianOfGaussianFilter class implements the Filter interface and provides Laplacian of Gaussian computation using Gaussian derivative filters. More...

#include "libArrayToolbox/LaplacianOfGaussianFilter.hh"

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

Public Types

typedef DataT ResultT
 

Public Member Functions

 LaplacianOfGaussianFilter (BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
 Default Constructor. More...
 
 LaplacianOfGaussianFilter (double standardDeviationUm, blitz::TinyVector< BlitzIndexT, Dim > const &minimumKernelShapePx=BlitzIndexT(0), BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
 Constructor. More...
 
virtual ~LaplacianOfGaussianFilter ()
 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 renderKernel (atb::Array< DataT, Dim > &kernel) const
 Render the used kernel into the given Array. 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) const
 Set the minimum kernel shape of the Gaussian in pixels for all dimensions. More...
 
void setStandardDeviationUm (double standardDeviationUm)
 Set the standard deviation of the Gaussian. More...
 
double standardDeviationUm () const
 Get the standard deviation of the Gaussian. More...
 

Static Public Member Functions

static void apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, double 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, double 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...
 

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::LaplacianOfGaussianFilter< DataT, Dim >

The LaplacianOfGaussianFilter class implements the Filter interface and provides Laplacian of Gaussian computation using Gaussian derivative filters.

Definition at line 53 of file LaplacianOfGaussianFilter.hh.

Member Typedef Documentation

◆ ResultT

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

Definition at line 59 of file LaplacianOfGaussianFilter.hh.

Constructor & Destructor Documentation

◆ LaplacianOfGaussianFilter() [1/2]

template<typename DataT , int Dim>
atb::LaplacianOfGaussianFilter< DataT, Dim >::LaplacianOfGaussianFilter ( BoundaryTreatmentType  bt = ValueBT,
DataT const &  boundaryValue = traits< DataT >::zero 
)

Default Constructor.

Creates a Laplacian of Gaussian filter.

Parameters
btThe boundary treatment this filter uses
boundaryValueIf bt is ValueBT, this value will be used for out-of-Array access

◆ LaplacianOfGaussianFilter() [2/2]

template<typename DataT , int Dim>
atb::LaplacianOfGaussianFilter< DataT, Dim >::LaplacianOfGaussianFilter ( double  standardDeviationUm,
blitz::TinyVector< BlitzIndexT, Dim > const &  minimumKernelShapePx = BlitzIndexT(0),
BoundaryTreatmentType  bt = ValueBT,
DataT const &  boundaryValue = traits< DataT >::zero 
)

Constructor.

Parameters
standardDeviationUmThe isotropic standard deviation of the Gaussian in micrometers
minimumKernelShapePxThe minimum kernel shape in pixels. Usually the kernel has a shape of 12 * standardDeviation (in pixels) + 1 in the dimension of the derivative and half the size for the perpendicular directions. If you want to explicitely force larger kernels you can give the minimum kernel extents here.
btThe boundary treatment this filter uses
boundaryValueIf bt is ValueBT, this value will be used for out-of-Array access

◆ ~LaplacianOfGaussianFilter()

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

Destructor.

Member Function Documentation

◆ standardDeviationUm()

template<typename DataT , int Dim>
double atb::LaplacianOfGaussianFilter< DataT, Dim >::standardDeviationUm ( ) const
inline

Get the standard deviation of the Gaussian.

Returns
The standard deviation of the Gaussian in micrometers

Definition at line 110 of file LaplacianOfGaussianFilter.hh.

Referenced by atb::LaplacianOfGaussianFilter< DataT, Dim >::setStandardDeviationUm().

◆ setStandardDeviationUm()

template<typename DataT , int Dim>
void atb::LaplacianOfGaussianFilter< DataT, Dim >::setStandardDeviationUm ( double  standardDeviationUm)
inline

Set the standard deviation of the Gaussian.

Parameters
standardDeviationUmThe standard deviation of the Gaussian in micrometers

Definition at line 123 of file LaplacianOfGaussianFilter.hh.

◆ minimumKernelShapePx()

template<typename DataT , int Dim>
blitz::TinyVector<BlitzIndexT,Dim> atb::LaplacianOfGaussianFilter< DataT, Dim >::minimumKernelShapePx ( ) const
inline

Get the minimum kernel shape of the Gaussian in pixels for all dimensions.

Returns
The minimum kernel shape in pixels

Definition at line 136 of file LaplacianOfGaussianFilter.hh.

Referenced by atb::LaplacianOfGaussianFilter< DataT, Dim >::setMinimumKernelShapePx().

◆ setMinimumKernelShapePx()

template<typename DataT , int Dim>
void atb::LaplacianOfGaussianFilter< DataT, Dim >::setMinimumKernelShapePx ( blitz::TinyVector< BlitzIndexT, Dim > const &  minimumKernelShapePx) const
inline

Set the minimum kernel shape of the Gaussian in pixels for all dimensions.

Parameters
minimumKernelShapePxThe minimum kernel shape in pixels

Definition at line 149 of file LaplacianOfGaussianFilter.hh.

◆ renderKernel()

template<typename DataT , int Dim>
void atb::LaplacianOfGaussianFilter< DataT, Dim >::renderKernel ( atb::Array< DataT, Dim > &  kernel) const

Render the used kernel into the given Array.

The Array will be resized to resemble the kernel that would be used to filter a dataset with the element size given in the kernel Array.

Parameters
kernelThe Array the kernel will be rendered to. The elementSizeUm attribute of the kernel must be set to the desired element size.

Referenced by atb::LaplacianOfGaussianFilter< DataT, Dim >::setMinimumKernelShapePx().

◆ apply() [1/4]

template<typename DataT , int Dim>
virtual void atb::LaplacianOfGaussianFilter< DataT, Dim >::apply ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::Array< ResultT, Dim > &  filtered,
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
filteredThe filtering result
Exceptions
RuntimeErrorIf an error occurs during the filter operation an exception of this kind is thrown

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

Referenced by atb::LaplacianOfGaussianFilter< DataT, Dim >::setMinimumKernelShapePx().

◆ apply() [2/4]

template<typename DataT , int Dim>
static void atb::LaplacianOfGaussianFilter< DataT, Dim >::apply ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::Array< ResultT, Dim > &  filtered,
double  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
dataThe blitz++ Array to apply the filter to
elementSizeUmThe element size of the Array
filteredThe filtering result
standardDeviationUmThe standard deviation of the Gaussian
btTypeThe boundary treatment to apply
boundaryValueThe out-of-Array value that should be used if btType == ValueBT
Exceptions
RuntimeErrorIf 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::LaplacianOfGaussianFilter< DataT, Dim >::apply ( Array< DataT, Dim > const &  data,
Array< ResultT, Dim > &  filtered,
double  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
dataThe blitz++ Array to apply the filter to
filteredThe filtering result
standardDeviationUmThe standard deviation of the Gaussian
btTypeThe boundary treatment to apply
boundaryValueIf btType is Value, this value is assumed outside the Arrays
btTypeThe boundary treatment to apply
boundaryValueThe out-of-Array value that should be used if btType == ValueBT
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() [4/4]

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: