Seismic Widget Class


Defined Functions

The following functions are defined for creating a Seismic widget and manipulating the display of the seismic section.

Function NameDescription
XintCreateSeismicCreates an unmanaged Seismic widget.
XintSeismicChangePanelActivateInvokes the callback that manages the resource editor panel.
XintSeismicDrawCauses a portion of the Seismic widget's window to be redrawn.
XintSeismicEditBackgroundChanges the background color of a Seismic widget.
XintSeismicEditForegroundCauses an EditColor widget to be displayed so that the end-user can edit the color used for the foreground color of the Seismic widget.
XintSeismicEditOverlayForegroundCauses an EditColor widget to be displayed so that the end-user can edit the color used for the foreground color of the overlay data displayed by Seismic widget.
XintSeismicGetDataReturns a pointer to a subset of the trace data used by the Seismic widget.
XintSeismicGetImageReturns a pointer to the image displayed by the Seismic widget.
XintSeismicGetInfoForMovieGets the information needed to record the displayed seismic section into a movie using the Movie widget.
XintSeismicGetPickingRecordReturns a pointer to the picking record used by the Seismic widget.
XintSeismicGetPixmapInfoReturns information about the pixmap used by the Seismic widget to display the seismic section.
XintSeismicGetVirtualSizeReturns the width and height of the virtual window of a seismic widget.
XintSeismicHeaderCountReturns the number of headers defined for the current dataset.
XintSeismicHeaderNameReturns the header name for the specified header index.
XintSeismicHeaderValueReturns a header value for the specified header name for the speci fied trace.
XintSeismicHighlightTraceCauses a specified trace to be highlighted.
XintSeismicKeyTimeToPointConverts a position specified by key values and a time value into window system coordinates.
XintSeismicKeyToTraceReturns the trace number corresponding to the specified primary and secondary key values.
XintSeismicPointToKeyTimeConverts a position expressed in the window coordinate system into a position expressed as key, trace number and time values.
XintSeismicSetArgListReturns an argument list containing the current settings of the resources of a Seismic widget.
XintSeismicSetMuteCauses a specified range of traces to be muted using specified top and bottom mute arrays.
XintSeismicSetMuteFromPointsCauses a specified range of traces to be muted above or below a specified polyline.
XintSeismicSetTraceStatusSets the trace display status for a specified range of traces.
XintSeismicTraceTimeToPointConverts a position specified by a trace number and time value into window system coordinates.
XintSeismicTraceToKeyReturns the primary and secondary key values corresponding to a specified trace number.
XintSeismicUnhighlightTraceRemoves the highlight from the currently highlighted trace(s).
XintSeismicUpdateTraceColorChanges the color of a range of traces.
XintSeismicUpdateTracesCauses a specified range of traces to be redrawn on the screen.
XintSeismicZoomPerforms a zoom operation for a widget whose class is derived from the XintSeismic widget class.


XintCreateSeismic

XintCreateSeismic creates an unmanaged Seismic widget.

     Widget XintCreateSeismic (...)

WidgetparentParent of new Seismic widget.
char *nameName of new Seismic widget.
ArgListarglistList of resource/value items.
CardinalargcountNumber of items in arglist.


XintSeismicChangePanelActivate

This function invokes callback XmNchangePanelCallback that activates the panel used to edit the widget resources.

     void XintSeismicChangePanelActivate (Widget widget)

where widget is the widget ID of the Seismic widget.


XintSeismicDraw

Causes a specified portion of the Seismic widget's window to be redrawn.

     void XintSeismicDraw (...)

WidgetwidgetID of the Seismic widget to be redrawn.
intxThe x coordinate (in pixels) of the upper left corner of the area to be redrawn.
intyThe y coordinate (in pixels) of the upper left corner of the area to be redrawn.
intwidthThe width (in pixels) of the area to be redrawn.
intheightThe height (in pixels) of the area to be redrawn.
BooleanflagIf set to True, this flag indicates that the expose callback is to be executed.


XintSeismicEditBackground

Causes an EditColor widget to be created and displayed so that the end-user can change the background color of the Seismic widget.

     void XintSeismicEditBackground (Widget widget)

where widget is the widget ID of the Seismic widget whose background color is to be changed.


XintSeismicEditForeground

Causes an EditColor widget to be created and displayed so that the end-user can change the foreground color of the Seismic widget.

     void XintSeismicEditForeground (Widget widget)

