#include <BoundaryDiscretizer.hpp>
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.
imaging::BoundaryDiscretizer< N >::BoundaryDiscretizer | ( | size_t | n_points | ) | [inline] |
Construct a discretization with n_points discretization points.
size_t imaging::BoundaryDiscretizer< N >::n_points | ( | ) | const [inline] |
Returns the number of discretization points.
References imaging::BoundaryDiscretizer< N >::_n_points.
Referenced by imaging::BoundaryDiscretizer< N >::compute_boundary_area(), imaging::BoundaryDiscretizer< N >::compute_bounding_box(), imaging::compute_intersection_volume(), imaging::BoundaryDiscretizer< N >::integrate(), imaging::BoundaryDiscretizer< N >::integrate_vector_field(), and imaging::triangulate_shape().
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()().
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()().
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()().
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()().
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().
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().
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().
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.
size_t imaging::BoundaryDiscretizer< N >::_n_points [protected] |
Number of discretization points.
Referenced by imaging::BoundaryDiscretizer< N >::n_points().
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().