Milena (Olena)
User documentation 2.0a Id
|
00001 // Copyright (C) 2008, 2009, 2011 EPITA Research and Development 00002 // Laboratory (LRDE) 00003 // 00004 // This file is part of Olena. 00005 // 00006 // Olena is free software: you can redistribute it and/or modify it under 00007 // the terms of the GNU General Public License as published by the Free 00008 // Software Foundation, version 2 of the License. 00009 // 00010 // Olena is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with Olena. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 // As a special exception, you may use this file as part of a free 00019 // software project without restriction. Specifically, if other files 00020 // instantiate templates or use macros or inline functions from this 00021 // file, or you compile this file and link it with other files to produce 00022 // an executable, this file does not by itself cause the resulting 00023 // executable to be covered by the GNU General Public License. This 00024 // exception does not however invalidate any other reasons why the 00025 // executable file might be covered by the GNU General Public License. 00026 00027 #ifndef MLN_IO_FLD_HEADER_HH 00028 # define MLN_IO_FLD_HEADER_HH 00029 00030 namespace mln 00031 { 00032 00033 namespace io 00034 { 00035 00036 namespace fld 00037 { 00038 00039 00040 struct data_type { enum E { UNKNOWN, BYTE, SHORT, INTEGER, FLOAT, DOUBLE }; }; 00041 struct field_type { enum E { UNKNOWN, UNIFORM, RECTILINEAR, IRREGULAR }; }; 00042 00046 struct fld_header 00047 { 00048 int ndim; // The number of computational dimensions in the field. 00049 int* dim; // The dimension size of each axis. 00050 int nspace; // The number of physical coordinates per field element. 00051 int veclen; // The number of data values for each field element. 00052 data_type::E data; // The primitive data type of all the data values. 00053 field_type::E field; // The field type. 00054 float* min_ext; // The minimum coordinate value that any member data point occupies in space. 00055 float* max_ext; // The maximum coordinate value that any member data point occupies in space. 00056 // std::vector<std::string> label; // Not handled. 00057 // std::vector<std::string> unit; // Not handled. 00058 // void* min_val; // The minimum data value in the field. (Not used) 00059 // void* max_val; // The maximum data value in the field. (Not used) 00060 // struct {...} variable; // Not handled. 00061 // struct {...} coord; // Not handled. 00062 00063 fld_header(); 00064 ~fld_header(); 00065 }; 00066 00067 00068 # ifndef MLN_INCLUDE_ONLY 00069 00070 inline 00071 fld_header::fld_header() 00072 : ndim (-1), 00073 dim (0), 00074 nspace (-1), 00075 veclen (-1), 00076 data (data_type::UNKNOWN), 00077 field (field_type::UNKNOWN) 00078 { 00079 } 00080 00081 inline 00082 fld_header::~fld_header() 00083 { 00084 delete [] dim; 00085 delete [] max_ext; 00086 delete [] min_ext; 00087 } 00088 00089 # endif // ! MLN_INCLUDE_ONLY 00090 00091 } // end of namespace mln::io::fld 00092 00093 } // end of namespace mln::io 00094 00095 } // end of namespace mln 00096 00097 #endif // !MLN_IO_FLD_HEADER_HH