UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_seismic_view.hpp
1 /* zq_seismic_view.hpp */
2 /* $Id: zq_seismic_view.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 #ifndef __zq_seismic_view_hpp
4 #define __zq_seismic_view_hpp
5 
6 #include "zd_seismic_file.hpp"
7 #include "zq_seismic_trace.hpp"
8 
11 #define TIP_AMPL (10000+1)
12 
15 #define TIP_SAMPLE (10000+2)
16 
19 #define TIP_TIME (10000+3)
20 
23 #define TIP_COORD1 (10000+4)
24 
25 
34 class ZqSeismicView : public ZqView
35 {
36 public:
37 
40  ZqSeismicView (ZqbNatGroup& rNatTime, ZqbNatGroup& rNatCoord,
41  const char* szName = NULL);
42 
45  ZqSeismicView (ZqbNatGroup& rNatTime, ZqbNatGroup& rNatCoord,
46  ZqbPlaceholder* pPh, const char* szName = NULL);
47 
48 
51 
54 
55 
56  /*
57  * Properties
58  */
59 
62 
66  int getLedgeSize () const;
67 
68 
69  /*
70  * Run-time type identification facility
71  */
72 
76  virtual bool compatibleDoc (const ZdDocument* pDoc) const;
77 
78 
79  /*
80  * Data control
81  */
82 
85  virtual void attachFile (ZdSeismicFile* pFile);
86 
90  virtual void detachDoc ();
91 
93  virtual ZdSeismicFile* file ();
94 
95 
96  /*
97  * Dynamic tips
98  */
99 
107  virtual bool tip (const QPoint& p, QString& qsShort, QString& qsLong);
108 
113  virtual void setTipContents (std::vector<int>& hwlist);
114 
119  virtual void setTipContents (int n, /* ids */...);
120 
123  virtual const std::vector<int>& getTipContents () const;
124 
125 
126  /*
127  * Drawing
128  */
129 
131  struct Trace {
132  int m_iIndex;
133  int m_iTraceId;
134  int m_iEnsIndex;
135  int m_iPixCoord;
136  double m_fPseudoCoord;
137  double m_fNatCoord;
139  double m_fEnsAmax;
142  bool operator== (const Trace& tr) const {
143  return m_iTraceId == tr.m_iTraceId;
144  }
145 
147  bool operator< (const Trace& tr) const {
148  return m_fPseudoCoord < tr.m_fPseudoCoord;
149  }
150  };
151 
154  std::vector<Trace> m_vVisTrace;
155 
157  std::map<int,Trace*> m_mVisTrace;
158 
160  float m_fGlobalAmax;
161 
162 
167  //ZdFVectorFloat *m_pAmplDistrib;
168 
171  //std::vector<float> m_vCoord, m_vAmax;
172 
173 
174 
177  virtual bool traceAt (QPoint p, Trace& rTraceLoc);
178 
182  virtual bool traceAt (double fPseudoCoord, Trace& rTraceLoc);
183 
184 
186  virtual void redraw (QPainter& paint);
187 
190  virtual void updateView();
191 
192 protected:
193 
195  void normTrace (ZqSeismicTrace& seistr, float mm[2], float fEnsAmax);
196 
199  void drawEnsBrackets (QPainter& paint);
200 
202  int m_nHalfHeight;
203 
205  std::vector<int> m_vTipHW;
206 
208  void map_redraw(QPainter& paint);
209 
211  void wiggle_redraw(QPainter& paint);
212 
213 private:
214 
216  void set_proper_nat_coords_ranges();
217 
219  static int s_iNameCounter;
220 
221 };
222 
223 
224 #endif /* zq_seismic_view.hpp */
int m_nHalfHeight
Definition: zq_seismic_view.hpp:200
virtual bool compatibleDoc(const ZdDocument *pDoc) const
void normTrace(ZqSeismicTrace &seistr, float mm[2], float fEnsAmax)
double m_fEnsAmax
Definition: zq_seismic_view.hpp:141
ZqbSVOptions m_Options
Definition: zq_seismic_view.hpp:63
int m_iTraceId
Definition: zq_seismic_view.hpp:135
int getLedgeSize() const
virtual void updateView()
Definition: zqb_natgroup.hpp:35
std::vector< int > m_vTipHW
Definition: zq_seismic_view.hpp:203
virtual void attachFile(ZdSeismicFile *pFile)
int m_iIndex
Definition: zq_seismic_view.hpp:134
Definition: zqb_placeholder.hpp:25
virtual const std::vector< int > & getTipContents() const
float m_fGlobalAmax
Definition: zq_seismic_view.hpp:162
virtual bool tip(const QPoint &p, QString &qsShort, QString &qsLong)
virtual ZdSeismicFile * file()
void map_redraw(QPainter &paint)
void drawEnsBrackets(QPainter &paint)
virtual void detachDoc()
Definition: zd_seismic_file.hpp:17
virtual void setTipContents(std::vector< int > &hwlist)
Definition: zq_view.hpp:18
Definition: zq_seismic_view.hpp:36
ZqSeismicView(ZqbNatGroup &rNatTime, ZqbNatGroup &rNatCoord, const char *szName=NULL)
double m_fPseudoCoord
Definition: zq_seismic_view.hpp:138
Definition: zq_seismic_trace.hpp:38
ZqbNatGrpMember m_Time
Definition: zq_seismic_view.hpp:52
int m_iPixCoord
Definition: zq_seismic_view.hpp:137
void wiggle_redraw(QPainter &paint)
Definition: trace.hpp:14
Definition: zqb_svoptions.hpp:139
Definition: zd_document.hpp:16
virtual void redraw()
Definition: zqb_visible.hpp:82
Definition: zq_seismic_view.hpp:133
virtual bool traceAt(QPoint p, Trace &rTraceLoc)
std::vector< Trace > m_vVisTrace
Definition: zq_seismic_view.hpp:156
double m_fNatCoord
Definition: zq_seismic_view.hpp:139
bool operator==(const Trace &tr) const
Definition: zq_seismic_view.hpp:144
bool operator<(const Trace &tr) const
Definition: zq_seismic_view.hpp:149
Definition: zqb_natgrpmember.hpp:26
ZqbNatGrpMember m_Coord
Definition: zq_seismic_view.hpp:55
std::map< int, Trace * > m_mVisTrace
Definition: zq_seismic_view.hpp:159
int m_iEnsIndex
Definition: zq_seismic_view.hpp:136