DGtal 1.3.0
|
#include <iostream>
#include <algorithm>
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/topology/helpers/Surfaces.h"
#include "ConfigExamples.h"
#include "DGtal/io/viewers/Viewer3D.h"
Go to the source code of this file.
Functions | |
template<typename Vector > | |
Vector | wedge (const Vector &v1, const Vector &v2) |
template<typename Vector > | |
void | naiveConvexHull (std::vector< std::vector< unsigned int > > &indices, const std::vector< Vector > &points, bool left_handed) |
double | rescale (double x) |
template<typename Viewer , typename Vector > | |
void | viewPolygons (Viewer &viewer, const DGtal::Color &color, const std::vector< std::vector< unsigned int > > &indices, const std::vector< Vector > &points) |
template<typename Vector > | |
unsigned int | dim (const Vector &z) |
template<typename Vector > | |
unsigned int | openDim (const Vector &z) |
template<typename Vector > | |
Vector | lower (const Vector &z, unsigned int k) |
template<typename Vector > | |
Vector | upper (const Vector &z, unsigned int k) |
template<typename Vector > | |
unsigned int | nbLighted (std::map< Vector, bool > &f, const Vector &z) |
template<typename Vector > | |
bool | lightBetween (std::map< Vector, bool > &f, const Vector &z) |
template<typename Vector > | |
bool | lightMax (std::map< Vector, bool > &f, const Vector &z) |
template<typename Vector > | |
bool | lightMinMax (std::map< Vector, bool > &f, const Vector &z) |
template<typename Vector > | |
bool | lightMaxMin (std::map< Vector, bool > &f, const Vector &z) |
template<typename Vector > | |
bool | lightEpsilon (std::map< Vector, bool > &f, const Vector &z, unsigned int epsilon) |
template<typename Vector > | |
void | fillCfg (std::map< Vector, bool > &f, const Vector &z, unsigned int cfg) |
template<typename Vector > | |
void | localDualVolume (std::vector< Vector > &points, std::map< Vector, bool > &f, const Vector &z) |
int | main (int argc, char **argv) |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
An example file named viewDualSurface.
This file is part of the DGtal library.
Definition in file viewDualSurface.cpp.
Definition at line 174 of file viewDualSurface.cpp.
References DGtal::PointVector< dim, Integer >::dimension.
void fillCfg | ( | std::map< Vector, bool > & | f, |
const Vector & | z, | ||
unsigned int | cfg | ||
) |
Definition at line 337 of file viewDualSurface.cpp.
Definition at line 218 of file viewDualSurface.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), dim, DGtal::PointVector< dim, Integer >::dimension, domain, DGtal::HyperRectDomain< TSpace >::end(), lightBetween(), lower(), openDim(), and upper().
Referenced by lightBetween(), and main().
bool lightEpsilon | ( | std::map< Vector, bool > & | f, |
const Vector & | z, | ||
unsigned int | epsilon | ||
) |
Definition at line 309 of file viewDualSurface.cpp.
References dim, lightEpsilon(), lower(), openDim(), and upper().
Referenced by lightEpsilon().
Definition at line 253 of file viewDualSurface.cpp.
References dim, lower(), nbLighted(), openDim(), and upper().
Definition at line 289 of file viewDualSurface.cpp.
References dim, lightMaxMin(), lower(), openDim(), and upper().
Referenced by lightMaxMin().
Definition at line 270 of file viewDualSurface.cpp.
References dim, lightMinMax(), lower(), openDim(), and upper().
Referenced by lightMinMax().
void localDualVolume | ( | std::vector< Vector > & | points, |
std::map< Vector, bool > & | f, | ||
const Vector & | z | ||
) |
Definition at line 366 of file viewDualSurface.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::PointVector< dim, Integer >::diagonal(), domain, and DGtal::HyperRectDomain< TSpace >::end().
Referenced by main().
Definition at line 190 of file viewDualSurface.cpp.
Referenced by fillCfg(), DGtal::HyperRectDomain_Iterator< TPoint >::HyperRectDomain_Iterator(), DGtal::HyperRectDomain_subIterator< TPoint >::HyperRectDomain_subIterator(), lightBetween(), lightEpsilon(), lightMax(), lightMaxMin(), lightMinMax(), main(), and nbLighted().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 392 of file viewDualSurface.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::HyperRectDomain< TSpace >::end(), fillCfg(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), K, lightBetween(), localDualVolume(), naiveConvexHull(), DGtal::Viewer3D< TSpace, TKSpace >::show(), DGtal::Surfaces< TKSpace >::uMakeBoundary(), DGtal::KhalimskySpaceND< dim, TInteger >::uTranslation(), and viewPolygons().
void naiveConvexHull | ( | std::vector< std::vector< unsigned int > > & | indices, |
const std::vector< Vector > & | points, | ||
bool | left_handed | ||
) |
Definition at line 80 of file viewDualSurface.cpp.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot(), wedge(), and DGtal::PointVector< dim, Integer >::zero.
Referenced by main().
unsigned int nbLighted | ( | std::map< Vector, bool > & | f, |
const Vector & | z | ||
) |
Definition at line 205 of file viewDualSurface.cpp.
References dim, lower(), nbLighted(), openDim(), and upper().
Referenced by lightMax(), and nbLighted().
Definition at line 183 of file viewDualSurface.cpp.
References DGtal::PointVector< dim, Integer >::dimension.
Referenced by fillCfg(), lightBetween(), lightEpsilon(), lightMax(), lightMaxMin(), lightMinMax(), and nbLighted().
double rescale | ( | double | x | ) |
Definition at line 140 of file viewDualSurface.cpp.
Referenced by viewPolygons().
Definition at line 197 of file viewDualSurface.cpp.
Referenced by fillCfg(), DGtal::HyperRectDomain_Iterator< TPoint >::HyperRectDomain_Iterator(), DGtal::HyperRectDomain_subIterator< TPoint >::HyperRectDomain_subIterator(), lightBetween(), lightEpsilon(), lightMax(), lightMaxMin(), lightMinMax(), main(), and nbLighted().
void viewPolygons | ( | Viewer & | viewer, |
const DGtal::Color & | color, | ||
const std::vector< std::vector< unsigned int > > & | indices, | ||
const std::vector< Vector > & | points | ||
) |
Definition at line 147 of file viewDualSurface.cpp.
References DGtal::Display3D< Space, KSpace >::addPolygon(), DGtal::Display3D< Space, KSpace >::getFillColor(), rescale(), and DGtal::Display3D< Space, KSpace >::setFillColor().
Referenced by main().
Definition at line 54 of file viewDualSurface.cpp.
Referenced by naiveConvexHull().