|
DGtal 2.1.0
|
#include <DGtal/geometry/tools/GenericLatticeConvexHull.h>
Public Types | |
| typedef ConvexHullIntegralKernel< K, TCoordinateInteger, TInternalInteger > | Kernel |
| typedef detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K-1 > | LowerKernels |
| typedef std::size_t | Size |
| typedef Kernel::CoordinatePoint | Point |
| typedef Point::Coordinate | Integer |
| typedef QuickHull< Kernel > | QHull |
| typedef SpaceND< K, Integer > | Space |
| typedef BoundedLatticePolytope< Space > | LatticePolytope |
| typedef GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger > | Computer |
| typedef Computer::OutputPoint | OutputPoint |
Public Member Functions | |
| GenericLatticeConvexHullComputers (Computer *ptrGenQHull) | |
| void | clear () |
| Clears the object as if no computations have been made. | |
| template<typename TInputPoint > | |
| bool | compute (const std::vector< Size > &I, const std::vector< TInputPoint > &X) |
| bool | makePolytope () |
| Integer | count () |
| Integer | countInterior () |
| Integer | countBoundary () |
| Integer | countUpTo (Integer max) |
Data Fields | |
| Computer * | ptr_gen_qhull |
| the pointer on the parent computer | |
| LowerKernels | lower_kernels |
| the computers of lower dimension | |
| QHull | hull |
| the quick hull object that computes the convex hull | |
| std::vector< Point > | proj_points |
| the projected points, as points in lower dimension | |
| LatticePolytope | polytope |
| the polytope corresponding to the convex hull | |
Static Public Attributes | |
| static const Dimension | dimension = K |
Definition at line 69 of file GenericLatticeConvexHull.h.
| typedef GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Computer |
Definition at line 83 of file GenericLatticeConvexHull.h.
| typedef Point::Coordinate DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Integer |
Definition at line 77 of file GenericLatticeConvexHull.h.
| typedef ConvexHullIntegralKernel< K,TCoordinateInteger,TInternalInteger > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Kernel |
Definition at line 72 of file GenericLatticeConvexHull.h.
| typedef BoundedLatticePolytope< Space > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::LatticePolytope |
Definition at line 80 of file GenericLatticeConvexHull.h.
| typedef detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K-1> DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::LowerKernels |
Definition at line 74 of file GenericLatticeConvexHull.h.
| typedef Computer::OutputPoint DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::OutputPoint |
Definition at line 84 of file GenericLatticeConvexHull.h.
| typedef Kernel::CoordinatePoint DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Point |
Definition at line 76 of file GenericLatticeConvexHull.h.
| typedef QuickHull< Kernel > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::QHull |
Definition at line 78 of file GenericLatticeConvexHull.h.
| typedef std::size_t DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Size |
Definition at line 75 of file GenericLatticeConvexHull.h.
| typedef SpaceND< K, Integer > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::Space |
Definition at line 79 of file GenericLatticeConvexHull.h.
|
inline |
Constructor.
| ptrGenQHull | the pointer on the parent computer. |
Definition at line 89 of file GenericLatticeConvexHull.h.
References DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear().
|
inline |
Clears the object as if no computations have been made.
Definition at line 97 of file GenericLatticeConvexHull.h.
References DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::QuickHull< TKernel >::clear(), DGtal::BoundedLatticePolytope< TSpace >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::hull, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::proj_points.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::GenericLatticeConvexHullComputers(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, 1 >::GenericLatticeConvexHullComputers().
|
inline |
| TInputPoint | any type of input points. |
| I | a range of indices specifying an affine subset of X. |
| X | the range of input points. |
Copy back convex hull in initial space.
Definition at line 109 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_basis, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::QuickHull< TKernel >::clear(), DGtal::BoundedLatticePolytope< TSpace >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::QuickHull< TKernel >::computeConvexHull(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::dimension, DGtal::PointVector< dim, TEuclideanRing, TContainer >::dimension, DGtal::Trace::error(), DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::facets, DGtal::QuickHull< TKernel >::getFacetVertices(), DGtal::functions::getOrthogonalVector(), DGtal::QuickHull< TKernel >::getVertex2Point(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::hull, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::points, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::positions, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::proj_points, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::projected_dilation, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::projected_points, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull, DGtal::QuickHull< TKernel >::setInput(), DGtal::trace, DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::vertex2point, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
Referenced by DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::compute(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute().
|
inline |
Computes the number of integer points lying within the polytope.
Definition at line 233 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), DGtal::BoundedLatticePolytope< TSpace >::count(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::BoundedLatticePolytope< TSpace >::nbHalfSpaces(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), and DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::count().
|
inline |
Computes the number of integer points lying on the boundary of the polytope.
count() <= countInterior() + countBoundary() with equality when the polytope is closed. Definition at line 273 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), DGtal::BoundedLatticePolytope< TSpace >::countBoundary(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::BoundedLatticePolytope< TSpace >::nbHalfSpaces(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), and DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countBoundary().
|
inline |
Computes the number of integer points lying within the interior of the polytope.
count() <= countInterior() + countBoundary() with equality when the polytope is closed. Definition at line 253 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), DGtal::BoundedLatticePolytope< TSpace >::countInterior(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::BoundedLatticePolytope< TSpace >::nbHalfSpaces(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), and DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countInterior().
|
inline |
Computes the number of integer points within the polytope up to some maximum number max.
| [in] | max | the maximum number of points that are counted, the method exists when this number of reached. |
Definition at line 299 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), DGtal::BoundedLatticePolytope< TSpace >::countUpTo(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, max(), DGtal::BoundedLatticePolytope< TSpace >::nbHalfSpaces(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), and DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countUpTo().
|
inline |
Constructs the polytope that is the F-representation of the convex hull.
Definition at line 183 of file GenericLatticeConvexHull.h.
References DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::affine_dimension, DGtal::IntegerConverter< dim, TInteger >::cast(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::dimension, domain, g(), DGtal::QuickHull< TKernel >::getFacetHalfSpaces(), DGtal::H, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::hull, DGtal::PointVector< dim, TEuclideanRing, TContainer >::inf(), DGtal::BoundedLatticePolytope< TSpace >::isValid(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope(), DGtal::BoundedLatticePolytope< TSpace >::nbHalfSpaces(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm1(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::proj_points, DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::sup().
Referenced by DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::count(), DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countBoundary(), DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countInterior(), DGtal::GenericLatticeConvexHull< dim, TCoordinateInteger, TInternalInteger >::countUpTo(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
|
static |
Definition at line 85 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, 1 >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
| QHull DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::hull |
the quick hull object that computes the convex hull
Definition at line 313 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
| LowerKernels DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::lower_kernels |
the computers of lower dimension
Definition at line 312 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
| LatticePolytope DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::polytope |
the polytope corresponding to the convex hull
Definition at line 315 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
| std::vector< Point > DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::proj_points |
the projected points, as points in lower dimension
Definition at line 314 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, 1 >::clear(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, 1 >::compute(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().
| Computer* DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::ptr_gen_qhull |
the pointer on the parent computer
Definition at line 311 of file GenericLatticeConvexHull.h.
Referenced by DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, 1 >::compute(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::count(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countBoundary(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countInterior(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::countUpTo(), and DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K >::makePolytope().