UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ZtSeismicTrace Class Reference

#include <ZtSeismicTrace.H>

Inheritance diagram for ZtSeismicTrace:
ZtObject ZScaledPalette ZDrawable ZRect ZPalette ZGEnv ZPoint ZSize ZConnect ZConnect

Public Member Functions

 ZtSeismicTrace (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid, ZDimension timeorient)
 
 ZtSeismicTrace (ZtMain *pManager, ZGroupId pxid_int, ZGroupId pyid_int, ZGroupId pxid_ext, ZGroupId pyid_ext, ZGroupId nxid, ZGroupId nyid, ZDimension timeorient)
 
void describe_data (unsigned n_samples, float dt, float t0=0.0)
 
void describe_data (const ZTracePar &ztp)
 
void attach_data (float coord, const float *body, const ZTracePar *ptrpar=NULL)
 
void detach_data ()
 
Logic get_status_of_data () const
 
virtual void draw_trace (float coord, int half_area, const float *body, const ZTracePar *ptrpar=NULL)
 
virtual void outline_trace (const float *body, ZTraceNodeAr &outline, const ZTracePar *ptrpar=NULL)
 
virtual void extent_rect (ZRect &res)
 
virtual void redraw ()
 
virtual Logic belong (int px, int py) const
 
virtual void set_options (const ZSVOptions &svo, int svo_mask=~0)
 
virtual void get_options (ZSVOptions &svo, int svo_mask=~0) const
 
virtual const ZSVOptionsget_options () const
 
void set_max_ampl (float ma)
 
float get_max_ampl () const
 
void set_pixel_height (int ph)
 
void sync_pixel_height_from (ZtSeismicView *vSV, float fGain=1.0)
 
void sync_pixel_height_from (ZtSeismicTrace *vST, float fGain=1.0)
 
int get_pixel_height () const
 
void set_bar_draw (ZBarDraw *pdr)
 
ZBarDrawget_bar_draw () const
 
virtual const char * class_id () const
 
void set_time2coord (int n, const float *t, const float *c)
 
void reset_time2coord ()
 
- Public Member Functions inherited from ZtObject
 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid)
 
 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZDimension dim, ZGroupId nid)
 
 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid)
 
 ZtObject (const ZtObject &zobj)
 
ZtMainget_manager () const
 
virtual void prepare_xywh ()
 
ZNCoordSlavenx () const
 
ZNCoordSlaveny () const
 
Logic is_vertical () const
 
Logic is_horizontal () const
 
float x_p2n (int pcoord) const
 
float y_p2n (int pcoord) const
 
int x_n2p (float ncoord) const
 
int y_n2p (float ncoord) const
 
Logic clip_line_by_rect (float sx[2], float sy[2]) const
 
Logic clip_line_by_rect (int sx[2], int sy[2]) const
 
Logic clip_line_by_rect (float sx[2], float sy[2], float nx[2], float ny[2]) const
 
Logic clip_line_by_rect (float sx[2], float sy[2], int px[2], int py[2]) const
 
Logic clip_rect_by_rect (float rcx[2], float rcy[2]) const
 
Logic clip_rect_by_rect (float rx[2], float ry[2], float cx[2], float cy[2]) const
 
void seldom_redraw (Logic flag)
 
Logic is_seldom_redraw () const
 
void changes ()
 
void done ()
 
Logic is_changed () const
 
virtual void expose ()
 
virtual void can_hear_events (Logic flag)
 
Logic is_deaf () const
 
virtual ZInputStatus input (const XEvent *xev)
 
virtual void show ()
 
virtual void hide ()
 
Logic is_hidden () const
 
void raise_exch ()
 
void raise_shift ()
 
void wePutMsg (int elevel, const char *s)
 
void weFormatMsg (int elevel, const char *format,...)
 
void put_msg (int elevel, const char *format, va_list val)
 
void format_msg (int elevel, const char *format,...)
 
void set_info_lines (InfoLine *il)
 
InfoLineget_info_lines () const
 
- Public Member Functions inherited from ZDrawable
 ZDrawable (const ZConnect &zconnect, Drawable drawable)
 
 ZDrawable (const ZDrawable &zdrawable)
 
virtual ZRect rect () const
 
void draw_text (int x, int y, int attachment, const char *szText) const
 
void draw_text (const ZRect &box, int alignment, const char *szText) const
 
void write_tiff (const char *path, ZmImageRemarks *remarks=NULL)
 
void write_png (const char *path, ZmImageRemarks *remarks=NULL)
 
