iRoCS Toolbox
1.1.0
|
The CentralGradientFilter class implements the SeparableFilter interface and provides gradient computation using central differences. More...
#include "libArrayToolbox/CentralGradientFilter.hh"
Public Types | |
enum | Accuracy { SecondOrder, FourthOrder } |
typedef blitz::TinyVector< DataT, Dim > | ResultT |
Public Member Functions | |
CentralGradientFilter (BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Default Constructor. More... | |
CentralGradientFilter (Accuracy accuracy, BoundaryTreatmentType bt=ValueBT, DataT const &boundaryValue=traits< DataT >::zero) | |
Constructor. More... | |
virtual | ~CentralGradientFilter () |
Destructor. More... | |
Accuracy | accuracy () const |
Get the order of accuracy of this filter. More... | |
virtual void | apply (Array< DataT, Dim > const &data, Array< blitz::TinyVector< DataT, Dim >, 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... | |
virtual void | applyAlongDim (Array< DataT, Dim > const &data, Array< blitz::TinyVector< DataT, Dim >, Dim > &result, int dim, iRoCS::ProgressReporter *pr=NULL) const |
Apply the filter along the specified dimension. More... | |
virtual void | applyAlongDim (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, int dim, iRoCS::ProgressReporter *pr=NULL) const |
Apply the filter along the specified dimension. More... | |
virtual void | applyAlongDim (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, int dim, iRoCS::ProgressReporter *pr=NULL) const |
Apply the filter along the specified dimension. More... | |
BoundaryTreatment< DataT, Dim > const & | boundaryTreatment () const |
Get a read-only reference to the boundary treatment object associated with this filter. More... | |
void | setAccuracy (Accuracy accuracy) |
Set the order of accuracy of this filter. 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... | |
Static Public Member Functions | |
static void | apply (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< ResultT, Dim > &filtered, Accuracy accuracy, 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, Accuracy accuracy, 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 CentralGradientFilter class implements the SeparableFilter interface and provides gradient computation using central differences.
Definition at line 51 of file CentralGradientFilter.hh.
typedef blitz::TinyVector<DataT,Dim> atb::CentralGradientFilter< DataT, Dim >::ResultT |
Definition at line 57 of file CentralGradientFilter.hh.
enum atb::CentralGradientFilter::Accuracy |
Enumerator | |
---|---|
SecondOrder | |
FourthOrder |
Definition at line 59 of file CentralGradientFilter.hh.
atb::CentralGradientFilter< DataT, Dim >::CentralGradientFilter | ( | BoundaryTreatmentType | bt = ValueBT , |
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Default Constructor.
Creates a Gradient filter with second order accurate discrete gradient approimation using central differences.
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
atb::CentralGradientFilter< DataT, Dim >::CentralGradientFilter | ( | Accuracy | accuracy, |
BoundaryTreatmentType | bt = ValueBT , |
||
DataT const & | boundaryValue = traits< DataT >::zero |
||
) |
Constructor.
accuracy | The accuracy of the filter |
bt | The boundary treatment this filter uses |
boundaryValue | If bt is ValueBT, this value will be used for out-of-Array access |
|
virtual |
Destructor.
Accuracy atb::CentralGradientFilter< DataT, Dim >::accuracy | ( | ) | const |
Get the order of accuracy of this filter.
Currently only snd and 4th order are implemented.
void atb::CentralGradientFilter< DataT, Dim >::setAccuracy | ( | Accuracy | accuracy | ) |
Set the order of accuracy of this filter.
Currently only snd and 4th order are implemented.
accuracy | The new accuracy of the discrete derivative approximation |
|
virtual |
Apply the filter along the specified dimension.
data | The data Array to filter |
elementSizeUm | The data voxel extents in micrometers |
filtered | The filter result |
dim | The dimension along which to apply the filter |
|
virtual |
Apply the filter along the specified dimension.
data | The data Array to filter |
elementSizeUm | The data voxel extents in micrometers |
filtered | The filter result (in the dim'th vector component) |
dim | The dimension along which to apply the filter |
Implements atb::SeparableFilter< DataT, Dim, blitz::TinyVector< DataT, Dim > >.
|
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 |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
Implements atb::Filter< DataT, Dim, blitz::TinyVector< DataT, Dim > >.
|
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 |
accuracy | The filter accuracy order |
btType | The boundary treatment to apply |
boundaryValue | The out-of-Array value that should be used if btType == ValueBT |
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 |
accuracy | The filter accuracy order |
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 |
RuntimeError | If an error occurs during the filter operation an exception of this kind is thrown |
|
virtualinherited |
Apply the filter along the specified dimension.
data | The data Array to filter |
result | The filter result |
dim | The dimension along which to apply the filter |
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.