+ if (!ReadLine(handle,line)) return false;
+ if (regexec(&re_comment,line.c_str(),1,matches,0) == REG_NOMATCH) return false;
+
+ if (!ReadLine(handle,line)) return false;
+ if (regexec(&re_matrix_size,line.c_str(),4,matches,0) == REG_NOMATCH) return false;
+ header.matrix_size[0] = ConvertFromString<double>(ExtractMatch(line,matches[1]));
+ header.matrix_size[1] = ConvertFromString<double>(ExtractMatch(line,matches[2]));
+ header.matrix_size[2] = ConvertFromString<double>(ExtractMatch(line,matches[3]));
+
+ if (!ReadLine(handle,line)) return false;
+ if (regexec(&re_resol,line.c_str(),4,matches,0) == REG_NOMATCH) return false;
+ header.resolution[0] = ConvertFromString<int>(ExtractMatch(line,matches[1]));
+ header.resolution[1] = ConvertFromString<int>(ExtractMatch(line,matches[2]));
+ header.resolution[2] = ConvertFromString<int>(ExtractMatch(line,matches[3]));