imaging::BoundaryDiscretizer< N > Class Template Reference
[Shape Module]

Abstract class interface for discretizations of shape boundaries. More...

#include <BoundaryDiscretizer.hpp>

List of all members.

Public Member Functions

 BoundaryDiscretizer (size_t n_points)
size_t n_points () const
virtual void evaluate (size_t i, ublas::fixed_vector< float_t, SHAPE_DIMENSION > &point, ublas::fixed_vector< float_t, SHAPE_DIMENSION > &normal, float_t &curvature) const =0
ublas::fixed_vector< float_t,
SHAPE_DIMENSION
operator() (size_t i, ublas::fixed_vector< float_t, SHAPE_DIMENSION > &normal, float_t &curvature) const
ublas::fixed_vector< float_t,
SHAPE_DIMENSION
operator() (size_t i, ublas::fixed_vector< float_t, SHAPE_DIMENSION > &normal) const
ublas::fixed_vector< float_t,
SHAPE_DIMENSION
operator() (size_t i) const
template<class const_accessort_t>
const_accessort_t::data_t integrate (const const_accessort_t &image) const
float_t compute_boundary_area () const
template<class const_vector_accessor_t>
float_t integrate_vector_field (const const_vector_accessor_t &vector_field) const
Box< SHAPE_DIMENSIONcompute_bounding_box () const

Static Public Attributes

static const size_t SHAPE_DIMENSION = N

Protected Attributes

size_t _n_points


Detailed Description

template<size_t N>
class imaging::BoundaryDiscretizer< N >

Abstract class interface for discretizations of shape boundaries.

Objects derived from this class can be evaluated in a finite number of sample points on the boundary of a shape. In addition to the coordinates of the sample point they must provide the outer normal in that point. The length of the normal must be such that the lengthes of all normals sum up to the area of the shape boundary. In other words, the length of the normal corresponds to the area of the infinitesimal boundary element around the normal.


Constructor & Destructor Documentation

template<size_t N>
imaging::BoundaryDiscretizer< N >::BoundaryDiscretizer ( size_t  n_points  )  [inline]

Construct a discretization with n_points discretization points.


Member Function Documentation

template<size_t N>
size_t imaging::BoundaryDiscretizer< N >::n_points (  )  const [inline]

template<size_t N>
virtual void imaging::BoundaryDiscretizer< N >::evaluate ( size_t  i,
ublas::fixed_vector< float_t, SHAPE_DIMENSION > &  point,
ublas::fixed_vector< float_t, SHAPE_DIMENSION > &  normal,
float_t curvature 
) const [pure virtual]

Sets point to the coordinates of the i-th disretization point and stores the boundary normal in this point in normal. The normal must be scaled to the area of the infinitesimal boundary element around the point. This function must be implemented in classes derived from BoundaryDiscretizer. For the actual evaluation of a discretization point the user should use operator().

Referenced by imaging::BoundaryDiscretizer< N >::operator()().

template<size_t N>
ublas::fixed_vector<float_t, SHAPE_DIMENSION> imaging::BoundaryDiscretizer< N >::operator() ( size_t  i,
ublas::fixed_vector< float_t, SHAPE_DIMENSION > &  normal,
float_t curvature 
) const [inline]

Evaluates the coordinates of the i-th discretization point, sets normal to the boundary normal and curvature to the curvature in this point. The normal is scaled to the area of the infinitesimal boundary element around the point.

References imaging::BoundaryDiscretizer< N >::evaluate().

Referenced by imaging::BoundaryDiscretizer< N >::operator()().

template<size_t N>
ublas::fixed_vector<float_t, SHAPE_DIMENSION> imaging::BoundaryDiscretizer< N >::operator() ( size_t  i,
ublas::fixed_vector< float_t, SHAPE_DIMENSION > &  normal 
) const [inline]

Evaluates the coordinates of the i-th discretization point and sets normal to the boundary normal in this point. The normal is scaled to the area of the infinitesimal boundary element around the point.

References imaging::BoundaryDiscretizer< N >::operator()().

template<size_t N>
ublas::fixed_vector<float_t, SHAPE_DIMENSION> imaging::BoundaryDiscretizer< N >::operator() ( size_t  i  )  const [inline]

Evaluates the coordinates of the i-th discretization point.

References imaging::BoundaryDiscretizer< N >::operator()().

template<size_t N>
template<class const_accessort_t>
const_accessort_t::data_t imaging::BoundaryDiscretizer< N >::integrate ( const const_accessort_t &  image  )  const [inline]

Integrate an image over a boundary discretization.

References imaging::BoundaryDiscretizer< N >::n_points().

template<size_t N>
float_t imaging::BoundaryDiscretizer< N >::compute_boundary_area (  )  const [inline]

Compute the (n-1)-dimensional boundary area of a boundary discretization.

References imaging::BoundaryDiscretizer< N >::n_points().

template<size_t N>
template<class const_vector_accessor_t>
float_t imaging::BoundaryDiscretizer< N >::integrate_vector_field ( const const_vector_accessor_t &  vector_field  )  const [inline]

Integrate a vector field over a boundary discretization.

References imaging::BoundaryDiscretizer< N >::n_points().

template<size_t N>
Box<SHAPE_DIMENSION> imaging::BoundaryDiscretizer< N >::compute_bounding_box (  )  const [inline]

Compute the bounding box of a boundary discretization.

References imaging::BoundaryDiscretizer< N >::n_points(), and imaging::BoundaryDiscretizer< N >::SHAPE_DIMENSION.


Member Data Documentation

template<size_t N>
size_t imaging::BoundaryDiscretizer< N >::_n_points [protected]

Number of discretization points.

Referenced by imaging::BoundaryDiscretizer< N >::n_points().

template<size_t N>
const size_t imaging::BoundaryDiscretizer< N >::SHAPE_DIMENSION = N [static]

The spatial dimension of the shape boundary. N is 2 for planar shapes and 3 for volumes.

Referenced by imaging::BoundaryDiscretizer< N >::compute_bounding_box().


The documentation for this class was generated from the following file:

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5