72 const typename TObject::DigitalTopology &
dt,
75 typedef typename TObject::DigitalSet
DigitalSet;
76 typedef typename TObject::Point
Point;
80 Point p1 = Point::diagonal( -1 );
81 Point p2 = Point::diagonal( 1 );
82 Point c = Point::diagonal( 0 );
85 TObject shape(
dt, shapeSet );
87 for ( DomainConstIterator it =
domain.begin(); it !=
domain.end(); ++it )
90 &&
"[generateSimplicityTable] number of configurations is too high." );
91 unsigned int nbCfg = 1 << k;
94 if ( ( cfg % 1000 ) == 0 )
96 trace.progressBar( (
double) cfg, (
double) nbCfg );
98 shape.pointSet().clear();
99 shape.pointSet().insert( c );
101 for ( DomainConstIterator it =
domain.begin(); it !=
domain.end(); ++it )
105 if ( cfg & mask ) shape.pointSet().insert( *it );
109 bool simple = shape.isSimple( c );
135 const TVoxelComplex & ,
136 const typename TVoxelComplex::Cell & )
143 Domain, std::unordered_set< Point > >;
145 using KSpace =
typename TVoxelComplex::KSpace;
147 Point p1 = Point::diagonal( -1 );
148 Point p2 = Point::diagonal( 1 );
149 Point c = Point::diagonal( 0 );
153 for ( DomainConstIterator it =
domain.begin(); it !=
domain.end(); ++it )
156 &&
"[generateVoxelComplexTable] number of configurations is too high." );
157 unsigned int nbCfg = 1 << k;
161 ks.
init(
domain.lowerBound() + Point::diagonal( -1 ) ,
162 domain.upperBound() + Point::diagonal( 1 ),
164 TVoxelComplex vc(ks);
165 vc.construct(shapeSet);
166 for (
unsigned int cfg = 0; cfg < nbCfg; ++cfg ){
167 if ( ( cfg % 1000 ) == 0 )
168 trace.progressBar( (
double) cfg, (
double) nbCfg );
170 vc.insertVoxelPoint(c);
171 unsigned int mask = 1;
172 for ( DomainConstIterator it =
domain.begin(); it !=
domain.end(); ++it ){
174 if ( cfg & mask ) vc.insertVoxelPoint( *it );
178 const auto &kcell = vc.space().uSpel(c);
179 bool predicate_output = skelFunction(vc, kcell);
180 map[ cfg ] = predicate_output;
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.