OpendTect  6.6
emzmap.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Nanne Hemstra
8  Date: October 2014
9 ________________________________________________________________________
10 
11 -*/
12 
13 
14 
15 #include "earthmodelmod.h"
16 
17 #include "coordsystem.h"
18 #include "executor.h"
19 
20 class UnitOfMeasure;
21 template<class T> class Array2D;
22 
23 namespace EM
24 {
25 
26 mExpClass(EarthModel) ZMapImporter : public Executor
28 public:
29  ZMapImporter(const char* fnm);
31 
32  od_int64 nrDone() const { return nrdone_; }
33  od_int64 totalNr() const { return totalnr_; }
34  uiString uiMessage() const { return msg_; }
35  uiString uiNrDoneText() const { return nrdonetxt_; }
36 
38  void setUOM(const UnitOfMeasure*);
39 
40  const Array2D<float>* data() const { return data_; }
41  Array2D<float>* data() { return data_; }
42 
43  Coord minCoord() const;
44  Coord maxCoord() const;
45  Coord step() const;
46 
47 protected:
48 
49  bool initHeader();
50  void applyCRS();
51  int nextStep();
52 
53  od_int64 nrdone_ = 0;
54  od_int64 totalnr_ = 0;
57 
58  Array2D<float>* data_ = nullptr;
60  bool initdone_ = false;
61  od_istream* istrm_ = nullptr;
63 
64  // header line 1
65  int nrnodesperline_ = 0;
66 
67  // header line 2
68  int nrchars_ = 0;
69  float undefval_ = -999.f;
71  int nrdec_ = 0;
72  int firstcol_ = 0;
73 
74  // header line 3
75  int nrrows_ = 0;
76  int nrcols_ = 0;
77  double xmin_ = 0.;
78  double xmax_ = 0.;
79  double ymin_ = 0.;
80  double ymax_ = 0.;
81 
82  // derived
83  double dx_ = 0.;
84  double dy_ = 0.;
85 
86  // Coords in survey's CRS
89 };
90 
91 } // namespace EM
92 
coordsystem.h
EM::ZMapImporter::fnm_
BufferString fnm_
Definition: emzmap.h:59
EM::ZMapImporter::step
Coord step() const
od_int64
#define od_int64
Definition: plftypes.h:35
EM::ZMapImporter::nrdonetxt_
uiString nrdonetxt_
Definition: emzmap.h:56
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
od_istream
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
EM::ZMapImporter::coordsystem_
RefMan< Coords::CoordSystem > coordsystem_
Definition: emzmap.h:62
EM::ZMapImporter::nrDone
od_int64 nrDone() const
Definition: emzmap.h:32
EM::ZMapImporter::uiNrDoneText
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: emzmap.h:35
EM::ZMapImporter::uiMessage
uiString uiMessage() const
will be message() again in 7.x
Definition: emzmap.h:34
EM
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: bulk2dhorizonscanner.h:26
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
EM::ZMapImporter::data
Array2D< float > * data()
Definition: emzmap.h:41
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
EM::ZMapImporter::setCoordSystem
void setCoordSystem(Coords::CoordSystem *)
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
Coords::CoordSystem
Definition: coordsystem.h:31
EM::ZMapImporter::maxcrd_
Coord maxcrd_
Definition: emzmap.h:88
EM::ZMapImporter::applyCRS
void applyCRS()
executor.h
EM::ZMapImporter::undeftxt_
BufferString undeftxt_
Definition: emzmap.h:70
EM::ZMapImporter
Definition: emzmap.h:27
EM::ZMapImporter::nextStep
int nextStep()
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
EM::ZMapImporter::initHeader
bool initHeader()
EM::ZMapImporter::data
const Array2D< float > * data() const
Definition: emzmap.h:40
EM::ZMapImporter::msg_
uiString msg_
Definition: emzmap.h:55
UnitOfMeasure
Unit of Measure.
Definition: unitofmeasure.h:35
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
EM::ZMapImporter::setUOM
void setUOM(const UnitOfMeasure *)
EM::ZMapImporter::~ZMapImporter
mODTextTranslationClass(ZMapImporter) public ~ZMapImporter()
EM::ZMapImporter::mincrd_
Coord mincrd_
Definition: emzmap.h:87
EM::ZMapImporter::maxCoord
Coord maxCoord() const
EM::ZMapImporter::totalNr
od_int64 totalNr() const
Definition: emzmap.h:33
Array2D
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:140
EM::ZMapImporter::minCoord
Coord minCoord() const
RefMan< Coords::CoordSystem >

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021