43#include "DGtal/base/Common.h"
45#include "DGtal/base/Common.h"
46#include "DGtal/io/readers/VolReader.h"
47#include "DGtal/io/DrawWithDisplay3DModifier.h"
48#include "DGtal/io/viewers/Viewer3D.h"
49#include "DGtal/io/Color.h"
51#include "DGtal/images/ImageSelector.h"
52#include "DGtal/helpers/StdDefs.h"
53#include "ConfigExamples.h"
54#include "DGtal/io/Color.h"
55#include "DGtal/io/colormaps/GradientColorMap.h"
56#include "DGtal/topology/KhalimskySpaceND.h"
57#include "DGtal/topology/helpers/Surfaces.h"
68int main(
int argc,
char** argv )
72 Point p2( 20, 20, 20 );
73 Point c( 10, 10, 10 );
79 unsigned int nbSeeds = 35;
80 vector<Point> vCenters;
82 for(
unsigned int i=0;i<nbSeeds; i++){
83 vCenters.push_back(
Point(rand()%p2[0], rand()%p2[1],
85 vRad.push_back(rand()%7);
88 for(
unsigned int i=0;i<nbSeeds; i++){
89 if ( (*it - vCenters.at(i) ).norm1() <= vRad.at(i) &&
domain.
isInside(*it) &&
100 K.
init(p1, p2,
true);
103 vector<vector<SCell> > vectConnectedSCell;
114 QApplication application(argc,argv);
130 for(
unsigned int i=0; i< vectConnectedSCell.size();i++){
136 for(
unsigned int j=0; j< vectConnectedSCell.at(i).size();j++){
137 viewer << vectConnectedSCell.at(i).at(j);
143 viewer << diamond_set;
145 viewer << Viewer3D<>::updateDisplay;
146 return application.exec();
Structure representing an RGB triple with alpha component.
static const Color Yellow
void green(const unsigned char aGreenValue)
void red(const unsigned char aRedValue)
void blue(const unsigned char aBlueValue)
static const Color Magenta
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
void insertNew(const Point &p)
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
Iterator for HyperRectDomain.
bool isInside(const Point &p) const
const ConstIterator & begin() const
const ConstIterator & end() const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
static void extractAllConnectedSCell(std::vector< std::vector< SCell > > &aVectConnectedSCell, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp, bool forceOrientCellExterior=false)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
DGtal is the top-level namespace which contains all DGtal functions and types.