32 #include "DGtal/base/Common.h"
33 #include "DGtal/io/boards/Board2D.h"
34 #include "DGtal/io/Color.h"
35 #include "DGtal/io/colormaps/HueShadeColorMap.h"
36 #include "DGtal/shapes/Shapes.h"
37 #include "DGtal/io/Color.h"
38 #include "DGtal/io/colormaps/GradientColorMap.h"
39 #include "DGtal/topology/CUndirectedSimpleGraph.h"
40 #include "DGtal/topology/DepthFirstVisitor.h"
47 using namespace DGtal;
54 void testDepthFirstPropagation()
65 Domain domain( p1, p2 );
71 DigitalSet shape_set( domain );
79 Object obj(Z2i::dt4_8, shape_set);
87 board <<
SetMode( domain.className(),
"Paving" )
89 <<
SetMode( p1.className(),
"Paving" );
98 while( !bfv.finished() )
100 image.setValue(bfv.current().first, ++cpt);
104 string specificStyle = p1.className() +
"/Paving";
106 for ( DigitalSet::ConstIterator it = shape_set.begin();
107 it != shape_set.end();
123 cmap_grad( image(*it) ) ) )
135 board.saveEPS(
"testDepthFirstPropagation.eps");
143 while( !bfv2.finished() )
145 image.setValue(bfv2.current().first, bfv2.current().second);
149 specificStyle = p1.className() +
"/Paving";
151 for ( DigitalSet::ConstIterator it = shape_set.begin();
152 it != shape_set.end();
168 cmap_grad( image(*it) ) ) )
180 board.saveEPS(
"testDepthFirstPropagation-distance.eps");
183 int main(
int ,
char** )
185 testDepthFirstPropagation();