#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/io/viewers/PolyscopeViewer.h"
#include "DGtal/io/Color.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
#include "DGtal/io/Color.h"
#include "DGtal/io/colormaps/GradientColorMap.h"
#include "DGtal/topology/KhalimskySpaceND.h"
#include "DGtal/topology/helpers/Surfaces.h"
int main(
int argc,
char** argv )
{
unsigned int nbSeeds = 35;
vector<Point> vCenters;
vector<uint> vRad;
for(unsigned int i=0;i<nbSeeds; i++){
vCenters.push_back(
Point(rand()%p2[0], rand()%p2[1],
rand()%p2[2]));
vRad.push_back(rand()%7);
}
for ( Domain::ConstIterator it =
domain.begin(); it !=
domain.end(); ++it ){
for(unsigned int i=0;i<nbSeeds; i++){
if ( (*it - vCenters.at(i) ).norm1() <= vRad.at(i) &&
domain.isInside(*it) &&
diamond_set.insertNew( *it );
break;
}
}
}
vector<vector<SCell> > vectConnectedSCell;
PolyscopeViewer<> viewer (
K);
for(unsigned int i=0; i< vectConnectedSCell.size();i++){
viewer << col;
for(unsigned int j=0; j< vectConnectedSCell.at(i).size();j++){
viewer << vectConnectedSCell.at(i).at(j);
}
}
viewer <<
Color(250, 200,200, 200);
viewer << diamond_set;
return 0;
}
Structure representing an RGB triple with alpha component.
static const Color Yellow
static const Color Magenta
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
void show() override
Starts the event loop and display of elements.
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...
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
HyperRectDomain< Space > Domain
Z2i::DigitalSet DigitalSet