where widget is the widget ID of the Seismic widget whose foreground color is to be changed.


XintSeismicEditOverlayForeground

Causes an EditColor widget to be created and displayed so that the end-user can change the foreground color of the overlay data displayed by a Seismic widget.

     void XintSeismicEditOverlayForeground (Widget widget)

where widget is the widget ID of the Seismic widget displaying overlay data whose foreground color is to be changed.


XintSeismicGetData

Returns the address of a copy of a specified subset of the trace data contained in the Seismic widget's XintSeismicDataRec structure. The subset of data to return is specified in terms of trace interval and time interval. You should free the sample data array when you have finished with it using the XtFree function.

     float *XintSeismicGetData (...)

WidgetwidgetWidget ID of the Seismic widget containing subset of data desired.
inttn_startThe trace number of the trace at the beginning of the desired interval.
inttn_endThe trace number of the trace at the end of the desired interval.
float *time_startSpecifies the sample time at the beginning of the time interval desired. Returns the exact starting value.
float *time_endSpecifies the sample time at the end of the time interval desired. Returns the exact ending value.
int *ntraceReturns the number of traces selected from the data.
int *nsampleReturns the number of samples selected.

The function returns NULL if it cannot return the data requested.


XintSeismicGetImage

Returns a pointer to the image displayed by a Seismic widget.

     XImage *XintSeismicGetImage (Widget widget)

where widget is the widget ID of the Seismic widget displaying the XImage that you wish to access. This function returns NULL if no image is built.


XintSeismicGetInfoForMovie

Gets information about the seismic section currently displayed in a specified Seismic widget so that the image of the seismic section can be recorded into a movie using a Movie widget.

     Boolean XintSeismicGetInfoForMovie (...)

Widgetseismic_widgetSpecifies the widget ID of the Seismic widget whose pixmap you wish to include in a movie.
int *storageReturns a defined integer constant (XintPIXMAP or XintIMAGE) that specifies whether the Seismic widget is displaying the seismic section from a Pixmap or an XImage.
Pixel **pixelsReturns a pointer to the array of pixels (colors) used by the pixmap.
int *ncolorsReturns the number of colors in the pixel array.
char **titleReturns a pointer to the character string containing the title of the seismic section in the Seismic widget.

This function returns True if the information was successfully obtained. Otherwise, it returns False. Use functions XintSeismicGetPixmapInfo or XintSeismicGetImage to obtain the image or pixmap to record. The pixel array returned by this function should be freed using XtFree after the application has finished with it.


XintSeismicGetPickingRecord

Returns a pointer to the picking record currently connected to a specified Seismic widget.

     XintPickingRecord *XintSeismicGetPickingRecord (Widget widget)

where widget is the widget ID of the Seismic widget whose picking record you wish to reference. This function returns NULL if no picking record is currently connected to the specified Seismic widget.

This function is available only with the Picking library.


XintSeismicGetPixmapInfo

This function allocates a pixmap that will contain the Seismic image and annotation. This pixmap can be used to record the current plot into a Movie.

     Boolean XintSeismicGetPixmapInfo (...)

WidgetwidgetWidget ID of the Seismic widget containing the pixmap of interest.
Pixmap *pixmapReturn address of the pixmap.
int *widthReturns the width of the pixmap.
int *heightReturns the height of the pixmap.
int *depthReturns the depth of the pixmap.

This function returns False if the specified Seismic widget has no pixmap or image allocated. Otherwise, it returns True. The pixmap should be freed using function XFreePixmap after it is no longer needed.


XintSeismicGetVirtualSize

Returns pointers to the width and height of the virtual window of a Seismic widget.

     void XintSeismicGetVirtualSize (...)

WidgetwidgetWidget ID of the Seismic widget containing the pixmap of interest.
int *widthReturns the width of the virtual window of the Seismic widget.
int *heightReturns the height o f the virtual window of the Seismic widget.

XintSeismicHeaderCount

Returns the number of headers found for the specified Seismic widget.

     int XintSeismicHeaderCount (...)

WidgetwidgetWidget ID of the Seismic widget.

XintSeismicHeaderName

Gets a header name for the specified header index. Note: you can use the XintSeismicHeaderCount function to get the size of this array.

     string XintSeismicHeaderName (...)

WidgetwidgetWidget ID of the Seismic widget.
intindexHeader index to return a name for.

XintSeismicHeaderValue

