next up previous print clean
Next: Interactive objects Up: OBJECTS Previous: Seplib objects

Graphic objects

The object-oriented paradigm is more often used in the graphic domain, and one of the purpose of the creation of these SepData class was to be able to have equivalent graphic objects. We create classes of Seismic graphic objects such as GSPlane to display Plane Data, GSDataPict, GSCurvesPict to handle seismic coordinates views, or GSMultiLine, GSPolygon, GSBSPline which displays different graphic objects and provide 1D editing facilities. All these graphics objects output themselves into a vplot file (Cole and Dellinger 1989). All these graphic objects have been encapsulated into a generic graphic object to give the user a unique representation of all the common functionalities of these objects.

The coordinate system of a GSDataPict or a GSCurvesPict is defined in two steps: First, specification of the screen rectangle in which this picture will be placed. Second, specification of which axis goes where, i.e. if the 1-axis is along the vertical direction or if it runs up or down, left or right. All graphic objects inserted into this picture are defined in seismic or user coordinates. This object serves the same purpose as the window concept introduce by GI (Claerbout 1989).

GSMultiLine, GSPolygon, GSBSPline or generically GSNPtObject know how to create handles and modification shapes for editing purposes or reshape themselves after an editing operation. The code to reshape all types (Trace, Rect, ...) of GSNPtObject is presented in Figure 1.


 
Figure 1: Code fragment for reshaping every type of GSNPtObject. This example shows code reusability.  
\begin{figure}
{\footnotesize
\begin{verbatim}
oldObject = Select(e.x,e.y) ; // ...
 ...t GetReshapedCopy(); // Construct new reshaped object\end{verbatim}}\end{figure}

Tables 2, 6 and 7 present the basic functionalities of the graphic objects.


 
Table 2: Graphic object - base class for graphic object. The base object provides a set of functionalities which encapsulate all operations useful in the derived class. This encapsulation enhances code reusability and code simplification by providing an homogeneous interface for all types of graphic objects.  
2||c||Basic Graphic Objects  
functions comments
GSObject(Graphic *) Creates a new graphic object having
  a copy of the given graphic state.
void Hardcopy(SColorMap *, char *file, SepData *) Generates a vplot
  hardcopy of the current graphic.
GSNPtObject(Graphic *) Creates a multi points graphic object.
Rubberband * CreateRubberShape(Coord, Coord) Creates, stores and returns
  a rubberband representing the
  GSNPtObject for the user to reshape.
  Selects the control point
  from the input Coordinates.
GSNPtObject * GetReshapedCopy() Creates and returns a copy
  of the GSNPtObject incorporating
  the change made to its shape.


next up previous print clean
Next: Interactive objects Up: OBJECTS Previous: Seplib objects
Stanford Exploration Project
1/13/1998