- Public Member Functions inherited from ZGEnv
 ZGEnv (const ZConnect &zconnect)
 
 ZGEnv (const ZGEnv &zgenv)
 
void set_foreground (const char *szColorName)
 
void set_foreground (ColorPixel cp)
 
ColorPixel get_foreground () const
 
const char * get_foreground_name () const
 
void set_background (const char *szColorName)
 
void set_background (ColorPixel cp)
 
ColorPixel get_background () const
 
const char * get_background_name () const
 
void swap_ground ()
 
void assign (const ZGEnv &zgenv)
 
void set_line_width (int new_width)
 
int get_line_width () const
 
void set_line_style (int new_style, int dash=3, int hole=3)
 
int get_line_style () const
 
void set_font (const char *szFontName)
 
void set_font_as (const ZGEnv &zgenv)
 
Font get_font () const
 
const char * get_font_name () const
 
int text_width (const char *szText) const
 
int text_width (int n) const
 
int text_height () const
 
int text_ascent () const
 
int text_descent () const
 
ZRect text_rect (int x, int y, int attachment, const char *szText) const
 
virtual void changed_state (int mask_of_changes)
 
ZGEnvoperator= (const ZGEnv &zgenv)
 
- Public Member Functions inherited from ZConnect
 ZConnect (Display *display)
 
 ZConnect (const ZConnect &zconnect)
 
void flush ()
 
void x_error (int code) const
 
ZRect rect (Drawable drawable) const
 
int depth (Drawable drawable) const
 
Window root_wid () const
 
ColorPixel white () const
 
ColorPixel black () const
 
ColorPixel color (const char *szColorName) const
 
- Public Member Functions inherited from ZRect
 ZRect (const ZPoint &zpoint1, const ZPoint &zpoint2)
 
 ZRect (const ZPoint &zpoint, const ZSize &zsize, ZCorner zcorner=zcLeftTop)
 
 ZRect (const ZRect &zrect)
 
virtual void move (const ZPoint &zpoint, ZCorner zcorner=zcLeftTop)
 
virtual Logic inside (const ZPoint &zpoint) const
 
virtual operator XRectangle () const
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZRect &zrect) const
 
bool operator!= (const ZRect &zrect) const
 
- Public Member Functions inherited from ZPoint
 ZPoint (int x_coord, int y_coord)
 
 ZPoint (const ZPoint &zpoint)
 
 operator XPoint () const
 
void add_offset (const ZSize &zsize)
 
void sub_offset (const ZSize &zsize)
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZPoint &zpoint) const
 
bool operator!= (const ZPoint &zpoint) const
 
- Public Member Functions inherited from ZSize
 ZSize (int width, int height)
 
 ZSize (const ZSize &zsize)
 
void difference (const ZPoint &zpoint1, const ZPoint &zpoint2)
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZSize &zsize) const
 
bool operator!= (const ZSize &zsize) const
 
- Public Member Functions inherited from ZScaledPalette
 ZScaledPalette (const ZConnect &zconnect)
 
 ZScaledPalette (const ZPalette &zpal)
 
 ZScaledPalette (const ZScaledPalette &zpal)
 
unsigned coord_to_index (float coord) const
 
void index_to_coord_range (unsigned index, float coord[2]) const
 
void get_scale (FloatAr &scale)
 
ColorPixel color (float coord) const
 
const char * color_name (float coord) const
 
ColorPixel & fetch_color (float coord)
 
ColorPixel & operator[] (float coord)
 
virtual void remove_color (float coord)
 
void scale_assign (const FloatAr &scale)
 
void scale_equal_range (float mm[2])
 
virtual void add_color (ColorPixel theColorPixel)
 
virtual void insert_color (unsigned index, ColorPixel theColorPixel)
 
virtual void remove_color (unsigned index)
 
virtual void reset_colors ()
 
virtual void revert_order ()
 
- Public Member Functions inherited from ZPalette
 ZPalette (const ZConnect &zconnect)
 
 ZPalette (const ZPalette &zpal)
 
virtual ~ZPalette ()
 
virtual void set_smooth_rate (int n=100)
 
virtual void load_palette (const char *szPalName)
 
virtual void append_palette (const char *szPalName)
 
virtual void add_color (const char *szColorName)
 
virtual void add_color (float rgb[3])
 
virtual void insert_color (unsigned index, const char *szColorName)
 
virtual void insert_color (unsigned index, float rgb[3])
 
unsigned colors_count () const
 
ColorPixel color (unsigned index) const
 
const char * color_name (unsigned index) const
 
ColorPixel & fetch_color (unsigned index)
 
