iRoCS Toolbox
1.1.0
|
The AnisotropicDiffusionFilter class implements the Filter interface and provides an anisotropic diffusion filter. More...
#include "libArrayToolbox/AnisotropicDiffusionFilter.hh"
Public Types | |
typedef DataT | ResultT |
Public Member Functions | |
AnisotropicDiffusionFilter (BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Default Constructor. More... | |
AnisotropicDiffusionFilter (double kappa, double sigmaUm=-1.0, double tau=0.0625, double zAnisotropyCorrection=0.0, int nIterations=20, int hessianUpdateStepWidth=4, BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Constructor. More... | |
virtual | ~AnisotropicDiffusionFilter () |
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... | |
int | hessianUpdateStepWidth () const |
Get the iteration stride for hessian recomputation. More... | |
double | kappa () const |
Get the edge weight kappa. More... | |
int | nIterations () const |
Get the number of filtering iterations. 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 | setHessianUpdateStepWidth (int hessianUpdateStepWidth) |
Set the iteration stride for hessian recomputation. More... | |
void | setKappa (double kappa) |
Set the edge weight kappa. More... | |
void | setNIterations (int nIterations) |
Set the number of filtering iterations. More... | |
void | setSigmaUm (double sigmaUm) |
Set the standard deviation of the Gaussian pre-smoothing filter in micrometers for all dimensions. More... | |
void | setTau (double tau) |
Set the solver time step (In case of convergence problems reduce it) More... | |
void | setZAnisotropyCorrection (double zAnisotropyCorrection) |
Set the anisotropy correction constant applied in z direction. More... | |
double | sigmaUm () const |
Get the standard deviations of the Gaussian pre-smoothing filter in micrometers for all dimensions. More... | |
double | tau () const |
Get the solver time step. More... | |
double | zAnisotropyCorrection () const |
Get the anisotropy correction constant applied in z direction. 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 kappa, double sigmaUm=-1.0, double tau=0.0625, double zAnisotropyCorrection=0.0, int nIterations=20, int hessianUpdateStepWidth=4, 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 kappa, double sigmaUm=-1.0, double tau=0.0625, double zAnisotropyCorrection=0.0, int nIterations=20, int hessianUpdateStepWidth=4, 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... | |
The AnisotropicDiffusionFilter class implements the Filter interface and provides an anisotropic diffusion filter.
This filter non-linearly removes noise and enhances consistent structures.
Definition at line 53 of file AnisotropicDiffusionFilter.hh.
typedef DataT atb::AnisotropicDiffusionFilter< DataT, Dim >::ResultT |
Definition at line 58 of file AnisotropicDiffusionFilter.hh.
atb::AnisotropicDiffusionFilter< DataT, Dim >::AnisotropicDiffusionFilter | ( | BoundaryTreatmentType | bt = ValueBT , |
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Default Constructor.
Creates a stub anisotropic diffusion filter.
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
atb::AnisotropicDiffusionFilter< DataT, Dim >::AnisotropicDiffusionFilter | ( | double | kappa, |
double | sigmaUm = -1.0 , |
||
double | tau = 0.0625 , |
||
double | zAnisotropyCorrection = 0.0 , |
||
int | nIterations = 20 , |
||
int | hessianUpdateStepWidth = 4 , |
||
BoundaryTreatmentType | bt = ValueBT , |
||
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Constructor.
Creates an anisotropic diffusion filter with given pre-smoothing Gaussian standard deviation and edge weight kappa.
sigmaUm | The standard deviations in either direction of the pre-smoothing Gaussian kernel in micrometers |
kappa | The edge factor (ToDo: clarify what it does) |
tau | The step width of the Jacobian solver |
zAnisotropyCorrection | Values greater than zero will enhance weaker edges in z direction than in x-y directions. The z-direction edge weight will be increased by this constant. |
nIterations | The number of iterations to apply |
hessianUpdateStepWidth | The hessian is recomputed every hessianUpdateStepWidth iterations |
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
|
virtual |
Destructor.
double atb::AnisotropicDiffusionFilter< DataT, Dim >::kappa | ( | ) | const |
Get the edge weight kappa.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setKappa | ( | double | kappa | ) |
Set the edge weight kappa.
kappa | The edge weight |
double atb::AnisotropicDiffusionFilter< DataT, Dim >::sigmaUm | ( | ) | const |
Get the standard deviations of the Gaussian pre-smoothing filter in micrometers for all dimensions.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setSigmaUm | ( | double | sigmaUm | ) |
Set the standard deviation of the Gaussian pre-smoothing filter in micrometers for all dimensions.
sigmaUm | The standard deviation vector in micrometers |
double atb::AnisotropicDiffusionFilter< DataT, Dim >::tau | ( | ) | const |
Get the solver time step.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setTau | ( | double | tau | ) |
Set the solver time step (In case of convergence problems reduce it)
tau | The solver time step |
double atb::AnisotropicDiffusionFilter< DataT, Dim >::zAnisotropyCorrection | ( | ) | const |
Get the anisotropy correction constant applied in z direction.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setZAnisotropyCorrection | ( | double | zAnisotropyCorrection | ) |
Set the anisotropy correction constant applied in z direction.
zAnisotropyCorrection | The z anisotropy constant |
int atb::AnisotropicDiffusionFilter< DataT, Dim >::nIterations | ( | ) | const |
Get the number of filtering iterations.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setNIterations | ( | int | nIterations | ) |
Set the number of filtering iterations.
nIterations | The number of filtering iterations |
int atb::AnisotropicDiffusionFilter< DataT, Dim >::hessianUpdateStepWidth | ( | ) | const |
Get the iteration stride for hessian recomputation.
void atb::AnisotropicDiffusionFilter< DataT, Dim >::setHessianUpdateStepWidth | ( | int | hessianUpdateStepWidth | ) |
Set the iteration stride for hessian recomputation.
hessianUpdateStepWidth | The number of filtering iterations between two hessian updates |
|
virtual |
Apply the filter to the given Array.
data | The blitz++ Array to apply the filter to |
elementSizeUm | The element size of the Array |
filtered | The filtering result |
pr | Progress will be reported through the given iRoCS::ProgressReporter |
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 |
elementSizeUm | The element size of the Array |
filtered | The filtering result |
sigmaUm | The Gaussian pre-smoothing standard deviation vector (in micrometers) |
kappa | The edge weight |
tau | The step width of the Jacobian solver |
zAnisotropyCorrection | Values greater than zero will enhance weaker edges in z direction than in x-y directions. The z-direction edge weight will be increased by this constant. |
nIterations | The number of iterations to apply |
hessianUpdateStepWidth | The hessian is recomputed every hessianUpdateStepWidth iterations |
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 |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
|
static |
Apply the filter to the given Array.
data | The blitz++ Array to apply the filter to |
filtered | The filtering result |
sigmaUm | The Gaussian pre-smoothing standard deviation vector (in micrometers) |
kappa | The edge weight |
tau | The step width of the Jacobian solver |
zAnisotropyCorrection | Values greater than zero will enhance weaker edges in z direction than in x-y directions. The z-direction edge weight will be increased by this constant. |
nIterations | The number of iterations to apply |
hessianUpdateStepWidth | The hessian is recomputed every hessianUpdateStepWidth iterations |
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 |
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.