26 {
27 if (
shapes.size() != 0)
return;
28
30 const double steps[] = { 1.00, 0.50, 0.25 };
31 const double noises[] = { 0.00, 0.10 };
32
33 for (const auto& poly : polys) {
34 for (const auto& step : steps) {
35 for (const auto& noise : noises) {
36
38 params( "polynomial", poly.second )
39 ( "gridstep", step)
40 ( "noise", noise);
41
45
46 const std::string name = poly.first + "_" + std::to_string(step) + "_" + std::to_string(noise);
48
49 names.push_back(name);
50 domains.push_back(nshape->domain());
52
53 for (
auto it =
domain.begin(); it !=
domain.end(); ++it) {
54 if (nshape->operator()(*it) != 0) {
55 shapes.back().push_back(*it);
56 }
57 }
58 }
59 }
60 }
61
62 std::cout << "Shapes: " << std::endl;
63 for (
const auto& n :
names) {
64 std::cout << "\t -" << n << std::endl;
65 }
66 }
static std::map< std::string, std::string > getPolynomialList()
static CountedPtr< DigitizedImplicitShape3D > makeDigitizedImplicitShape3D(CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D())
static Parameters defaultParameters()
static CountedPtr< BinaryImage > makeBinaryImage(Domain shapeDomain)
static CountedPtr< ImplicitShape3D > makeImplicitShape3D(const Parameters ¶ms=parametersImplicitShape3D())
const Domain & domain() const
static std::vector< std::vector< Z3i::Point > > shapes
static std::vector< Z3i::Domain > domains
static std::vector< std::string > names