00001 //=========================================================================== 00002 // SINTEF LSMG library - version 1.1 00003 // 00004 // Copyright (C) 2000-2005 SINTEF ICT, Applied Mathematics, Norway. 00005 // 00006 // This program is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU General Public License 00008 // as published by the Free Software Foundation version 2 of the License. 00009 // 00010 // This program 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 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 00018 // 59 Temple Place - Suite 330, 00019 // Boston, MA 02111-1307, USA. 00020 // 00021 // Contact information: e-mail: tor.dokken@sintef.no 00022 // SINTEF ICT, Department of Applied Mathematics, 00023 // P.O. Box 124 Blindern, 00024 // 0314 Oslo, Norway. 00025 // 00026 // Other licenses are also available for this software, notably licenses 00027 // for: 00028 // - Building commercial software. 00029 // - Building software whose source code you wish to keep private. 00030 //=========================================================================== 00031 #ifndef POINT_ACCESS_UTILS_H 00032 #define POINT_ACCESS_UTILS_H 00033 00034 #include <vector> 00035 00036 namespace UCBspl { // ??? temporary 00037 00038 // Temporary namespace scope here now. Later we may: 00039 // i) Skip namespace here and in cpp file 00040 // ii) include this file and GenMatrix in a file inside namespace scope 00041 // iii) Also compile the cpp file inside the namespace scope 00042 00043 00044 // Operations on scattered data 00045 // ---------------------------- 00046 // ascii file access 00047 int numberOfPoints(const char filename[]); 00048 void readScatteredData(const char filename[], std::vector<double>& X, std::vector<double>& Y, std::vector<double>& Z, int incr=1); 00049 void readScatteredDataBin(const char filename[], std::vector<double>& X, std::vector<double>& Y, std::vector<double>& Z, bool invZ = false); 00050 void readScatteredDataBin2(const char filename[], std::vector<double>& X, std::vector<double>& Y, std::vector<double>& Z); 00051 void printVRMLpoints(const char filename[], const std::vector<double>& X, const std::vector<double>& Y, const std::vector<double>& Z, 00052 double xmin, double ymin, 00053 int incr=1, // print every incr point (default=1) 00054 double scale = 1.0); 00055 void printVTKpoints(const char filename[], const std::vector<double>& X, const std::vector<double>& Y, const std::vector<double>& Z, 00056 double scale = 1.0); 00057 00058 // binary file accesss 00059 void asciiXYZ2Bin(const char infile[], const char outfile[], int incr = 1); 00060 void asciiXYZ2Bin2(const char infile[], const char outfile[], int incr = 1); 00061 void readScatteredDataFileSetBin(const char metafile[], std::vector<double>& X, std::vector<double>& Y, std::vector<double>& Z); 00062 void grid2scat(const char infile[], const char outfile[]); 00063 00064 //void printVTKtriangleStrips(const char filename[], const GenMatrix<UCBspl_real>& mat, double scale = 1.0); 00065 00066 void gisGeo2Planar(std::vector<double>& X, std::vector<double>& Y); 00067 00068 //void exploreData(const char metafile[]); // Misc. on explore files 00069 00070 }; // end namespace 00071 00072 #endif 00073