33#include <DGtal/topology/tables/NeighborhoodTablesGenerators.h>
36#include <boost/iostreams/filtering_streambuf.hpp>
37#include <boost/iostreams/copy.hpp>
38#include <boost/iostreams/filter/zlib.hpp>
45int main(
int argc,
char** argv )
49 "Select ForegroundAdjacency for object topology:\n"
55 cout << error_message << std::endl;
58 std::string input_str = std::string(argv[1]);
62 unique_ptr<ConfigMap> table(
new ConfigMap);
63 trace.
beginBlock (
"Generate 3d table for " + input_str +
" topology" );
65 if (input_str ==
"26_6")
66 functions::generateSimplicityTable< Object26_6, ConfigMap >( dt26_6, *table );
67 else if (input_str ==
"18_6")
68 functions::generateSimplicityTable< Object18_6, ConfigMap >( dt18_6, *table );
69 else if (input_str ==
"6_18")
70 functions::generateSimplicityTable< Object6_18, ConfigMap >( dt6_18, *table );
71 else if (input_str ==
"6_26")
72 functions::generateSimplicityTable< Object6_26, ConfigMap >( dt6_26, *table );
74 cout << error_message << endl;
84 string filename =
"simplicity_table" + input_str +
".zlib";
85 ofstream file( filename );
86 std::stringstream table_stream;
87 table_stream << *table;
88 namespace io = boost::iostreams;
89 io::filtering_streambuf<io::input> filter;
90 filter.push(io::zlib_compressor());
91 filter.push(table_stream);
92 io::copy(filter,file);
void beginBlock(const std::string &keyword="")
std::vector< bool > ConfigMap
DGtal is the top-level namespace which contains all DGtal functions and types.