#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/topology/KhalimskySpaceND.h"
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/topology/helpers/Surfaces.h"
 
#include "DGtal/io/readers/PGMReader.h"
#include "DGtal/io/colormaps/GradientColorMap.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/io/Color.h"
 
#include "ConfigExamples.h"
 
 
 
 
 
{
  typedef ImageSelector < Z2i::Domain, int>::Type 
Image;
 
  std::string inputFilename = examplesPath + "samples/circleR10modif.pgm"; 
  
  board << 
image.domain() << set2d; 
  
  board2 << 
image.domain() << set2d; 
 
  board3 << 
image.domain() << set2d; 
 
 
  
  bool space_ok = ks.
init( 
image.domain().lowerBound(), 
image.domain().upperBound(), 
true );
 
  
 
 
  
 
  
  std::vector<Z2i::SCell> vectBdrySCell;
            ks, SAdj, set2d, aCell );
  
  board << 
CustomStyle( (*(vectBdrySCell.begin())).className(), 
  
 
  unsigned int d=0;
  std::vector<Z2i::SCell>::iterator it;
  for ( it=vectBdrySCell.begin() ; it != vectBdrySCell.end(); it++ ){
            cmap_grad( d )))<< *it;
    d++;
  }
 
 
  
  std::set<Z2i::SCell> bdry;
  
  
    ( bdry,
 
  
  std::set<Z2i::SCell>::iterator itB;
  for ( itB=bdry.begin() ; itB != bdry.end(); itB++ ){
             cmap_grad( d )))<< *itB;
    d++;
  }
  
  std::vector< std::vector<Z2i::SCell> > vectContoursBdrySCell;
                ks, SAdj, set2d );
  
  d=0;
  for(unsigned int i=0; i< vectContoursBdrySCell.size(); i++){
    d++;
    for(unsigned int j=0; j< vectContoursBdrySCell.at(i).size(); j++){
      board3<< 
CustomStyle(vectContoursBdrySCell.at(i).at(j).className() ,
               cmap_grad3( d )))<<vectContoursBdrySCell.at(i).at(j) ;
      
    }
  }
 
 
 
 
    board << aCell;  
 
    
    
    return (space_ok);
}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
const Point & lowerBound() const
Return the lower bound for digital points in this space.
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
const Point & upperBound() const
Return the upper bound for digital points in this space.
static void extractAll2DSCellContours(std::vector< std::vector< SCell > > &aVectSCellContour2D, const KSpace &aKSpace, const SurfelAdjacency< KSpace::dimension > &aSurfelAdj, const PointPredicate &pp)
static SCell findABel(const KSpace &K, const PointPredicate &pp, unsigned int nbtries=1000)
static void track2DBoundary(std::vector< SCell > &aSCellContour2D, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static void sMakeBoundary(SCellSet &aBoundary, const KSpace &aKSpace, const PointPredicate &pp, const Point &aLowerBound, const Point &aUpperBound)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
void saveFIG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0, bool includeFIGHeader=true) const
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
KhalimskySpaceND< 2, Integer > KSpace
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
DGtal is the top-level namespace which contains all DGtal functions and types.
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
ImageContainerBySTLVector< Domain, Value > Image