Example of range on Domain.
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/io/boards/Board2D.h"
using namespace std;
{
typedef SpaceND<3> TSpace;
HyperRectDomain<TSpace>
domain(a,b);
std::vector<TSpace::Dimension> v(2); v[0]=2; v[1]=1;
for( HyperRectDomain<TSpace>::ConstSubRange::ConstReverseIterator
it =
domain.subRange(v, c).rbegin(), itend =
domain.subRange(v, c).rend();
it != itend;
++it)
trace.
info() <<
"Processing point"<< (*it) << endl;
for( HyperRectDomain<TSpace>::ConstSubRange::ConstReverseIterator
it =
domain.subRange({2,1}, c).rbegin(), itend =
domain.subRange({2,1}, c).rend();
it != itend;
++it)
trace.
info() <<
"Processing point"<< (*it) << endl;
HyperRectDomain<TSpace> domain2;
for( HyperRectDomain<TSpace>::ConstSubRange::ConstReverseIterator
it =
domain.subRange({2,1}, c).rbegin(), itend =
domain.subRange({2,1}, c).rend();
it != itend;
++it)
trace.
info() <<
"Processing point"<< (*it) << endl;
return 0;
}
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
int main(int argc, char **argv)