Gets a header value for the specified header name for the specified trace.

     float XintSeismicHeaderValue (...)

WidgetwidgetWidget ID of the Seismic widget.
char *nameHeader name you wish a value returned for.
inttnTrace number you wish header value returned for.

XintSeismicHighlightTrace

Causes a specified trace to be highlighted by a color change. The color used to highlight the trace is specified by the resource XmNhighlightColor inherited by the Seismic widget from the Primitive class. Only one trace at a time can be selected using this mechanism. Use function XintSeismicUpdateTraceColor if you want to change the color of more than one trace. This function re-rasterizes only the specified trace if the current image is not stored in a bitmap, otherwise it will re-rasterize the entire dataset. Set resource XmNuseBitmap to False if you plan to use this function so that the Seismic widget never uses a bitmap.

     void XintSeismicHighlightTrace (...)

Widgetwidget Widget ID of the Seismic widget containing the trace to be highlighted.
inttnTrace number of the trace to be highlighted.


XintSeismicKeyTimeToPoint

Converts a location in the seismic section (specified as trace and time values) into window coordinates.

     Boolean XintSeismicKeyTimeToPoint (...)

Widgetwidget Widget ID of the Seismic widget.
intpkeySpecifies the primary key associated with the location of interest.
intskeySpecifies the secondary key (if defined) associated with the location of interest.
floattimeSpecifies the time at the location of interest.
int *xThe return address of the horizontal location specified in window coordinates.
int *yThe return address of the vertical location specified in window coordinates.

This function returns False if the specified key or time values are out of range. Otherwise, the function returns True.


XintSeismicKeyToTrace

Converts primary and secondary key values to the corresponding trace sequence number.

     Boolean XintSeismicKeyToTrace (...)

WidgetwidgetWidget ID of the Seismic widget.
intpkeySpecifies the primary key associated with trace of interest.
intskeySpecifies the secondary key (if defined) associated with the trace of interest.
int*tnReturns the sequence number of the trace of interest.

This function returns False if the specified primary key or secondary key is out of range. Otherwise, it returns True.


XintSeismicPointToKeyTime

Converts a location in the seismic section (specified as window coordinates) into trace and time values.

     Boolean XintSeismicPointToKeyTime (...)

WidgetwidgetWidget ID of the Seismic widget.
intxThe horizontal location specified in window coordinates.
intyThe vertical location specified in window coordinates.
int *pkeyThe return address of the primary key associated with the (x,y) location.
int *skeyThe return address of the secondary key (if defined) associated with the (x,y) location.
int *tnThe return address of the trace sequence number associated with the (x,y) location.
float *timeThe return address of the time value associated with the (x,y) location.

This function returns False if the specified x or y values are out of range; otherwise, it returns True. If the value specified for the x argument is out of range, the argument pkey will be set to XintUNDEFINED_KEY. If the value specified for the y value is out of range, the argument time will be set to XintUNDEFINED_TIME.


XintSeismicSetArgList

Returns a copy of the resource argument list used by a Seismic widget. Use this function when you wish to create another Seismic widget that has the same (or similar) resource values as an existing Seismic widget. You must declare the size of the argument array to be at least as large as the defined constant, XintSEISMIC_NUM_ARGS.

     void XintSeismicSetArgList (...)

WidgetwidgetWidget ID of the Seismic widget whose arguments you wish to copy.
ArgListargThe argument list that will contain the resource values upon return.
int *nThe return address of the number of arguments returned in the arg array.


XintSeismicSetMute

Causes a specified range of traces to be muted above the values contained in top_array and below the values in the bottom_array.

     void XintSeismicSetMute (...)

WidgetwidgetWidget ID of the Seismic widget displaying the traces you wish to mute.
intftnThe sequence number of the first trace to be muted.
intltnThe sequence number of the last trace to be muted.
float *top_arrayFloating point array containing the mute values above which the corresponding (ltn - ftn + 1) traces will be muted.
float *bottom_arrayFloating point array containing the mute values below which the corresponding (ltn - ftn + 1) traces will be muted.


XintSeismicSetMuteFromPoints

Causes the traces intersection with a polyline to be muted above or below the polyline. The specified polyline must not intersect a trace more than once.

     void XintSeismicSetMuteFromPoints (...) 

