DGtal
0.6.devel
|
#include <BinomialConvolver.h>
Public Types | |
typedef TValue | Value |
typedef TConstIteratorOnPoints | ConstIteratorOnPoints |
typedef ConstIteratorOnPoints::value_type | Point |
Public Member Functions | |
BinomialConvolver (unsigned int n=1) | |
~BinomialConvolver () | |
void | setSize (unsigned int n) |
unsigned int | size () const |
void | init (const double h, const ConstIteratorOnPoints &itb, const ConstIteratorOnPoints &ite, const bool isClosed) |
int | index (const ConstIteratorOnPoints &it) const |
std::pair< Value, Value > | x (int i) const |
std::pair< Value, Value > | dx (int i) const |
std::pair< Value, Value > | d2x (int i) const |
std::pair< Value, Value > | tangent (int i) const |
Value | curvature (int i) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Static Public Member Functions | |
static unsigned int | suggestedSize (const double h, const ConstIteratorOnPoints &itb, const ConstIteratorOnPoints &ite) |
Protected Attributes | |
unsigned int | myN |
double | myH |
Signal< Value > | myX |
Signal< Value > | myY |
Signal< Value > | myDX |
Signal< Value > | myDY |
Signal< Value > | myDDX |
Signal< Value > | myDDY |
ConstIteratorOnPoints | myBegin |
ConstIteratorOnPoints | myEnd |
std::map < ConstIteratorOnPoints, int > | myMapIt2Idx |
Private Member Functions | |
BinomialConvolver (const BinomialConvolver &other) | |
BinomialConvolver & | operator= (const BinomialConvolver &other) |
Aim: This class represents a 2D contour convolved by some binomial. It computes first and second order derivatives so as to be able to estimate tangent and curvature. In particular, it smoothes digital contours but could be used for other kind of contours.
Description of template class 'BinomialConvolver'.
TConstIteratorOnPoints | the type that represents an iterator in a sequence of points. Each component of Point must be convertible into a double. |
TValue | the type for storing the convolved versions of the contour (double as default). |
Definition at line 73 of file BinomialConvolver.h.
typedef TConstIteratorOnPoints DGtal::BinomialConvolver< TConstIteratorOnPoints, TValue >::ConstIteratorOnPoints |
Definition at line 78 of file BinomialConvolver.h.
typedef ConstIteratorOnPoints::value_type DGtal::BinomialConvolver< TConstIteratorOnPoints, TValue >::Point |
Definition at line 79 of file BinomialConvolver.h.
typedef TValue DGtal::BinomialConvolver< TConstIteratorOnPoints, TValue >::Value |
Definition at line 77 of file BinomialConvolver.h.
|
inline |
Constructor. The object is not valid.
n | the parameter for the size of the binomial kernel (which is then 2^n). |
Definition at line 51 of file BinomialConvolver.ih.
|
inline |
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
inline |
i | any index. |
NB: depends on the gridstep.
Definition at line 172 of file BinomialConvolver.ih.
|
inline |
i | any index. |
Definition at line 152 of file BinomialConvolver.ih.
|
inline |
i | any index. |
Definition at line 143 of file BinomialConvolver.ih.
|
inline |
Given a valid iterator [it], return the corresponding index position in the binomial convolver in logarithmic time. The method init should have been called before.
it | any valid iterator |
Definition at line 78 of file BinomialConvolver.ih.
|
inline |
Initializes the convolver with some sequence of points.
h | grid size (must be >0). |
itb,begin | iterator |
ite,end | iterator |
isClosed | true if the input range is viewed as closed. |
The object is then valid.
Definition at line 93 of file BinomialConvolver.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 242 of file BinomialConvolver.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 230 of file BinomialConvolver.ih.
|
inline |
n | the parameter for the size of the binomial kernel (which is then 2^n). |
Definition at line 60 of file BinomialConvolver.ih.
|
inline |
Definition at line 69 of file BinomialConvolver.ih.
|
inlinestatic |
Definition at line 190 of file BinomialConvolver.ih.
|
inline |
|
inline |
i | any index. |
Definition at line 134 of file BinomialConvolver.ih.
|
protected |
Copy of the begin iterator.
Definition at line 213 of file BinomialConvolver.h.
|
protected |
Definition at line 209 of file BinomialConvolver.h.
|
protected |
Definition at line 210 of file BinomialConvolver.h.
|
protected |
Definition at line 207 of file BinomialConvolver.h.
|
protected |
Definition at line 208 of file BinomialConvolver.h.
|
protected |
Copy of the end iterator.
Definition at line 216 of file BinomialConvolver.h.
|
protected |
Definition at line 204 of file BinomialConvolver.h.
|
protected |
Definition at line 219 of file BinomialConvolver.h.
|
protected |
Definition at line 203 of file BinomialConvolver.h.
|
protected |
Definition at line 205 of file BinomialConvolver.h.
|
protected |
Definition at line 206 of file BinomialConvolver.h.