| POSC Specifications Version 2.2 | CGM*PIP Volume 1 - PIP/I/3 and PIP/II/3 |
This section contains the definitions of extensions specific to the graphical requirements of the petroleum industry, including:
- Continuous Rendering Extensions: to facilitate the rendering of large picture data sets.
The Seismic Trace Extensions are implemented by a set of defined GENERALIZED DRAWING PRIMITIVE (GDP) and ESCAPE elements. A conforming PIP metafile shall contain the declaration "Extension: Extended/Seismic" in a METAFILE DESCRIPTION substring if it contains any of these extensions.
The Continuous Rendering Extensions are defined by a set of ESCAPE elements. A conforming PIP metafile shall contain the declaration "Extension: Extended/CR" in a METAFILE DESCRIPTION substring if it contains any of these extensions.
If the metafile contains both seismic and continuous rendering extensions, it shall contain the METAFILE DESCRIPTION substring "Extension: Extended/Seismic/CR" (the /Seismic and /CR suffixes may be in either order).
Seismic trace drawing primitives are a common and essential graphical capability in the petroleum industry. A single trace, in its most basic form, is a simple curve that plots a dependent physical parameter (amplitude, velocity, etc.) as a function of a single independent parameter (time, depth, etc.). A single seismic trace curve can contain hundreds or thousands of defining points. A single picture can contain hundreds or thousands of individual seismic trace curves (Figure 10 and Figure 11) each illustrate several simple seismic trace curves in a single picture).
Therefore, the number of points to be plotted in a seismic trace picture can easily be in the millions. If standard CGM primitives were used to plot even the most basic cases of seismic traces, single pictures commonly could require in excess of five million bytes of data to define. Using standard CGM primitives for the more advanced seismic display modes could increase the amount of metafile data by an order of magnitude.
The seismic trace drawing extensions exploit certain regularities and other characteristics of the seismic data (called samples), to dramatically reduce the data requirements for defining seismic traces in metafile pictures.
In its simplest form, a seismic trace represents the visualization in 2D Cartesian coordinates of the locus of a function of a single independent variable, s = f (t). The independent variable only assumes regularly spaced values: tn+1 = tn + c, where c is a constant. Therefore the independent variable, for a single trace curve, may be represented by a direction for the axis of the independent variable, an initial point (local origin), and an increment. The axis (of the independent variable) of a seismic trace is called the baseline axis, and the imaginary line corresponding to the axis is the baseline. The seismic extensions contain a baseline vector parameter to define the baseline axis.
The data (samples) representing the dependent variable may (after some pre-processing by the data collection system) be represented by positive and negative displacements or offsets from the baseline. In the simplest case (which is the only case allowed in PIP/I), the displacements are orthogonal to the baseline axis and aligned with the x and y axes of the plotting system (in the case of the CGM extensions, the x and y axes of VDC space). In more general cases, allowed only in PIP/II, the displacement direction need not be perpendicular to the baseline, and the axes need not be aligned with the VDC axes.
It is important to emphasize that the direction of the amplitude vector establishes positive direction in the local coordinate system for plotting the samples (after scaling - see section 9.2.2.3) of a single seismic trace. The direction opposite to the direction of the amplitude vector is the negative direction for sample plotting.
The direction of displacement from the baseline for positive-valued samples is defined in the seismic extensions by an amplitude vector parameter. The amplitude vector defines the amplitude axis. Therefore, for each trace curve, a local Cartesian plotting space is completely defined (these definitions can vary from curve to curve, even within the same picture, unless the curves are within a trace group - see sections 9.2.3.5 and 9.2.4.3). Figure 5 illustrates several variations of trace local coordinate systems.
Figure 5. Example of Trace Orientation Variations
Figure 5 illustrates a piece of a seismic trace curve with the local coordinate system. It is common for the curve through the plotted samples to "wiggle" back and forth between the positive and negative directions, in a fashion similar to sinusoidal or wave plots, and so these curves are called wiggle curves. Figure 10 and Figure 11 each illustrate several wiggle curves, whose local coordinate systems have different origins but common axis directions.
The area enclosed by the baseline and a single excursion of the wiggle curve away from the baseline is called a lobe. See Figure 5, Figure 6 and Figure 7.
Figure 6. Wiggle Display Mode
Figure 7. Positive and Negative VA Fill Display Modes
The samples which define the path of the wiggle curve in seismic trace extensions actually define a discrete set of points, as defined above, which vary about the baseline. The plotting of a continuous wiggle curve therefore necessarily involves fitting a curve to these points. This is called resampling.
In PIP/I, the only supported resampling method is:
In PIP/II the three following additional methods are supported (see Figure 18).
Note - the method chosen for the cubic interpolation uses the 3 samples centred on si to approximate the derivatives si´ at si , and similarly at si+1. The 2 samples and 2 derivatives then compute the unique cubic in the interval. The method is smooth (continuously differentiable), and computationally efficient. Cubic splines, on the other hand, are twice continuously differentiable but relatively expensive computationally.
Future revisions of PIP may add additional styles, such as a sin(x)/x smoothing operator. Figure 19 illustrates the linear interpolation and replicate methods.
The samples in the Trace GDP are not plotted directly, i.e., they are not metafile VDC (which is one reason that the seismic trace extensions are so efficient in representing these graphical primitives). As described above, one of the seismic trace extensions defines a baseline vector and an amplitude vector, which in turn determine the sense and orientation of the local coordinate system. Another of the extensions defines a baseline scale factor and an amplitude scale factor (both positive numbers), which are used in the normalization and scaling of the sample data to derive absolute VDC plotting positions (as opposed to the offsets defined above).
The baseline scale factor (always positive), multiplied by the magnitude of the baseline vector, determines the constant increment along the baseline, in the independent parameter, t, between the sample positions. That is, if t0, t1, ... represent the values of the independent parameter, then the quantity c in the recursion relationship defining tn+1 (see section 9.2.2.1) is the product of the baseline scale factor and the magnitude of the baseline vector (t0 corresponds with the trace starting position in the Trace GDP).
The values of the data samples themselves are also scaled before being used to generate the wiggle curve. The product of amplitude scale factor (denoted Fa , always positive) and the magnitude of the amplitude vector (denoted Va ) define a "maximum sample displacement", which we will refer to as Vmax. This is the maximum VDC displacement from the baseline for normalized data samples (more precisely, for samples whose magnitude is less than or equal to the sample normalization extent).
The Trace GDP itself contains a sample normalization extent parameter, denoted Sext (Sext is a signed quantity). The scaling that is applied to sample values is defined by mapping the interval from 0 to Sext onto the interval [0, Vmax]. Sample value 0 maps to VDC offset (from the baseline) 0, and sample value Sext maps to VDC offset Vmax.
The scaling may be defined precisely in terms of these normalization and
mapping principles. The scale factor which is applied to samples, to generate
offsets from the baseline, is defined by:
Vmax/Sext.
The offsets themselves are:
Vn = [Vmax/Sext]sn,
where sn is the nth sample value, and Vn
is its VDC offset from the baseline.
This definition of Vn is valid for the specific cases allowed by PIP/I - where the local coordinate system of the trace is orthogonal and axis-aligned (i.e., the amplitude vector is perpendicular to the baseline vector and the two vectors are axis aligned in VDC space). It is also valid for the more general cases allowed in PIP/II, as long as the Vn are treated as the displacements away from the baseline in the direction of the amplitude vector.
Note: it is not necessary that individual sample values be less than the sample normalization extent. Therefore, scaled sample values may in fact correspond to VDC offsets that are greater than Vmax, the "maximum sample displacement".
The following completely defines the absolute VDC plotting positions (as opposed to offsets) of trace data in terms of the sample values and attributes:
| Vnx | = | x1+ nVbxFb + VaxFaSn /Sext |
| Vny | = | y1 + nVbyFb + VayFaSn/Sext |
| Vnx | = | x coordinate, VDC, of nth sample point, |
| Vny | = | y coordinate, VDC, of nth sample point. |
The following trace attributes apply:
| Vbx | = | baseline vector x component; |
| Vby | = | baseline vector y component; |
| Fb | = | baseline scale factor; |
| Vax | = | amplitude vector x component; |
| Vay | = | amplitude vector y component; |
| Fa | = | amplitude scale factor; |
and the following are data from the Trace GDP:
| x1 | = | trace starting position x coordinate; |
| y1 | = | trace starting position y coordinate; |
| Sext | = | sample normalization extent; |
| Sn | = | nth sample value. |
In the case that the baseline and amplitude vectors are orthogonal and axis aligned, as is required in PIP/I, the equations can be simplified. In the common case that the baseline vector is in the VDC y direction and the amplitude vector is in the VDC x direction, the equations become:
| Vnx = x1 + VaxFaSn/Sext |
| Vny = y1 + nVbyFb |
When the CLIP INDICATOR is 'on' the trace and all its components - Wiggle, VA Fill and Background Fill - will be clipped the same as fill areas. The wiggle is treated as if it is the edge of a fill area (equivalently, the wiggle is treated as if it is a line primitive). The wiggle clipping will always be 'shape' regardless of the setting of the metafile LINE CLIPPING MODE or EDGE CLIPPING MODE. See Figure 18.
The previous development of geometric, coordinate, and scaling concepts has considered a simple subset of the general trace visualization capability - the plotting of a set of samples in a Trace GDP, after suitable scaling, as a wiggle curve relative to a local coordinate system, which itself is definable and controllable via some of the seismic extension escapes.
In full generality, the PIP seismic trace extensions use colour and other visualization techniques to allow several parameters associated with the single independent variable to be represented together in a single trace. Specifically, the plotting of a wiggle curve, with variable area fill on top of a filled background, can be accomplished with a single trace GDP which carries data sample values for these three distinct drawing styles (selected by a trace display modes parameter):
Any single mode, or combination of 2 or 3 of the modes, can be selected for any single trace. The user controls the order of rendering of the different trace modes, when more than one mode is selected, by the order in which the modes are specified.
The generation of wiggle curves was described previously (see section 9.2.2.2). When wiggle mode is selected, the data of the samples parameter of the Trace GDP are scaled as described above and plotted relative to the local coordinate system as a continuous curve passing through the scaled sample points. The local coordinate system is positioned with origin (the position of the independent variable for the first sample) at the position point parameter of the Trace GDP.
In wiggle display mode, and the other modes as well, the set of General Trace Attributes select the trace display mode itself and configure the coordinate space. The plotting of the wiggle curve, when wiggle mode is selected, is controlled by the Wiggle Attribute Escapes (see later sections).
The colour and line width of wiggle curves is controlled by the normal metafile LINE COLOUR and LINE WIDTH attributes. The line type of wiggle curves is always solid in PIP/I, and is not affected by the metafile LINE TYPE element. In PIP/II the wiggle can optionally be displayed with the current metafile LINE TYPE. This option is selected by one of the Wiggle Attributes Escapes.
An example of a section of wiggle curve is shown in Figure 6.
When the variable-area fill mode is selected, the lobes defined by the path of the wiggle curve are filled. VA fill can be selected independently for the positive and negative lobes of the trace. Figure 10 and Figure 11 illustrate positive VA fill (assuming that the amplitude vector points to the right). Wiggle mode is also selected in Figure 10 and Figure 11.
The Variable-area Attributes Escapes provide control of a number of aspects of the lobe filling of VA fill, including:
The constituency requirement which has led to the inclusion of the pattern filling style in PIP is for simple bi-level pattern filling of lobes. A bi-level pattern is one which contains only two distinct colours, typically, black and white. The CGM has no such bi-level or restricted pattern mechanism - the CGM pattern interior style is potentially more complex.
Figure 7 and Figure 8 illustrate some of the details of variable-area fill mode.
Figure 8. Rectified VA Fill
The background fill mode differs from wiggle mode and VA fill mode in that it does not depend upon the values of the samples in the Trace GDP (in fact, if only background fill mode is selected then the samples list parameter of the Trace GDP can be empty).
The set of Background Fill Attributes escapes provides control of a number of aspects of background fill. The positive fill boundary and the negative fill boundary parameters, which are offsets from the baseline, define the basic shape and geometry of background fill. Imaginary lines at these offsets, parallel to the baseline, define the lateral boundaries of a track. The track is a parallelogram in the general case (it is limited to being a rectangle in PIP/I) - the end boundaries are respectively the lines which cross the baseline at the first sample position and the greater edge of the last plotted cell, and which are parallel to the amplitude vector. The background fill is rendered within this track.
There are two techniques for background fill, constant colour or variant colour. If the 'constant colour' method is selected, a single colour (defined by another of the Background Fill Attributes Escapes) fills the track. Thus the background fill will be a solid coloured bar parallel to the baseline. If the 'variant colour' method is selected, then at each sample position a coloured bar, orthogonal to the track (for a single, ungrouped trace), and as wide as the sample interval, is coloured with a solid colour. The effect is similar to a 1-row CGM cell array. See Figure 9 for an example of a variant colour background fill.
In background fill mode, as in VA fill mode, an additional attribute escape specifies whether the coloured bars (of variant colour mode) are positioned from edge to edge of the samples, or centred on the samples. In edge mode, the sample positions bound the edges of the rendered coloured cells. All of the supplied background colours (up to the maximum number of samples, see section 9.3.3.1) are plotted.
In centred mode, each coloured cell is centred on the associated sample position point, the first and last cells are only half a sample interval wide (they do not extend outside of the sample domain), and n colours are rendered in rendering an extent of n sample positions along the baseline.
The colours for the 'variant colour' method of background fill come from the background fill colours parameter of the Trace GDP. The rendering of background fill can be somewhat different for traces which belong to a trace group (see section 9.2.4.6).
Background fill can behave differently in trace groups, see section 9.2.4.6.
Figure 9. Background Fill Display Mode
Figure 10. Seismic traces with starting positions along a straight line
Figure 11. Seismic traces in decreasing order
All of the trace attribute escapes can occur at any location in the metafile. Setting or changing any of these attributes affects all subsequent Trace GDPs, with the exceptions described in section 9.2.4.3 for traces which are members of a currently open trace group.
There are several trace attribute ESCAPEs whose parameters are defined as baseline offsets: Wiggle Amplitude Limits, VA Fill Boundaries, and Background Fill Boundaries. Their parameters respectively determine the boundaries for the wiggle curve, VA filling, and background filling. Each of the elements has a parameter associated with the positive direction and the negative direction, as established by the amplitude direction vector (see section 9.4 regarding constraints). Conceptually these values define lines parallel to the baseline. The signed VDC offsets from the baseline to these lines can be calculated as follows:
| Px | = | Poff Vax Fa |
| Py | = | Poff Vay Fa |
Nx | = | Noff Vax Fa |
| Ny | = | Noff Vay Fa |
| Poff | = | positive offset parameter; |
| Noff | = | negative offset parameter; |
| Px , Py | = | x, y VDC offset (respectively) from baseline to "positive" parallel boundary; |
| Nx , Ny | = | x, y VDC offset (respectively) from baseline to "negative" parallel boundary; |
| Vax | = | amplitude vector x component; |
| Vay | = | amplitude vector y component; |
| Fa | = | amplitude scale factor. |
When the variant colour fill style is used, the Trace GDP provides the array of colours used for Variable Area and Background Colour Fill. In PIP/II this array of colour indexes may be optionally derived from the samples by one of two methods:
or
Cn = Sn Fa Fc + B
depending on the value of the parameter of the Variable-Area Fill Variant Colour Selection ESCAPE, or the Background Fill Variant Colour Selection ESCAPE (as appropriate). The factor Fa , which is used to pre-scale the samples in the second equation, is the Amplitude Scale Factor (see section 9.2.2.3).
The colour index Cn is limited by specified upper and lower limit colour index values. The calculation of quantity Sn Fc + B is performed with real arithmetic, without truncating or rounding any intermediate results to integer. The result is then rounded to produce the final colour index. However, if background colour interpolation is to be applied to the Cn , then the real result of the computation is not rounded to integer before applying the interpolation. This requirement maximizes accuracy and eliminates potentially serious rounding artifacts.
| Range of Sample | Derived Colour Index |
|---|---|
| effective sample value < R1 | 1 |
| R1 | 2 |
| R2 | 3 |
| R3 | 4 |
| ... | ... |
| Rn-1 | n |
| Rn | n+1 |
The effective sample value is either the sample value itself, or the sample value pre-scaled by the factor Fa , depending on the value of the parameter of the Variable-Area Fill Variant Colour Selection ESCAPE, or the Background Fill Variant Colour Selection ESCAPE (as appropriate). The factor Fa , which is used to pre-scale the samples in the latter case, is the Amplitude Scale Factor (see section 9.2.2.3).
It is common for a single picture to contain hundreds or thousands of traces, close together and with identical values for the constant increment of the independent parameter of each trace. The traces combine to produce "global" graphical effects of geophysical significance, in much the same way that the lines of grayscale dots in a raster primitive lose their individual identities and define a graphical image.
As described so far, the definition and rendering of each trace in a picture is independent of all the other traces in a picture. However, visualization techniques are in common use in the seismic application community which alter the rendering of each individual trace, depending upon the data of neighbouring traces. Interpolation of background fill between neighbouring traces is the principle method.
A trace group is a set of traces that are grouped together in the metafile, between a matched pair of Begin Trace Group and End Trace Group delimiters. Each defined group has a group identifier. The Trace GDP has a member group identifier parameter. If a trace occurs between the begin and end delimiters for a group, and if its member group identifier matches the identifier of that group, then the trace is a member of the group.
Traces which are not members of a group are rendered as are any other CGM primitives. They are rendered in the order encountered in the metafile, and are rendered independently of any other traces. The General Trace Attributes, and all other trace attributes, can be altered from trace to trace for ungrouped traces.
Note: It is possible for traces to occur in the metafile during the definition of a trace group, which are not members of the trace group. If the spatial extent of such a trace overlaps that of members of the group, then the precise effect is undefined by this version of CGM*PIP. That is, this version of CGM*PIP does not define the precise drawing prioritization of the ungrouped trace with respect to the group members. It is recommended, for predictability of interchange, that this situation be avoided.
Within a group, all traces have a uniform set of attributes. These are the attributes which were in effect when the Begin Trace delimiter occurred. This applies to all of the attribute escape classes: General Trace Attributes, Wiggle Attributes, Variable-area Fill Attributes, and Background Fill Attributes. If any of these attribute escapes occur within the group, then they only have effect on ungrouped traces between the Begin/End Group delimiters (and all traces after the End Group delimiter).
A trace ordering rule is imposed upon the individual traces within a group as follows. The trace group axis is defined to be the imaginary line through the trace starting position of the first trace of the group, perpendicular to the baseline of that trace. The starting positions of all the traces in the group are projected orthogonally onto the trace group axis. The trace ordering rule requires that all of the resulting projected starting positions must progress in a single direction along the trace group axis.
More precisely, if P1, P2, P3, ... are the projected position points, and if V12 is the vector from P1 to P2, then the following relationship holds: Pn+1 = Pn + cn+1V12, for all n and some non-negative constants cn. The cn need not be all equal, i.e., the traces which are members of the group need not have equal spacing between their baselines.
The trace ordering rule requires that all trace group members progress in a uniform direction - no group member will "back up" before previous members. Figure 10 and Figure 11 illustrate traces which obey the ordering rule - Figure 10 is the most common case, where the initial points all fall on a straight line, but Figure 11, where the position points are staggered, is also valid.
Several aspects concerning the relationship of neighbouring traces in groups can be controlled. The display priority of VA-filled lobes in neighbouring traces can be specified by the positive lobe display priority and negative lobe display priority parameters of the Begin Trace Group delimiter. These define the drawing priorities of the positive and negative VA fill of lobes which overlap the lobes of neighbouring traces. The precise effect is defined in section 9.3.8.1. Figure 12 and Figure 13 illustrate the use of the drawing priorities.
The Begin Trace Group delimiter also has parameters to specify the "drawing mode" of positive and negative modes. The values of this parameter are the same as and have the same meaning as the Colour Blending ESCAPE. See section 4.3.9.3.
Figure 12. Drawing priorities of positive and negative VA fill of lobes (cases 1 and 2)
Figure 13. Drawing priorities of positive and negative VA fill of lobes (cases 3 and 4)
Background fill behaves differently within trace groups. There are two major differences: the background fill boundaries are defined differently; and there is a colour interpolation option.
For the rendering of each background-filled trace within a group, the positive and negative background fill boundaries are replaced by the lines which are parallel to the trace's baseline and positioned halfway between the trace's baseline and the baselines of the immediately neighbouring traces on each side of the trace. The user-specifiable positive and negative background fill boundaries are used only for the "outside" boundaries of the first and last traces in a group.
Within trace groups, background colour fill may optionally be interpolated between neighbouring traces. This effect is turned on and off with the Background Fill Colour Interpolation Mode escape.
All traces in a group must use the same colour selection mode for the background fill colours. In PIP/I, interpolation is performed "in the colour domain" of the background fill colours parameter of the Trace GDP. If the colour selection mode of these colours is 'direct', then the interpolation is performed in direct (RGB, for Version 1 metafiles) space. If the colour selection mode is 'indexed', then the interpolation is performed in colour index space.
In PIP/II the colour interpolation may be specified to be either colour domain (which depends on COLOUR SELECTION MODE), or direct colour space regardless of the COLOUR SELECTION MODE. In the case where the VA colour of background fill colours in the trace GDP is indexed and colour domain is specified then interpolation will be done on the colour indexes. If on the other hand the COLOUR SELECTION MODE is 'indexed' and direct colour space is specified, then interpolation is performed on the direct colour values associated with the colour indexes, rather than the colour indexes. This option is selected by one of the Background Fill Attributes Escapes.
Colour interpolation involves two traces. When colour interpolation is selected in PIP/I metafiles, the starting positions of traces in a group are constrained by a trace gridding rule defined as follows. Denote by b the coordinate which varies in the baseline direction. If c is the constant sample interval for all of the traces, and b0 is the b-coordinate of the first trace in the group, then the b-coordinate of the ith trace in the group is bi = b0 + cni , for some integers ni. In other words, although the trace start positions may be staggered, they shall fall on a grid.
If the trace GDPs in the metafile do not obey the gridding rule when interpolation is selected, the metafile is not PIP/I conforming and the results to be expected of interpreters are unspecified.
The interpolation of the background colours may be either 1D or 2D. 1D interpolates between samples in the baseline axis direction, while 2D is "bi-axial" along both the baseline axis and between traces. In PIP/I, interpolation is always 2D while in PIP/II the background interpolation mode may be selected by an escape.
For 2D interpolation, four samples values on 2 neighbouring traces define the corner points of a rectangle (may be a parallelogram in PIP/II). Interpolation is performed in the interior of these rectangles, using the colour data and VDC coordinates of the 4 corner points. That is the colour (index or direct) is treated as a function of 2D VDC: c = f (x,y). See Figure 15.
In the simplest case, data values are defined at all four corners of each interpolation rectangle. The bi-axial interpolation then is well defined: linear in the inter-sample (baseline) direction and linear in the inter-trace (amplitude) direction.
There are several conditions which require special treatment.
Neighbouring interpolation rectangles will all be missing at least one of the 4 values needed for the bi-axial interpolation. There is a small number of distinct cases. In each case, the interpolation is defined by defining a value for the missing corner(s) of the rectangle, in terms of the remaining defined value(s) of the rectangle. See Figure 17.
Figure 14. Illustration of Rendering Direction
Figure 15. Background Fill Colour Interpolation
Figure 16. Interpolation of irregularly positioned traces of unequal length
Figure 17. Procedure for interpolating near nodes having a null color value
Figure 18. Effect of graphical clipping on seismic traces
Figure 19. Linear and Replicate Resampling
The visualization styles in common use in the petroleum industry often lead to pictures with extreme aspect ratios - very much longer in one dimension than in the other. This would imply a metafile picture whose VDC Extent element represented a long and relatively thin rectangle. If the graphical data for such a picture have no spatial order, this can impose serious or impossible resource demands upon the rendering interpreter, particularly if it is rendering to a raster plotting device.
In many cases, the data are generated with an order, from one end of the long rectangle to the other (or else, it may be easy for the generating system to put the data in such an order). The interchange of such data, in bands ordered for rendering, is referred to as continuous rendering.
Continuous rendering is useful in two major applications. The first is seismic plots which can be very long in the trace to trace direction relative to the baseline axis direction, and in which the trace data is ordered along the traces axis. The other is Log plots whose length can be very big relative to the width, and whose data are ordered in the length axis. In these applications the data is naturally ordered. The generator can help the renderer by inserting a "data complete point" element in the CGM after all data has been provided to complete a part (band) of the image up to that point.
PIP defines a set of Continuous Rendering extensions, which enable generators to inform interpreters that the data will come in bands of manageable size, which are ordered from one end of the plot to the other.
These extensions comprise application hints from the generator to the interpreter. They have no inherent graphical effect, except that they may lead interpreters which understand them to frame one edge of the plot differently than would an interpreter which simply used the VDC EXTENT element as described in the CGM standard. Because of this potential presentation difference, the extensions have been defined with the ESCAPE element.
The extensions are relatively simple. Once per picture, in the Picture Descriptor, the Rendering Direction element declares which VDC direction is the direction of progression of the bands comprising the picture, the rendering axis, as follows:
| 'right': | +x VDC direction; |
| 'left': | -x VDC direction; |
| 'up': | +y VDC direction; |
| 'down': | -y VDC direction. |
The presence of this element in the Picture Descriptor informs the interpreter that the continuous rendering feature is in effect (the required declaration in the METAFILE DESCRIPTION substring is simply declarative, that this metafile may use continuous rendering extensions).
The second extension element is the Data Complete Coordinate. This occurs throughout the picture. Its data complete coordinate parameter is a value of the VDC coordinate which varies in the direction of the rendering axis. The occurrence of the Data Complete Coordinate element informs the interpreter that all picture data up to that coordinate has been received, and the interpreter may render up to that point. No subsequent metafile data will have graphical effect prior to that coordinate position.
The distance between data complete points need not be uniform.
The Data Complete Coordinate element has a second parameter, the final data final data flag. This is a signal to the interpreter that this is the final band of the picture, and all data has been received.
Note: This flag parameter allows generators to produce pictures in which the final graphical data do not extend all the way to the appropriate edge of the VDC Extent. It is preferable that generators do match the final data complete coordinate to the edge of the VDC Extent, in order that unwary interpreters produce the intended picture. On the other hand, the continuous rendering feature is most useful and designed for use in conjunction with the seismic trace extensions of PIP and with particular hardware technology. Therefore interpreters implementing this functionality should be aware that the "far" boundary of the VDC extent may not minimally bound the end of the graphical data.
If the metafile data continue beyond the "far" boundary of the VDC extent, and the 'final' value of the final data flag has not yet been encountered, then the picture is terminated normally at the VDC extent boundary.
The position of the data complete coordinate assures the interpreter that no graphical data will occur which results in graphical effect before that position. However, it is possible that graphical primitives which start before that position, and are received by the interpreter before that element, may extend beyond that position in the render axis direction. It is the responsibility of the renderer to retain any (parts of) elements that extend beyond the current "data complete point" for subsequent rendering.
PIP constrains the amount of metafile data that generators may require interpreters to save beyond the data complete coordinates, to 4M bytes of binary encoded CGM data.
The subsections of this section define the parameterization and encoding of the Seismic Trace extensions and the Continuous Rendering extensions for PIP. These are summarized in the following table. The "Level" column gives the lowest PIP level, PIP/I or PIP/II, in which the extension may appear.
| Category | Element name | Level | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Trace primitive | Trace GDP | I | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| General Trace Attributes Escapes | Trace Orientation | I | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Trace Scale Factors | I | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Trace Display Mode | I | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Maximum Number of Samples | I | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Resampling Method | II | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Wiggle Attributes Escapes |
| Variable-Area | Attributes Escapes Minimum and Maximum Positive VA Fill Boundaries
| I
| Minimum and Maximum Negative VA fill Boundaries
| I
| Rectified VA Fill Mode
| I
| VA Fill Style
| I
| VA Fill Constant Colours
| I
| VA Fill Constant Patterns
| I
| VA Fill Alignment
| I
| VA Fill Variant Colour Selection
| II
| VA Fill Variant Linear
| II
| VA Fill Variant Lookup Table
| II
| Background Fill | Attributes Escapes Background Fill Boundaries
| I
| Background Fill Colour Interpolation Mode
| I
| Background Fill Style
| I
| Background Fill Null Colour
| I
| Background Fill Constant Colour
| I
| Background Fill Alignment
| I
| Background Fill Variant Colour Selection
| II
| Background Fill Variant Linear
| II
| Background Fill Variant Lookup Table
| II
| Background Fill Colour Interpolation Space
| II
| Trace Group | Escapes Begin Trace Group
| I
| End Trace Group
| I
| Continuous | Rendering Escapes Rendering Direction
| I
| Data Complete Coordinate
| I
| |
The final subsection contains a table (Table 14 in section 9.4) which defines the defaults for each of the ESCAPEs.
The Trace GDP is encoded as a CGM standard GENERALIZED DRAWING PRIMITIVE element (GDP). All of the rest of the extensions are encoded as ESCAPE elements.
The data records of all the extensions, both ESCAPEs and GDPs are encoded in the style of the SDR data type of CGM:1992, annex C. Although the SDR data type is only defined for version 3 metafiles, the style of encoding, which is mandatory for the SDR data type, is a valid option for encoding the D data type of GDP and ESCAPE elements for metafiles of versions 1, 2, and 3.
Section 6 of this specification presents the pertinent information from CGM:1992, including the definition of the SDR data type, and the definitions of the other data types and their abbreviations.
In the encoding of the GDP's and escapes, the following notation of each member of the data record (see the SDR reference material) is used:
The three components of the member are defined in CGM:1992 annex C. We use "ix_XX" to denote the value of the "data type index" for one of the valid data type indicators in annex C of CGM:1992. "XX" will be something like "I" for integer, "E" for enumerative, "IF8" for fixed-precision 8 bit signed integer, etc. (see the reference material in Section 6).
Although PIP interchange is limited to the CGM Binary Encoding, the encoding specifications in the following sections are sufficient to unambiguously encode these extensions in Clear Text or Character. The SDR format itself assures that this can be done for almost all data types. For enumerative, the following codings follow the normal rules of the CGM Binary Encoding for assigning numeric values to represent the enumerated values. The numeric values for the Character Encoding will be identical to the Binary. The Clear Text values are not unambiguous, and are assigned in the following sections.
There is a single trace primitive, the Trace GDP.
Description:
The starting position is the x, y position in VDC of the origin of the local coordinate system for the trace (see section 9.2.2.1).
The data record consists of 5 members and is encoded according to the rules of the SDR data type of CGM:1992 annex C.
Function of the SDR members:
The sample normalization extent is a non-zero real number that defines sample scaling to VDC space, as defined in section 9.2.2.3.
The samples parameter is the array of sample values that defines the path of the wiggle curve (which is drawn if wiggle trace display mode is selected, and/or VA filled if the positive or negative VA fill styles are selected). Samples may be empty if neither the wiggle nor VA fill display mode is selected.
VA fill colours is the array of colours used to perform VA fill when the VA Fill Style is 'variant colour'. If VA Fill Style is 'constant colour', the array may be empty, and if not empty the array is ignored by interpreters.
The background fill colours is the array of colours used to perform background fill if the Background Fill Style is 'variant colour'. If fill style is 'constant colour' this member may be empty, if not empty this array is ignored by interpreters.
Encoding of SDR members
Description:
The amplitude and baseline shall be valid vectors of non-zero length, and shall not be collinear.
Description
The scale factors shall be positive values.
Description
| 1: | Wiggle | |
| 2: | Positive VA fill | |
| 3: | Negative VA fill | |
| 4: | Background fill |
These may be combined for example to display wiggle with VA fill or wiggle with colour background fill.
Description
Description
The method is type Enumerative. The values are encoded as follows:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| linear | 0 | linear |
| replicate | 1 | replicate |
| cubic | 2 | cubic |
| sin(x)/x | 3 | sinx |
The trace attributes in this set define the attributes of wiggle curve display when 'wiggle' trace display mode is selected.
Description
The values are specified as a fraction of the amplitude scale factor. A value of 1 for the positive limit sets the wiggle amplitude limit to the value corresponding to the sample normalization extent (see Trace GDP in section 9.3.3.1). A value of 0.5 would clip at half this value.
The wiggle curve is drawn along the clipping boundary of any clipped portions, unlike normal CGM clipping. See Figure 6.
The limits may both be either positive or negative. The positive limit shall be greater than or equal to the negative limit.
Description
The mode is type Enumerative. The values are encoded as follows:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| solid | 0 | solid |
| inherit | 1 | inherit |
This group of escapes set the Variable-Area attributes to be used by the trace GDP when either positive or negative VA fill display mode is selected.
Description
The min_pos shall be less than or equal to the max_pos value. Either value may be positive and either value may be negative.
See Figure 7.
Description
The min_neg shall be less than or equal to the max_neg value. Either value may be positive and either value may be negative.
See Figure 7.
Description
The mode is type Enumerative. The values are encoded as follows:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| off | 0 | off |
| on | 1 | on |
Description
If the value is 'constant colour' then the lobes are filled with single, solid colours, individually specifiable for the positive and negative lobes. The variable-area fill constant colours (see section 9.2.3.3) specify the colours for the positive and negative filled lobes for the trace.
If the value is 'variant colour', then the lobes are filled as described in section 9.2.3.3 (see also Figure 7). The colour of each sample, corresponding to a "variant colour band", is specified in the trace GDP.
If the value is 'constant pattern' then the lobes are filled with the 'pattern' interior style of CGM. The variable-area fill constant patterns (see section 9.2.3.3) specify the CGM pattern indexes for the positive and negative filled lobes for the trace.
The fill style is type enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| constant colour | 0 | ConstantColr |
| variant colour | 1 | VariantColr |
| constant pattern | 2 | ConstantPat |
Description
Description
Description
Valid values are 'edge' or 'centre'. If the style is 'edge', then the coloured band extends from each sample position point to the next. More precisely, if t0, t1 , .. tn are the equally spaced values of the independent parameter along the baseline, and c0 , c1 , .. cn are the colours, then c0 applies in the interval [t0 , t1 ), c1 applies in the interval [t 1, t2 ), etc. The value cn-1 is used to fill [tn-1, tn ), i.e., one less colour is used than the number of sample position points along the baseline.
If the value is 'centre', then the coloured bands are centred on the sample positions. Define t0´ = t0 , t1´ = 0.5 * (t0 + t1) , t2´ = 0.5 * ( t1 + t2 ) , etc. (The ti´ are the mid-points of the original sample intervals). Then c0 applies in the interval [ t0´, t1´ ), c1 applies in the interval [ t1´, t2´ ), etc. The last defined interval is [ tn´ , tn ), and on this interval the colour cn applies. Note that the first and last intervals are "half-width", and that all colours are applied in the centred mode.
The fill alignment is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| edge | 0 | edge |
| centre | 1 | centre |
Description
The mode is type Enumerative. The values are encoded as follows:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| GDP data | 0 | GDP data |
| linear | 1 | linear |
| lookup table | 2 | LookupTable |
| linear prescale | 3 | LinearPrescale |
| table prescale | 4 | TablePrescale |
Description
Note that if the relevant metafile colour table indexes have not been defined then the default colour table will be used and the results will be unpredictable. Note also that the specification of section 4.2.4, "all or none" definition of colour indexes, applies.
Description
The colour index offset specifies a colour index that is added to each derived colour index. That is, if the value of this parameter is CIoff, then the values produced by this colour computation method are CIoff, CIoff + 1, CIoff + 2, CIoff + 3, etc.
This group of escapes sets the background fill attributes to be used by the trace GDP when the background fill display mode is selected.
Description
These values are signed offsets from the baseline. They are specified as a fraction of the nominal maximum sample displacement from baseline, which is the product of the amplitude scale factor and the magnitude of the amplitude vector (this is equivalent to defining them to be a fraction of the sample normalization extent).
The neg_fill shall be less than or equal to the pos_fill value. Either value may be positive and either value may be negative.
See Figure 9.
Description
When interpolation is selected, it determines the colours used to fill the rectangle (may be parallelogram in PIP/II) of each sample as described in section 9.2.4.6. Interpolation may be either linear 1D (only between samples in the baseline axis direction) or 2D (both between samples in the baseline axis direction and in the traces axis direction).
If background colour style is 'constant colour' then the interpolation mode specification has no effect.
Valid values of the mode are 'off' and '2D' for PIP/I, and additionally
1D for
PIP/II.
The parameter is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text | PIP Level |
|---|---|---|---|
| off | 0 | off | I |
| 2D | 1 | 2D | I |
| 1D | 2 | 1D | II |
Description
If the value is 'variant colour' then the background fill is rendered as described in section 9.2.3.4 (see Figure 9). The colour of each sample, corresponding to a "variant colour band", is specified in the trace GDP.
Valid values are 'constant colour' and 'variant colour'. The parameter is type Enumerative. The encoded values are:
| Enumerative value | Character Text constant colour
| 0
| ConstantColour
| variant colour
| 1
| VariantColour
| |
|---|
Description
The value of the null colour indicator parameter determines, when these other conditions are met, whether the null colour feature is in effect or not. When the value is 'on', the null colour feature is enabled. When the value is 'off', the null colour feature is disabled.
Valid values of the indicator are 'off' and 'on'.
The parameter is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| off | 0 | off |
| on | 1 | on |
See section 9.2.4.6.
Description
Description
The definition of the precise position of the colour bands or cells is analogous to the description for VA Fill Alignment (see section 9.3.6.7). This element does not apply when background colour interpolation is selected - it applies only in the default "cell fill" style of background filling.
The fill alignment is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| edge | 0 | edge |
| centre | 1 | centre |
Description
The mode is type Enumerative. The values are encoded as follows:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| GDP data | 0 | GDP data |
| linear | 1 | linear |
| lookup table | 2 | LookupTable |
| linear prescale | 3 | LinearPrescale |
| table prescale | 4 | TablePrescale |
Description
Note that if the relevant metafile colour table indexes have not been defined then the default colour table will be used and the results will be unpredictable. Note also that the specification of section 4.2.4, "all or none" definition of colour indexes, applies.
Description
The colour index offset parameter specifies a colour index that is added to each derived colour index. That is, if the value of this parameter is CIoff , then the values produced by this colour computation method are CIoff, CIoff + 1, CIoff + 2, CIoff + 3, etc.
Description
Valid values are 'colour domain' and 'direct colour space'.
The fill alignment is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| colour domain | 0 | ColrDomain |
| direct colour space | 1 | DirectColrSpace |
Two escapes define trace groups. These are delimiters, which begin and end the definition of the trace group.
Description
See section 9.2.4.4 for definition of ordering rules within trace groups, attribute inheritance, and the graphical capabilities which are available for traces which are group members.
The group identifier is an integer that identifies the current group. It shall be unique within a picture.
The positive display priority specifies the display priority of the positive trace lobe and associated wiggle of a trace, in relationship to any previously drawn overlapping trace lobes, both positive and negative. This parameter can have a value of either 'highest' or 'lowest'.
'Lowest' indicates that the positive lobes of the trace being rendered are displayed behind any overlapping trace lobes that have been rendered up to that point.
'Highest' indicates that the positive lobes of the trace being rendered are displayed in front of any overlapping trace lobes that have been rendered up to that point. This parameter only affects overlapping traces within the current group. Furthermore it has no effect on any previously drawn general CGM primitives.
The parameter is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| lowest | 0 | lowest |
| highest | 1 | highest |
The negative display priority specifies the display priority of the negative trace lobe and associated wiggle in relationship to any previously drawn overlapping trace lobes both positive and negative. This parameter can have a value of either 'highest' or 'lowest'.
'Lowest' indicates that the negative lobes of the trace being rendered are displayed behind any overlapping trace lobes that have been rendered up to that point.
'Highest' indicates that the negative lobes of the trace being rendered are displayed in front of any overlapping trace lobes that have been rendered up to that point. This parameter only affects overlapping traces within the current group. Furthermore it has no effect on any previously drawn general CGM primitives.
The positive lobe pixel drawing mode and negative lobe pixel drawing mode specify whether the pixel drawing modes for positive lobes and negative lobes, respectively, and associated wiggle curves are Opaque (replacement) or Blending Method #1 (blend). The meanings and values are the same as for the Colour Blending ESCAPE, section 4.3.9.3.
Description
Description
If used, it shall occur in the Picture Descriptor.
The direction defines the direction of rendering. Valid values are: 'right', 'left', 'up', and 'down'. See section 9.2.5 for their meaning with respect to VDC space.
The parameter is type Enumerative. The encoded values are:
value Character Text right
| 0
| right
| left
| 1
| left
| up
| 2
| up
| down
| 3
| down
| |
|---|
Description
The data complete coordinates must all be either increasing or decreasing along the respective axis in the rendering direction. However, they do not need to be increasing or decreasing uniformly. The data complete coordinate for this band shall take precedence over the VDC extent.
The flag indicates that this is the final band of a picture. Flag can be either 'not final' or 'final'. It is type Enumerative. The encoded values are:
| Enumerative value | Binary & Character | Clear Text |
|---|---|---|
| not final | 0 | not final |
| final | 1 | final |
| Parameter | Default | Constraints | Notes |
|---|---|---|---|
| PIP/I Elements | |||
| trace orientation | (0,-1), (1,0) | 1 | |
| trace scale factors | 1,1 | positive values | |
| trace display mode | wiggle | ||
| maximum number of samples | 16384 | 1..16384 | |
| positive and negative wiggle amplitude limits | 1,-1 | -1..1 | 2, 6 |
| minimum and maximum positive VA fill boundaries | 0,1 | -1..1 | 3, 6 |
| minimum and maximum negative VA fill boundaries | 0,-1 | -1..1 | 3, 6 |
| rectified VA fill mode | off | ||
| VA fill style | constant colour | ||
| VA fill constant colours | 1, or d.d.f.c. | 5 | |
| VA fill alignment | edge | ||
| positive and negative background fill boundaries | 1,-1 | -1..1 | 4, 6 |
| background fill colour interpolation mode | off | ||
| background fill style | constant colour | ||
| background fill null colour | off | n/a | |
| background fill constant colour | 1, or d.d.f.c. | 5 | |
| background fill alignment | edge | ||
| PIP/II Elements | |||
| resampling method | linear | ||
| wiggle line type mode | solid | ||
| VA fill variant colour selection | GDP data | ||
| VA fill variant linear | 1., 0., 0, 1 | 7 | |
| VA fill variant lookup table | 0, 1, 0 | 256 range values | 8 |
| background fill variant colour selection | GDP data | ||
| background fill variant linear | 1., 0., 0, 1 | 7 | |
| background fill variant lookup table | 0, 1, 0 | 256 range values | 8 |
| background fill colour interpolation space | colour domain | 8 | |
Note 1. In PIP/I, the baseline and amplitude direction vectors are limited to being axis aligned. In PIP/II this constraint is removed thus allowing traces to be non-axis aligned and the local trace coordinate system to be skewed.
Note 2. The positive limit should always be greater than the negative limit.
Note 3. These four values must always have the following relationship: maximum
positive fill boundary
minimum positive fill
boundary
maximum negative fill boundary
minimum negative fill boundary.
Note 4. The positive background fill boundary should always be greater than the negative background fill boundary.
Note 5. "d.d.f.c" means device-dependent foreground colour. The choice, 1 or d.d.f.c, depends on the COLOUR SELECTION MODE of the metafile. The default is index value 1 if the mode is 'indexed', and device dependent foreground colour if the mode is 'direct'.
Note 6. These limits and boundaries are further constrained as follows:
| limit/boundary | constraint |
|---|---|
| positive wiggle amplitude limit | |
| negative wiggle amplitude limit | |
| min, max positive VA fill boundaries | |
| min, max negative VA fill boundaries | |
| positive background fill boundary | |
| negative background fill boundary |
Note 7. The minimum colour index must be non-negative, and the maximum colour
index must be
MAXIMUM COLOUR INDEX.
Note 8. The number of range values must be positive and
256. The range values must be continuously
increasing such that: