UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZSVOptions.H
1 /* ZSVOptions.H */
2 /* $Id: ZSVOptions.H,v 3.8 2003/11/27 12:01:23 vlad Exp $ */
3 #ifndef __ZSVOptions_H
4 #define __ZSVOptions_H
5 
6 #include <mix/Types.h>
7 
8 #include <zm/ZScaledPalette.H>
9 #include <zm/ZTracePar.H>
10 
11 
12 /***********************************************************************
13  *
14  * Seismic visualization options
15  *
16  ***********************************************************************/
17 
18 typedef enum
19 {
20  ZsvMapCoding,
21  ZsvDivCoding
22 } ZsvDrawingMode;
23 
24 typedef enum
25 {
26  ZsvDontDrawZero,
27  ZsvSpecColor,
28  ZsvUsualColor
29 } ZsvZeroDrawMode;
30 
31 typedef enum
32 {
33  ZsvDontDraw,
34  ZsvThinLine,
35  ZsvFillLedge
36 } ZsvAmplDrawMode;
37 
38 typedef enum
39 {
40  ZsvNoGainControl,
41  ZsvAGC
42 } ZsvGainCtrlMode;
43 
44 typedef enum
45 {
46  ZsvTraceBased,
47  ZsvEnsBased,
48  ZsvProfileBased
49 } ZsvNormMode;
50 
51 typedef enum
52 {
53  ZsvViewVSP,
54  ZsvViewS2D
55 } ZsvTraceView;
56 
57 typedef enum
58 {
59  ZsvCommonColor,
60  ZsvCommonPalette,
61  ZsvPosColorNegColor,
62  ZsvPosPaletteNegColor,
63  ZsvPosColorNegPalette,
64  ZsvPosPaletteNegPalette
65 } ZsvDivColorMode;
66 
67 typedef enum
68 {
69  ZsvFirstOnly,
70  ZsvMultiUniform,
71  ZsvMultiColors,
72  ZsvMultiColorsThin
73  /* ZsvMultiColors and ZsvMultiColorsThin changes color palette
74  application to the traces: palette is used just as color pixel
75  vector, [0] is used for drawing the first trace from ensemble,
76  [1] - for 2nd etc, extra traces got black color */
77 } ZsvEnsDrawMode;
80 /* Mask of parameters */
81 #define svDrawingMode (1<<0)
82 #define svZeroDrawMode (1<<1)
83 #define svSpecZeroColor (1<<2)
84 #define svAlmostZeroThd (1<<3)
85 #define svPosDrawMode (1<<4)
86 #define svNegDrawMode (1<<5)
87 #define svGainCtrlMode (1<<6)
88 #define svAgcGap (1<<7)
89 #define svNormMode (1<<8)
90 #define svTraceView (1<<9)
91 #define svCutLevel (1<<10)
92 //#define svProfileAmax (1<<11)
93 #define svDivColorMode (1<<12)
94 #define svCommonColpal (1<<13)
95 #define svPosAmplColpal (1<<14)
96 #define svNegAmplColpal (1<<15)
97 #define svInvertComPal (1<<16)
98 #define svInvertPosPal (1<<17)
99 #define svInvertNegPal (1<<18)
100 #define svUseAmplRange (1<<19)
101 #define svAmplRange (1<<20)
102 #define svEnsDrawMode (1<<21)
103 #define svEnsSplitDelta (1<<22)
104 #define svDivAmplGain (1<<23)
105 
106 
107 /*
108  * Useful subsets of seismic view options:
109  */
110 
112 #define svGainNormModes (svGainCtrlMode|svNormMode|svAgcGap|\
113  svDivAmplGain|svCutLevel)
114 
116 #define svWiggleControl (svPosDrawMode|svNegDrawMode)
117 
119 #define svColorSeismic (svDivColorMode|\
120  svCommonColpal|svInvertComPal|\
121  svPosAmplColpal|svInvertPosPal|\
122  svNegAmplColpal|svInvertNegPal)
123 
124 
130 {
131 private:
132 
134  struct {
139  } allocated;
140 
142  ZTracePar *trpar;
143 
144 public:
145 
146  ZsvDrawingMode drawing_mode;
147  ZsvZeroDrawMode zero_draw_mode;
148  char* spec_zero_color;
150  ZsvAmplDrawMode pos_draw_mode;
151  ZsvAmplDrawMode neg_draw_mode;
152  ZsvGainCtrlMode gain_ctrl_mode;
153  float agc_gap;
154  ZsvNormMode norm_mode;
155  ZsvTraceView trace_view;
156  float cut_level;
157  ZsvDivColorMode div_color_mode;
158  char* common_colpal;
159  char* pos_ampl_colpal;
160  char* neg_ampl_colpal;
165  float ampl_range[2];
166  ZsvEnsDrawMode ens_draw_mode;
170  ZSVOptions ();
171  ZSVOptions (const ZSVOptions& svo);
172  ~ZSVOptions ();
173 
175  ZSVOptions& operator= (const ZSVOptions& svo);
176 
178  ZSVOptions& assign (const ZSVOptions& svo, int mask = ~0);
179 
180 
182  void by_default ();
183 
184  /* TODO: Save and Load methods for seismic view options for specific
185  tasks (processing, interpretation) and seismic data objects
186  (Sxxx) */
187 
191  void build_palette (ZScaledPalette& spal, float mm[2]) const;
192 
195  void setup_trace_par (const ZTracePar& trpar);
196 
201  void gain_control_prepare (float* w, const float* src,
202  float* wmax = NULL,
203  const ZTracePar* ptrpar = NULL) const;
204 
209  void gain_control_apply (float* dst, const float* src,
210  const float* w, float mm[2] = NULL,
211  const ZTracePar* ptrpar = NULL) const;
212 
215  void new_colpal (int mWhichColpal, const char* szColPal);
216 
220  void reset_colpal (int mWhichColpal);
221 
222 };
223 
224 
225 #endif /* ZSVOptions.H */
float ens_split_delta
Definition: ZSVOptions.H:167
void setup_trace_par(const ZTracePar &trpar)
char * spec_zero_color
Definition: ZSVOptions.H:135
ZsvNormMode norm_mode
Definition: ZSVOptions.H:154
Definition: ZSVOptions.H:129
ZsvDivColorMode div_color_mode
Definition: ZSVOptions.H:157
Logic invert_com_pal
Definition: ZSVOptions.H:161
ZsvDrawingMode drawing_mode
Definition: ZSVOptions.H:146
float ampl_range[2]
Definition: ZSVOptions.H:165
char * neg_ampl_colpal
Definition: ZSVOptions.H:138
ZSVOptions & operator=(const ZSVOptions &svo)
ZSVOptions & assign(const ZSVOptions &svo, int mask=~0)
float div_ampl_gain
Definition: ZSVOptions.H:168
ZsvAmplDrawMode neg_draw_mode
Definition: ZSVOptions.H:151
Logic invert_pos_pal
Definition: ZSVOptions.H:162
float almost_zero_thd
Definition: ZSVOptions.H:149
void build_palette(ZScaledPalette &spal, float mm[2]) const
ZsvZeroDrawMode zero_draw_mode
Definition: ZSVOptions.H:147
Definition: ZTracePar.H:13
float cut_level
Definition: ZSVOptions.H:156
Logic invert_neg_pal
Definition: ZSVOptions.H:163
Definition: ZScaledPalette.H:15
void new_colpal(int mWhichColpal, const char *szColPal)
Logic use_ampl_range
Definition: ZSVOptions.H:164
ZsvAmplDrawMode pos_draw_mode
Definition: ZSVOptions.H:150
void reset_colpal(int mWhichColpal)
ZsvGainCtrlMode gain_ctrl_mode
Definition: ZSVOptions.H:152
void by_default()
char * common_colpal
Definition: ZSVOptions.H:136
char * pos_ampl_colpal
Definition: ZSVOptions.H:137
void gain_control_apply(float *dst, const float *src, const float *w, float mm[2]=NULL, const ZTracePar *ptrpar=NULL) const
ZsvTraceView trace_view
Definition: ZSVOptions.H:155
float agc_gap
Definition: ZSVOptions.H:153
void gain_control_prepare(float *w, const float *src, float *wmax=NULL, const ZTracePar *ptrpar=NULL) const
ZsvEnsDrawMode ens_draw_mode
Definition: ZSVOptions.H:166