gpprofile/ProfileReader.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of gpprofile.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2008-12-15
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef PROFILEREADER_H
00028 #define PROFILEREADER_H
00029 
00030 #include <QGpCoreTools.h>
00031 #include <QGpCoreWave.h>
00032 
00033 class ProfileReader : public ArgumentStdinReader
00034 {
00035   TRANSLATIONS("ProfileReader")
00036 public:
00037   ProfileReader();
00038   ~ProfileReader();
00039 
00040   bool setOptions(int& argc, char ** argv);
00041   bool terminate();
00042 protected:
00043   virtual bool parse(QTextStream& s);
00044 private:
00045   enum ModelType {SurfaceWaveModels, RefractionModels, ResistivityModels};
00046   enum ProfileType {Vp, Vs, Rho, Poisson, Impedance, Resistivity, Model};
00047   enum Output {Original, Resample, MinMax, AverageProfiles, AverageDepths, AverageAt, Pseudo3D};
00048 
00049   bool parseSurfaceWaveModels(QTextStream& s);
00050   bool parseResistivityModels(QTextStream& s);
00051 
00052   Profile profile(const Seismic1DModel& m) const;
00053   Profile profile(const Resistivity1DModel& m) const;
00054   void profileComment(QTextStream& sOut, const QString& comments) const;
00055 
00056   ModelType _model;
00057   ProfileType _profile;
00058   Output _output;
00059   double _maxDepth;
00060   int _nDepths;
00061   int _nProfiles;
00062 
00063   QVector<double> _sampling;
00064   Curve<Point2D> _vMin, _vMax;
00065 
00066   Point _pseudo3DAt;
00067   Point * _pseudo3DPositions;
00068   Seismic1DModel * _pseudo3DModels;
00069 };
00070 
00071 #endif // PROFILEREADER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines