Contour Widget Class


Overview

The Contour widget provides methods for calculating and displaying grids and contours which represent the solution to surface estimation problems. The input to the Contour widget is either a set of scattered points, or a grid, with an optional fault definition.

Inherited Behavior and Resources

The Contour widget class inherits behavior and resources from the Core, Composite, Constraint, XmManager, XintCompBase, XintEditObject, XintGrid and XintImage classes.
The following resources are defined by the XintContour widget class:
NameTypeDefaultAccess
XmNannotationCharHeightint12CSG
XmNannotationColorPixel"black"CSG
XmNannotationIncrementint2CSG
XmNannotationPrecisionint0CSG
XmNannotationSpacingint250CSG
XmNaveragingDistancefloat *0.1CSG
XmNclipPolygonArrayXintFaultPoint *NULLCSG
XmNclipPolygonCountint0CSG
XmNcomputeStatusCallbackXtCallbackListNULLCSG
XmNcontourDisplayModeintXintCONTOUR_LINECSG
XmNcontourLineColorPixel"black"CSG
XmNcontourLineThicknessint1CSG
XmNendDataXfloat *NULLCSG
XmNendDataYfloat *NULLCSG
XmNendZfloat *NULLCSG
XmNfaultFillBooleanTrueCSG
XmNfaultFillColorPixel"black"CSG
XmNfaultLineColorPixel"black"CSG
XmNfaultLineThicknessint2CSG
XmNfaultPointArrayXintFaultPoint *NULLCSG
XmNfaultPointCountint0CSG
XmNgridDatafloat *NULLCSG
XmNgriddingMethodintXintGRIDDING_AUTOMATICCSG
XmNgridRefinementint0CSG
XmNinterpolationDistancefloat *25.0CSG
XmNnullValuefloat *NULLCSG
XmNnumberOfOctantsint4CSG
XmNnumGridXint50CSG
XmNnumGridYint50CSG
XmNnumGridZint32CSG
XmNradiusfloat *25.0CSG
XmNsmoothingPassCountint10CSG
XmNsourcePointArrayXintSourcePointNULLCSG
XmNsourcePointCountint0CSG
XmNstartDataXfloat *NULLCSG
XmNstartDataYfloat *NULLCSG
XmNstartZfloat *NULLCSG


XmNannotationCharHeight

Specifies the height, in pixels, of the characters used to annotate the contour, when resource XmNcontourDisplayMode is set to XintCONTOUR_FILLED_AND_ANNOTATED.

XmNannotationColor

Specifies the color, as a pixel value, of the characters used to annotate the contour, when resource XmNcontourDisplayMode is set to XintCONTOUR_FILLED_AND_ANNOTATED.

XmNannotationIncrement

Specifies the increment between annotated contours. For example, specify 2 if you want every other contour level to be annotated.

XmNannotationPrecision

Specifies the number of digits to be printed to the right of the decimal place. If 0 the annotation for contours will be integer.

XmNannotationSpacing

Specifies the distance, in pixels, between consecutive annotation of the same contour level, when resource XmNcontourDisplayMode is set to XintCONTOUR_FILLED_AND_ANNOTATED.

XmNaveragingDistance

Specifies the distance within which points are averaged as a percentage of the grid length in user coordinates. If the vertical and horizontal lengths are different, this percentage is relative to the largest of the two.

XmNclipPolygonArray

Specifies an arbitrary closed polygon that defines a clipping region, outside of which no contour is calculated or drawn. In addition, all source points outside the specified polygon are ignored during the gridding process. This resource is specified as a pointer to an array of points, represented by a data structure of type XintFaultPoint, which takes the following form:

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

See resource XmNclipPolygonCount to specify the number of points in the clip polygon.


XmNclipPolygonCount

Specifies the number of points in the array defined by resource XmNclipPolygonArray.

XmNcomputeStatusCallback

Specifies a list of callbacks that sre called to provide information about the current compute phase and percentage of completion during the gridding process.

XmNcontourDisplayMode

Specifies the display method for the contour. You can specify one of the following constants:

Resource ValueDescription
XintCONTOUR_LINEContour is displayed as a set of monochrome contour lines.
XintCONTOUR_COLORED_LINEContour is displayed as a set of colored contour lines.
XintCONTOUR_FILLEDContour is filled with colors.
XintCONTOUR_FILLED_AND_LINEContour is color filled and monochrome contour lines are drawn on top.
XintCONTOUR_ANNOTATEDContour is displayed with annotated contour lines.
XintCONTOUR_FILLED_AND_ANNOTATEDContour is color filled and annotated contour lines are drawn on top.
XintCONTOUR_NO_DISPLAYNo contour display is output.


XmNcontourLineColor

Specifies the color, as a pixel value, of the contour lines when resource XmNcontourDisplayMode is set to XintCONTOUR_LINE, XintCONTOUR_COLORED_LINE or XintCONTOUR_FILLED_AND_ANNOTATED.

XmNcontourLineThickness

Specifies the line thickness, in pixels, of the contour lines when resource XmNcontourDisplayMode is set to XintCONTOUR_LINE, XintCONTOUR_COLORED_LINE or XintCONTOUR_FILLED_AND_ANNOTATED.

XmNendDataX

