27 #ifndef MLN_IO_RAW_GET_HEADER_HH
28 # define MLN_IO_RAW_GET_HEADER_HH
37 # include <mln/core/concept/image.hh>
38 # include <mln/core/routine/initialize.hh>
39 # include <mln/core/box_runstart_piter.hh>
40 # include <mln/core/pixel.hh>
41 # include <mln/data/memcpy_.hh>
42 # include <mln/util/array.hh>
72 # ifndef MLN_INCLUDE_ONLY
77 mln_trace(
"mln::io::raw::get_header");
81 std::string info_filename = filename +
".info";
83 std::ifstream info_file(info_filename.c_str());
86 std::cerr <<
"io::raw::get_header - Error: cannot open file '"
92 std::string file_type;
93 info_file >> file_type;
94 if (file_type !=
"milena/raw")
96 std::cerr <<
"io::raw::load - Error: invalid file type. '"
98 <<
"' is NOT a valid milena/raw info file!"
107 info_file.read(dev_null, 5);
108 info_file >> header.
dim;
112 for (
unsigned i = 0; i < header.
dim; ++i)
113 info_file >> header.
size[i];
121 info_file.read(dev_null, 11);
123 char value_type[255];
124 info_file.getline(value_type, 255);
133 # endif // ! MLN_INCLUDE_ONLY
141 #endif // ! MLN_IO_RAW_GET_HEADER_HH