ColorPixel & operator[] (unsigned index)
 
Pixmap draw_palette (const ZSize &zs, Logic bReverse=FALSE, ZDimension dim=zdHorizontal) const
 

Static Public Member Functions

static float get_ampl (float t, const ZTracePar &ztp, const float *body)
 

Protected Member Functions

const ZTraceParcheck_trace_par (const ZTracePar *ptrpar) const
 
- Protected Member Functions inherited from ZGEnv
void draw_text (Drawable id, int x, int y, int attachment, const char *szText) const
 
void draw_text (Drawable id, const ZRect &box, int alignment, const char *szText) const
 

Protected Attributes

ZPCoordSlave px_ext
 
ZPCoordSlave py_ext
 
ZDimension time_orient
 
Logic attached
 
float * tr_body
 
float tr_coord
 
ZTracePartrpar
 
int pixel_height
 
ZSVOptions options
 
ZtSeismicViewph_sync_from_sv
 
ZtSeismicTraceph_sync_from_st
 
float ph_sync_gain
 
float tr_max_ampl
 
ZBarDrawext_drawer
 
int n_t2c
 
float * time_t2c
 
float * coord_t2c
 
- Protected Attributes inherited from ZtObject
InfoLinepInfoLine
 
ZNCoordSlavepnx
 
ZNCoordSlavepny
 
ZtMainmanager
 
- Protected Attributes inherited from ZScaledPalette
FloatAr rb
 
- Protected Attributes inherited from ZPalette
int nSmooth
 

Additional Inherited Members

- Public Attributes inherited from ZtObject
ZPCoordSlave px
 
ZPCoordSlave py
 
float belong_eps
 
- Public Attributes inherited from ZDrawable
Drawable did
 
- Public Attributes inherited from ZGEnv
GC gc
 
XFontStruct * font
 
- Public Attributes inherited from ZConnect
Display * dpy
 
ScreenNo scr_no
 
- Public Attributes inherited from ZPoint
int x
 
int y
 
- Public Attributes inherited from ZSize
int w
 
int h
 

Detailed Description

Object for seismic trace drawing in wiggle mode. Two main ways of usage is supposed: 1) trace body is attached permanently and redrawn automatically until detach operation; *** single trace mode *** 2) preparation for data is made but not trace is attached; some external method calls for draw_data() for many traces instead. No gain control procedures are applied here! Do them outside.

Constructor & Destructor Documentation

ZtSeismicTrace::ZtSeismicTrace ( ZtMain pManager,
ZGroupId  pxid,
ZGroupId  pyid,
ZGroupId  nxid,
ZGroupId  nyid,
ZDimension  timeorient 
)

Seismic trace constructor. Argument zdVertical means time axis is vertical (CDP usual) and zdHorizontal means time axis is horizontal (VSP preference).

ZtSeismicTrace::ZtSeismicTrace ( ZtMain pManager,
ZGroupId  pxid_int,
ZGroupId  pyid_int,
ZGroupId  pxid_ext,
ZGroupId  pyid_ext,
ZGroupId  nxid,
ZGroupId  nyid,
ZDimension  timeorient 
)

The same, but with external bounds

Member Function Documentation

void ZtSeismicTrace::attach_data ( float  coord,
const float *  body,
const ZTracePar ptrpar = NULL 
)

Attach trace body supplying the information about trace coordinate and starting-ending of actual samples. The attached trace is redrawn permanently until detach.

virtual Logic ZtSeismicTrace::belong ( int  px,
int  py 
) const
virtual

Self-location: returns TRUE if point belongs to object and FALSE otherwise.

Reimplemented from ZtObject.

const ZTracePar& ZtSeismicTrace::check_trace_par ( const ZTracePar ptrpar) const
protected

Check trace parameters and return good reference in case of success or throw exceptions otherwise

virtual const char* ZtSeismicTrace::class_id ( ) const
virtual

Self-identification.

Reimplemented from ZtObject.

void ZtSeismicTrace::describe_data ( unsigned  n_samples,
float  dt,
float  t0 = 0.0 
)

Describe data: number of samples, sampling rate, time of the first sample. Some allocation and preparation is made here.

void ZtSeismicTrace::describe_data ( const ZTracePar ztp)

Describe data from seismic trace parameters.

void ZtSeismicTrace::detach_data ( )

Simply detach trace body but don't release memory, allocated in describe_data() method.

virtual void ZtSeismicTrace::draw_trace ( float  coord,
int  half_area,
const float *  body,
const ZTracePar ptrpar = NULL 
)
virtual