Specifies the end value of the grid mesh along the X direction. This resource must be specified if the input data to the Contour widget is a grid. This resource defaults to the maximum X value if the input data to the Contour widget is specified as an array of scattered data points. Use resources XmNhorizontalStart, XmNhorizontalEnd, XmNverticalStart and XmNverticalEnd inherited from the XintGrid class, to specify the contour image boundaries.

XmNendDataY

Specifies the end value of the grid mesh along the Y direction. This resource must be specified if the input data to the Contour widget is a grid. This resource defaults to the maximum Y value if the input data to the Contour widget is specified as an array of scattered data points. Use resources XmNhorizontalStart, XmNhorizontalEnd, XmNverticalStart and XmNverticalEnd, inherited from the XintGrid class, to specify the contour image boundaries.

XmNendZ

Specifies the maximum contour level value.

XmNfaultFill

Specifies how to draw the inside of a polygon fault. Specify True if you want the inside of the fault to be drawn with the solid color defined in resource XmNfaultFillColor, this resource when True also returns all Z values within the fault area as null values. Specify False if you want the inside of the fault to be contoured, Z values will be returned rather than null values.

XmNfaultFillColor

Specifies the color, as a pixel value, used to draw the inside of non vertical faults if resource XmNfaultFill is set to True.

XmNfaultLineColor

Specifies the color, as a pixel value, used to draw fault lines.

XmNfaultLineThickness

Specifies the line thickness, in pixel units, used to draw fault lines.

XmNfaultPointArray

Specifies an array of points describing the faults. The coordinate system used to describe the faults must be identical to the one used to specified the input data points. Disjoint faults must be separated by a point whose coordinates are set to the null value, as specified in resource XmNnullValue. Faults with first and last points that are identical will be closed. This resource is specified as a pointer to an array of points represented by a data structure of type XintFaultPoint which takes the following form:

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


XmNfaultPointCount

Specifies the number of points (including "null" points) in the array specified by resource XmNfaultPointArray.

XmNgridData

Specifies the input data as a regular grid. The grid is specified as an array of Z values, with dimensions defined using resources XmNnumGridX and XmNnumGridY. This resource can also be used to retrieve the grid calculated by the gridder when the input to the Contour widget is specified as an array of scattered points through resource XmNpointArray.

XmNgriddingMethod

Specifies the gridding method used by the gridder. See the Gridding Method section for more information on the different gridding methods.

Resource ValueDescription
XintGRIDDING_GLOBALUse the Global gridding method.
XintGRIDDING_SCATTERUse the Scatter gridding method.
XintGRIDDING_CLUSTERUse the Cluster gridding method.
XintGRIDDING_WEIGHTEDUse the Weighted gridding method.
XintGRIDDING_AUTOMATICLet the Contour widget select the gridding method based on the number of points in the data set.


XmNgridRefinement

Specifies the number of subdivisions of the grid used for surface evaluation and interpolation. Specify a positive number or specify 0 to have the widget automatically calculate the number of subdivisions based on the number of pixels per grid interval. This resource is used in the contour phase and it affects the smoothness of the display.

XmNinterpolationDistance

Specifies the interpolation distance as a percentage of the grid length in user coordinates. If the vertical and horizontal length are different, the percentage is relative to the largest of the two.

XmNnullValue

Specifies a floating point value, used by the gridder, to represent grid nodes with missing values.

XmNnumberOfOctants

Specifies the number of octants surrounding a point that needs to be defined for the point value to be extrapolated. Reducing this value will tend to fill gaps that may exist in the coverage.

XmNnumGridX

Specifies the grid size in the X direction.

XmNnumGridY

Specifies the grid size in the Y direction.

XmNnumGridZ

Specifies the number of contour intervals.

XmNradius

Specifies the radius of influence for each point as a percentage of the grid length. If the vertical and horizontal lengths are different, the percentage is relative to the largest of the two. This resource is not used when the Direct gridding method is used. A large radius may be required when the input points are distributed such that large gaps exist in the coverage. Increasing the radius of influence will slow down the gridding process.

XmNsmoothingPassCount

Specifies the number of smoothing passes applied to minimize the curvature of the surface. For more information on smoothing, refer to the Gridding Method section.

XmNsourcePointArray

Specifies an array of points used as the input data for the gridder. This resource is specified as a pointer to an array of points of type XintSourcePoint which takes the following form:

   typedef struct {
                   float x;
                   float y;
                   float z:
   } XintSourcePoint;


XmNsourcePointCount

Specifies the number of points in the source point array.

XmNstartDataX

Specifies the starting value of the grid mesh along the X direction. This resource must be specified if the input data to the Contour widget is a grid. This resource defaults to the minimum X value if the input data to the Contour widget is specified as an array of scattered data points. Use resources XmNhorizontalStart, XmNhorizontalEnd, XmNverticalStart and XmNverticalEnd, inherited from the XintGrid class, to specify the contour image boundaries.

XmNstartDataY

Specifies the starting value of the grid mesh along the Y direction. This resource must be specified if the input data to the Contour widget is a grid. This resource defaults to the minimum Y value if the input data to the Contour widget is specified as an array of scattered data points. Use resources XmNhorizontalStart, XmNhorizontalEnd, XmNverticalStart and XmNverticalEnd, inherited from the XintGrid class, to specify the contour image boundaries.

XmNstartZ

Specifies the minimum contour level value.