OpendTect-6_4  6.4
emsurfacetr.h
Go to the documentation of this file.
1 #ifndef emsurfacetr_h
2 #define emsurfacetr_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "transl.h"
18 #include "emsurfaceiodata.h"
19 #include "uistring.h"
20 
21 class Executor;
22 class IOObj;
23 
24 namespace EM
25 {
26  class dgbSurfaceReader;
27  class FaultStickSet;
28  class Fault3D;
29  class FaultSet3D;
30  class Horizon;
31  class Horizon2D;
32  class Horizon3D;
33  class Surface;
34 }
35 
42 
43 
51 public:
53 
54  const char* defExtension() const { return "hor"; }
55 };
56 
57 
64 public:
66 
67  const char* defExtension() const { return "2dh"; }
68 };
69 
70 
77 public:
79 };
80 
81 
88 public:
90 
91  const char* defExtension() const { return "flt"; }
92 };
93 
94 
101 public:
103 };
104 
105 
112 public:
114 
115  const char* defExtension() const { return "fss"; }
116 };
117 
118 
124 {
125 public:
126  EMSurfaceTranslator(const char* nm,
127  const char* unm)
128  : Translator(nm,unm)
129  , ioobj_(0)
130  , surface_(0)
131  , sels_(sd_) {}
132 
133  virtual ~EMSurfaceTranslator();
134 
135  bool startRead(const IOObj&);
136  bool startWrite(const EM::Surface&);
137 
139 
140  virtual Executor* reader(EM::Surface&) { return 0; }
142  Executor* writer(const IOObj&,bool fullimplremove=true);
145  { return 0; }
146  virtual Executor* getAuxdataWriter(const EM::Surface&,int,
147  bool overwt=false)
148  { return 0; }
149 
150  uiString errMsg() const { return errmsg_; }
151 
152  virtual bool implRemove(const IOObj*) const;
153  virtual bool implRename(const IOObj*,const char*,
154  const CallBack* cb=0) const;
155  virtual bool implSetReadOnly(const IOObj*,bool) const;
156 
157  static bool getBinarySetting();
158 
159  void setCreatedFrom( const char* src )
160  { crfrom_ = src; }
161 
162 protected:
163 
170 
171  virtual bool prepRead() { return true; }
172  virtual bool prepWrite() { return true; }
173  virtual Executor* getWriter() { return 0; }
174 
175  void init(const EM::Surface*,const IOObj*);
176  void setIOObj(const IOObj*);
177 };
178 
179 
185 {
186 public:
187  dgbEMSurfaceTranslator(const char*,const char*);
188  virtual ~dgbEMSurfaceTranslator();
189 
190  virtual Executor* reader(EM::Surface&);
191 
192 protected:
193 
194  static BufferString createHOVName(const char* base,int idx);
195  bool setSurfaceTransform(const IOPar&);
196  void getSels(StepInterval<int>&,StepInterval<int>&);
197 
198  bool prepRead();
199  Executor* getWriter();
200 
201  virtual bool readOnlyZ() const { return true; }
202  virtual bool writeOnlyZ() const { return true; }
203  virtual bool hasRangeSelection() const { return true; }
204 
206 };
207 
208 
215 public:
216  dgbEMHorizon3DTranslator(const char* unm,
217  const char* nm)
218  : dgbEMSurfaceTranslator(unm,nm) {}
220  virtual Executor* getAuxdataReader(EM::Surface&,int);
221  virtual Executor* getAuxdataWriter(const EM::Surface&,int,
222  bool ovwrt=false);
223 
224 
225 protected:
226  virtual bool readOnlyZ() const { return true; }
227  virtual bool writeOnlyZ() const { return true; }
228  virtual bool hasRangeSelection() const { return true; }
229 };
230 
231 
238 public:
239  dgbEMHorizon2DTranslator(const char* unm,
240  const char* nm)
241  : dgbEMSurfaceTranslator(unm,nm) {}
243 
244 protected:
245  virtual bool readOnlyZ() const {return false;}
246  virtual bool writeOnlyZ() const {return true;}
247  virtual bool hasRangeSelection() const {return false;}
248 };
249 
250 
257 public:
258  dgbEMFault3DTranslator(const char* unm,
259  const char* nm)
260  : dgbEMSurfaceTranslator(unm,nm) {}
262 
263 protected:
264  virtual bool readOnlyZ() const { return false;}
265  virtual bool writeOnlyZ() const { return false;}
266  virtual bool hasRangeSelection() const { return false;}
267 };
268 
269 
277 public:
278  dgbEMFaultStickSetTranslator(const char* unm,
279  const char* nm)
280  : dgbEMSurfaceTranslator(unm,nm) {}
282 
283 protected:
284  virtual bool readOnlyZ() const { return false;}
285  virtual bool writeOnlyZ() const { return false;}
286  virtual bool hasRangeSelection() const { return false;}
287 };
288 
289 
295 {
296 public:
297  EMFaultSet3DTranslator(const char* unm,
298  const char* nm)
299  : Translator(unm,nm) {}
301 
302  virtual Executor* writer(const EM::FaultSet3D&,const IOObj&) = 0;
303  virtual Executor* reader(EM::FaultSet3D&,const IOObj&) = 0;
304 };
305 
306 
309 public:
310  dgbEMFaultSet3DTranslator(const char* unm,
311  const char* nm)
312  : EMFaultSet3DTranslator(unm,nm) {}
314 
315  virtual Executor* writer(const EM::FaultSet3D&,const IOObj&);
316  virtual Executor* reader(EM::FaultSet3D&,const IOObj&);
317 
318 };
319 
320 
321 #endif
#define mExpClass(module)
Definition: commondefs.h:160
TranslatorGroup for EM::Horizon.
Definition: emsurfacetr.h:75
EM::FaultSet3D EMFaultSet3D
Definition: emsurfacetr.h:40
dgb EMSurfaceTranslator
Definition: emsurfacetr.h:184
virtual bool hasRangeSelection() const
Definition: emsurfacetr.h:247
virtual ~EMFaultSet3DTranslator()
Definition: emsurfacetr.h:300
TranslatorGroup for EM::Horizon2D.
Definition: emsurfacetr.h:62
Definition: ioobj.h:58
BufferString crfrom_
Definition: emsurfacetr.h:169
EM::Surface * surface_
Definition: emsurfacetr.h:165
uiString errMsg() const
Definition: emsurfacetr.h:150
virtual bool readOnlyZ() const
Definition: emsurfacetr.h:264
Data interesting for Surface I/O.
Definition: emsurfaceiodata.h:30
EM::Horizon3D EMHorizon3D
Definition: emsurfacetr.h:36
bool init()
EMFaultSet3DTranslator(const char *unm, const char *nm)
Definition: emsurfacetr.h:297
virtual Executor * reader(EM::Surface &)
Definition: emsurfacetr.h:140
dgbEMSurfaceTranslator for EM::FaultStickSet.
Definition: emsurfacetr.h:274
virtual bool hasRangeSelection() const
Definition: emsurfacetr.h:286
isTranslator(dgb, EMFaultStickSet) public
Definition: emsurfacetr.h:276
dgbEMSurfaceTranslator for EM::Fault3D.
Definition: emsurfacetr.h:255
dgbEMSurfaceTranslator for EM::Horizon3D.
Definition: emsurfacetr.h:213
EM::SurfaceIODataSelection sels_
Definition: emsurfacetr.h:168
EM::SurfaceIOData sd_
Definition: emsurfacetr.h:167
virtual Executor * getWriter()
Definition: emsurfacetr.h:173
Translator for EM::FaultSet3D.
Definition: emsurfacetr.h:294
virtual ~dgbEMFaultStickSetTranslator()
Definition: emsurfacetr.h:281
Definition: uistring.h:89
virtual bool writeOnlyZ() const
Definition: emsurfacetr.h:246
Definition: emsurfacetr.h:307
virtual bool writeOnlyZ() const
Definition: emsurfacetr.h:202
2D Horizon. The Horizon is only present along 2d lines, set by addLine. Each position&#39;s subid is form...
Definition: emhorizon2d.h:108
isTranslator(dgb, EMFault3D) public
Definition: emsurfacetr.h:256
#define mDefEmptyTranslatorGroupConstructor(clss)
Definition: transl.h:255
virtual bool prepWrite()
Definition: emsurfacetr.h:172
TranslatorGroup for EM::FaultSet3D.
Definition: emsurfacetr.h:99
TranslatorGroup for EM::FaultStickSet.
Definition: emsurfacetr.h:110
EMSurfaceTranslator(const char *nm, const char *unm)
Definition: emsurfacetr.h:126
Group of Translators. Has a static factory.
Definition: transl.h:56
TranslatorGroup for EM::Fault3D.
Definition: emsurfacetr.h:86
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
virtual Executor * getAuxdataReader(EM::Surface &, int)
Definition: emsurfacetr.h:144
virtual bool writeOnlyZ() const
Definition: emsurfacetr.h:265
mDefEmptyTranslatorGroupConstructor(EMFault3D) const char *defExtension() const
Definition: emsurfacetr.h:89
Fault stick set.
Definition: emfaultstickset.h:100
virtual bool readOnlyZ() const
Definition: emsurfacetr.h:201
FixedString Horizon()
Definition: keystrs.h:72
EM::SurfaceIODataSelection & selections()
Definition: emsurfacetr.h:138
isTranslator(dgb, EMHorizon2D) public
Definition: emsurfacetr.h:237
virtual bool hasRangeSelection() const
Definition: emsurfacetr.h:266
dgbEMSurfaceTranslator for EM::Horizon2D.
Definition: emsurfacetr.h:236
void setCreatedFrom(const char *src)
Definition: emsurfacetr.h:159
EM::FaultStickSet EMFaultStickSet
Definition: emsurfacetr.h:41
virtual Executor * getAuxdataWriter(const EM::Surface &, int, bool overwt=false)
Definition: emsurfacetr.h:146
virtual bool prepRead()
Definition: emsurfacetr.h:171
Surface Reader.
Definition: emsurfaceio.h:46
I/O Interpreter class for a certain object type.
Definition: transl.h:123
EM::Horizon EMAnyHorizon
Definition: emsurfacetr.h:38
isTranslator(dgb, EMHorizon3D) public
Definition: emsurfacetr.h:214
virtual bool readOnlyZ() const
Definition: emsurfacetr.h:226
EM::Fault3D EMFault3D
Definition: emsurfacetr.h:39
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual bool hasRangeSelection() const
Definition: emsurfacetr.h:228
virtual bool writeOnlyZ() const
Definition: emsurfacetr.h:227
virtual bool hasRangeSelection() const
Definition: emsurfacetr.h:203
FixedString Surface()
Definition: keystrs.h:126
3D FaultSet
Definition: emfaultset3d.h:26
uiString errmsg_
Definition: emsurfacetr.h:166
BufferString errmsg_
Definition: horizontracker.h:119
EM::dgbSurfaceReader * reader_
Definition: emsurfacetr.h:205
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
virtual ~dgbEMFaultSet3DTranslator()
Definition: emsurfacetr.h:313
3D Fault
Definition: emfault3d.h:78
virtual bool writeOnlyZ() const
Definition: emsurfacetr.h:285
mDefEmptyTranslatorGroupConstructor(EMFaultStickSet) const char *defExtension() const
Definition: emsurfacetr.h:113
TranslatorGroup for EM::Horizon3D. Reads/writes 3D EM::Horizon3D to storage.
Definition: emsurfacetr.h:49
IOObj * ioobj_
Definition: emsurfacetr.h:164
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
EM::Horizon2D EMHorizon2D
Definition: emsurfacetr.h:37
virtual bool readOnlyZ() const
Definition: emsurfacetr.h:284
isTranslator(dgb, EMFaultSet3D) public
Definition: emsurfacetr.h:308
#define isTranslatorGroup(clss)
Definition: transl.h:206
Translator for EM::Surface.
Definition: emsurfacetr.h:123
Surface I/O data selection.
Definition: emsurfaceiodata.h:62
CallBacks object-oriented (object + method).
Definition: callback.h:57
virtual ~dgbEMHorizon2DTranslator()
Definition: emsurfacetr.h:242
virtual bool readOnlyZ() const
Definition: emsurfacetr.h:245
Horizon Surface.
Definition: emhorizon.h:47
virtual ~dgbEMFault3DTranslator()
Definition: emsurfacetr.h:261
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
virtual ~dgbEMHorizon3DTranslator()
Definition: emsurfacetr.h:219

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