WidgetwidgetWidget ID of the Seismic widget displaying the traces you wish to mute.
intdirectionSpecifies whether the traces will be muted above (XintMUTE_TOP) or below (XintMUTE_BOTTOM) the polyline.
XintPolylinePoint *pointsAn array of polyline points expressed in user coordinates.
intnpointsThe number of points in the points array.

The coordinates of the points contained in the polyline are defined as an array, where each point is specified using a structure of type XintPolylinePoint, which takes the following form:

   typedef struct {
                   float x;
                   float y;
   } XintPolylinePoint;


XintSeismicSetTraceStatus

Sets the display status of a specified range of traces displayed by an Seismic widget.

     void XintSeismicSetTraceStatus (...) 

WidgetwidgetWidget ID of the Seismic widget displaying the traces that will have their display status changed.
intftnThe sequence number of the first trace whose display status is to be changed.
intltnThe sequence number of the last trace whose display status is to be changed.
intstatusDefined constant specifying the new display status of the traces in the range [ftn, ltn].

The status argument must be specified as XintTRACE_NORMAL, XintTRACE_INVERTED, or XintTRACE_KILLED.


XintSeismicTraceTimeToPoint

Converts a location in the seismic section (specified as trace and time values) into window coordinates.

     Boolean XintSeismicTraceTimeToPoint (...)

WidgetwidgetWidget ID of the Seismic widget.
inttnSpecifies the sequence number of the trace associated with the location of interest.
floattimeSpecifies the time at the location of interest.
int *xReturns the horizontal location specified in window coordinates.
int *yReturns the vertical location specified in window coordinates.

This function returns False if the specified trace sequence number or time value are out of range. Otherwise, it returns True.


XintSeismicTraceToKey

Converts a trace sequence number to the corresponding primary and secondary key values.

     Boolean XintSeismicTraceToKey (...)

WidgetwidgetWidget ID of the Seismic widget.
inttnSpecifies the sequence number of the trace of interest.
int *pkeyReturns the primary key associated with trace of interest.
int *skeyReturns the secondary key (if defined) associated with the trace of interest.

This function returns False if the specified trace sequence number is out of range. Otherwise, it returns True.


XintSeismicUnhighlightTrace

Causes the currently highlighted trace to change back to its original color.

     void XintSeismicUnhighlightTrace (Widget widget)

where widget is the widget ID of a Seismic widget.


XintSeismicUpdateTraceColor

Causes a set of traces to change color if displayed using wiggle, and/or monochrome fill. This function re-rasterizes only the specified traces if the current image is not stored in a bitmap, otherwise it will re-rasterize the entire dataset. Set resource XmNuseBitmap to False if you plan to use this function so that the Seismic widget never uses a bitmap.

     void XintSeismicUpdateTraceColor (...)

WidgetwidgetWidget ID of the Seismic widget.
intfirst_traceSpecifies the first trace.
Pixel *pixel_arraySpecifies a pixel array containing the pixel colors to assign to each trace.
intntraceSpecifies the number of traces whose color will be changed.


XintSeismicUpdateTraces

Causes the specified Seismic widget to update the given range of traces in the image displayed.

     void XintSeismicUpdateTraces (...)

WidgetwidgetWidget ID of the Seismic widget displaying the image to be updated.
intftnSpecifies the sequence number of the first trace to update.
intltnSpecifies the sequence number of the last trace to update.


XintSeismicZoom

Causes a selected area of a widget's displayed image to be zoomed. The widget must be an instance of the XintSeismic widget class or a class derived from the Seismic widget class. The area to be scaled must have been previously selected and returned to the application via an area selection callback. The zoom operation can be performed so that the scaled image replaces the previous image displayed by the widget. Alternatively, a new widget can be created to display the scaled area.

     Widget XintSeismicZoom (...)

WidgetcurrentWidget ID of the widget containing the area to be scaled.
WidgetparentSpecify the parent's widget ID so that a new widget will be created as a child of the widget's parent, to display the zoomed area, or specify NULL so that the original widget will be used to display the zoomed area.
XintSeismicAreaSelectionCallbackStruct *selectionSpecify the address of an XintSeismicAreaSelectionCallback structure that indicates the area to be zoomed, or specify NULL to indicate that the currently displayed area in the widget is the area to be zoomed.
floatzxThe horizontal scale factor to be used to zoom the selected area.
floatzyThe vertical scale factor to be used to zoom the selected area.

This function returns the widget ID of the widget containing the zoomed area (i.e., the original widget or the new widget) if it is successful. Otherwise, it returns NULL.