Superdirect draw procedure for exact trace body without making copy of it in intermediate buffer. ZsvDivCoding is used in rectangle around given coordinate in given pixel area

virtual void ZtSeismicTrace::extent_rect ( ZRect res)
virtual

Determine real pixel rectangle where object wants to redraw

Reimplemented from ZtObject.

static float ZtSeismicTrace::get_ampl ( float  t,
const ZTracePar ztp,
const float *  body 
)
static

Compute interpolated amplitude at t time on the given trace body.

ZBarDraw* ZtSeismicTrace::get_bar_draw ( ) const

Get external bar drawing environment (cache) to speedup trace visualization or NULL in case of using local bar drawing object

float ZtSeismicTrace::get_max_ampl ( ) const

Get maximum amplitude to limit visualization by it

virtual void ZtSeismicTrace::get_options ( ZSVOptions svo,
int  svo_mask = ~0 
) const
virtual

Get viewing options

virtual const ZSVOptions& ZtSeismicTrace::get_options ( ) const
virtual

Get viewing options

int ZtSeismicTrace::get_pixel_height ( ) const

Get height of maximum amplitude oscillation in pixels (half of the area).

Logic ZtSeismicTrace::get_status_of_data ( ) const

Return TRUE in case of data is attached and FALSE otherwise.

virtual void ZtSeismicTrace::outline_trace ( const float *  body,
ZTraceNodeAr &  outline,
const ZTracePar ptrpar = NULL 
)
virtual

Generate outline (contour) of the trace with breaking segments by zero level.

virtual void ZtSeismicTrace::redraw ( )
virtual

Direct draw procedure: if size, place or parameters are changed

Reimplemented from ZtObject.

void ZtSeismicTrace::reset_time2coord ( )

Turn off well trajectory.

void ZtSeismicTrace::set_bar_draw ( ZBarDraw pdr)

Set external bar drawing environment (cache) to speedup trace visualization

void ZtSeismicTrace::set_max_ampl ( float  ma)

Set maximum amplitude to limit visualization by it

virtual void ZtSeismicTrace::set_options ( const ZSVOptions svo,
int  svo_mask = ~0 
)
virtual

Change viewing options (some of them may not influe the behaviour)

void ZtSeismicTrace::set_pixel_height ( int  ph)

Set height of maximum amplitude oscillation in pixels (half of the area). Applied to half_area argument of draw_trace() in redraw(). Resets synchronization of pixel height from another object.

void ZtSeismicTrace::set_time2coord ( int  n,
const float *  t,
const float *  c 
)

Provide well trajectory in form time-to-coordinate relation table.

void ZtSeismicTrace::sync_pixel_height_from ( ZtSeismicView vSV,
float  fGain = 1.0 
)

Synchronize pixel height from given seismic view object.

void ZtSeismicTrace::sync_pixel_height_from ( ZtSeismicTrace vST,
float  fGain = 1.0 
)

Synchronize pixel height from given seismic trace object.

Member Data Documentation

Logic ZtSeismicTrace::attached
protected

flag of data presence

ZBarDraw* ZtSeismicTrace::ext_drawer
protected

object to draw colored bars

int ZtSeismicTrace::n_t2c
protected

Time to coordinate relation table (for well trajectory considering during drawing). Zero number of points means turning off the mode.

ZSVOptions ZtSeismicTrace::options
protected

visualization parameters

ZtSeismicTrace* ZtSeismicTrace::ph_sync_from_st
protected

Object for pixel height synchronization

ZtSeismicView* ZtSeismicTrace::ph_sync_from_sv
protected

Object for pixel height synchronization

float ZtSeismicTrace::ph_sync_gain
protected

Gain to the synchronized pixel height

int ZtSeismicTrace::pixel_height
protected

height of the area for drawing maximum cutted amplitude

ZPCoordSlave ZtSeismicTrace::px_ext
protected

External horizontal bounds of trace box for user-friendly zoom area and amplitudes.

ZPCoordSlave ZtSeismicTrace::py_ext
protected

External vertical bounds of trace box for user-friendly zoom area and amplitudes.

ZDimension ZtSeismicTrace::time_orient
protected

zdVertical, zdHorizontal

float* ZtSeismicTrace::tr_body
protected

trace body reference

float ZtSeismicTrace::tr_coord
protected

coordinate of the trace

float ZtSeismicTrace::tr_max_ampl
protected

some predefined maximum amplitude value without a sign; 0.0 means automatic per-trace determination of this parameter

ZTracePar* ZtSeismicTrace::trpar
protected

NULL trace is not described


The documentation for this class was generated from the following file: