UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZtSeismicTrace.H
1 /* ZtSeismicTrace.H */
2 /* $Id: ZtSeismicTrace.H,v 3.10 2004/02/17 13:53:38 vlad Exp $ */
3 #ifndef __ZtSeismicTrace_H
4 #define __ZtSeismicTrace_H
5 
6 
7 #include <zm/ZtObject.H>
8 #include <zm/ZScaledPalette.H>
9 #include <zm/ZBarDraw.H>
10 #include <zm/ZSVOptions.H>
11 
12 
17 struct ZTraceNode
18 {
19  float time;
20  float ampl;
21 };
22 
23 #define AnyType ZTraceNode
24 #define AnyAr ZTraceNodeAr
25 #define AnyFormatSpec "\n%d: ampl[%g]=%g"
26 #define AnyPrintList i, item.time, item.ampl
27 #define AnyArQuant 500
28 #define AnyArVolume 3000
29 #include <mix/AnyAr.H>
30 
31 
33 class ZtSeismicView;
34 
35 
46 class ZtSeismicTrace : public ZtObject, public ZScaledPalette
47 {
48 public:
49 
53  ZtSeismicTrace (ZtMain* pManager,
54  ZGroupId pxid, ZGroupId pyid,
55  ZGroupId nxid, ZGroupId nyid,
56  ZDimension timeorient);
57 
59  ZtSeismicTrace (ZtMain* pManager,
60  ZGroupId pxid_int, ZGroupId pyid_int,
61  ZGroupId pxid_ext, ZGroupId pyid_ext,
62  ZGroupId nxid, ZGroupId nyid,
63  ZDimension timeorient);
64 
67  void describe_data (unsigned n_samples, float dt, float t0 = 0.0);
68 
70  void describe_data (const ZTracePar& ztp);
71 
75  void attach_data (float coord, const float* body,
76  const ZTracePar* ptrpar = NULL);
77 
80  void detach_data ();
81 
83  Logic get_status_of_data () const;
84 
88  virtual void draw_trace (float coord, int half_area,
89  const float* body,
90  const ZTracePar* ptrpar = NULL);
91 
94  virtual void outline_trace (const float* body,
95  ZTraceNodeAr& outline,
96  const ZTracePar* ptrpar = NULL);
97 
99  virtual void extent_rect (ZRect& res);
100 
102  virtual void redraw ();
103 
106  virtual Logic belong (int px, int py) const;
107 
110  static float get_ampl (float t, const ZTracePar& ztp, const float* body);
111 
112  /*********************************************************************
113  * Properties of the object
114  *********************************************************************/
115 
118  virtual void set_options (const ZSVOptions& svo,
119  int svo_mask = ~0);
120 
122  virtual void get_options (ZSVOptions& svo,
123  int svo_mask = ~0) const;
124 
126  virtual const ZSVOptions& get_options () const;
127 
129  void set_max_ampl (float ma);
130 
132  float get_max_ampl () const;
133 
134 
139  void set_pixel_height (int ph);
140 
142  void sync_pixel_height_from (ZtSeismicView* vSV, float fGain = 1.0);
143 
145  void sync_pixel_height_from (ZtSeismicTrace* vST, float fGain = 1.0);
146 
149  int get_pixel_height () const;
150 
151 
154  void set_bar_draw (ZBarDraw* pdr);
155 
158  ZBarDraw* get_bar_draw () const;
159 
161  virtual const char* class_id () const;
162 
164  void set_time2coord (int n, const float* t, const float* c);
165 
167  void reset_time2coord ();
168 
169 protected:
170 
174 
178 
179  ZDimension time_orient;
181  Logic attached;
183  float *tr_body;
184  float tr_coord;
194 
197 
200 
201  float tr_max_ampl;
210  const ZTracePar& check_trace_par (const ZTracePar* ptrpar) const;
211 
215  int n_t2c;
216  float *time_t2c, *coord_t2c;
217 };
218 
219 
220 #endif /* ZtSeismicTrace.H */
int n_t2c
Definition: ZtSeismicTrace.H:215
virtual Logic belong(int px, int py) const
Logic attached
Definition: ZtSeismicTrace.H:181
Definition: ZBase.H:87
Logic get_status_of_data() const
Definition: ZtSeismicView.H:30
void reset_time2coord()
float tr_max_ampl
Definition: ZtSeismicTrace.H:201
void sync_pixel_height_from(ZtSeismicView *vSV, float fGain=1.0)
virtual void draw_trace(float coord, int half_area, const float *body, const ZTracePar *ptrpar=NULL)
float ph_sync_gain
Definition: ZtSeismicTrace.H:199
Definition: ZtSeismicTrace.H:46
Definition: ZSVOptions.H:129
virtual const ZSVOptions & get_options() const
ZtSeismicTrace(ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid, ZDimension timeorient)
virtual void set_options(const ZSVOptions &svo, int svo_mask=~0)
virtual const char * class_id() const
Definition: ZtMain.H:32
ZTracePar * trpar
Definition: ZtSeismicTrace.H:185
void set_bar_draw(ZBarDraw *pdr)
Definition: ZPixelCoord.H:102
virtual void outline_trace(const float *body, ZTraceNodeAr &outline, const ZTracePar *ptrpar=NULL)
ZBarDraw * ext_drawer
Definition: ZtSeismicTrace.H:206
ZSVOptions options
Definition: ZtSeismicTrace.H:190
ZBarDraw * get_bar_draw() const
ZPCoordSlave py_ext
Definition: ZtSeismicTrace.H:177
Definition: ZTracePar.H:13
float tr_coord
Definition: ZtSeismicTrace.H:184
ZtSeismicView * ph_sync_from_sv
Definition: ZtSeismicTrace.H:193
Definition: ZtObject.H:57
float get_max_ampl() const
float ampl
Definition: ZtSeismicTrace.H:20
int get_pixel_height() const
void describe_data(unsigned n_samples, float dt, float t0=0.0)
Definition: ZScaledPalette.H:15
void detach_data()
float time
Definition: ZtSeismicTrace.H:19
float * tr_body
Definition: ZtSeismicTrace.H:183
ZPCoordSlave px_ext
Definition: ZtSeismicTrace.H:173
Definition: ZBarDraw.H:19
const ZTracePar & check_trace_par(const ZTracePar *ptrpar) const
ZPCoordSlave px
Definition: ZtObject.H:203
static float get_ampl(float t, const ZTracePar &ztp, const float *body)
void set_pixel_height(int ph)
int pixel_height
Definition: ZtSeismicTrace.H:187
Definition: ZtSeismicTrace.H:17
virtual void redraw()
ZPCoordSlave py
Definition: ZtObject.H:204
ZDimension time_orient
Definition: ZtSeismicTrace.H:179
ZtSeismicTrace * ph_sync_from_st
Definition: ZtSeismicTrace.H:196
void set_time2coord(int n, const float *t, const float *c)
virtual void extent_rect(ZRect &res)
void attach_data(float coord, const float *body, const ZTracePar *ptrpar=NULL)
void set_max_ampl(float ma)