Log I/O
Loading...
Searching...
No Matches
DlisCurve Class Referencesealed

Model a log curve of a DLIS file. More...

Public Member Functions

void AddValue (int dimension, object value)
 Add a value to this curve.
 
void AddValue (object value)
 Add a value to the first dimension of this curve.
 
void Clear ()
 Remove all values from this curve.
 
 DlisCurve (string name, string unit, string description, int representationCode, int nDimensions)
 Create a DLIS log curve.
 
string GetAxisName (int axisNo)
 Return name of the specified axis.
 
string GetDescription ()
 Return description of this curve.
 
string GetName ()
 Return name of this curve.
 
int GetNAxes ()
 Return number of axes for a multidimensional curve.
 
int GetNDimensions ()
 Return the number of dimensions in this curve.
 
int GetNDimensions (int axisNo)
 Return the number of dimensions along the specified axis.
 
int GetNValues ()
 Return the number of values (per dimension) in this curve.
 
object[] GetRange ()
 Return the range (i.e the min and max value) of this curve.
 
int GetRepresentationCode ()
 Return the DLIS representation code for the values of this curve.
 
Statistics GetStatistics ()
 Return curve statistics.
 
string GetUnit ()
 Return unit of measure of the values of this curve.
 
object GetValue (int dimension, int index)
 Return a specific value from the given dimension of this curve.
 
object GetValue (int index)
 Return a specific value from this curve.
 
object GetValue (int[] axisPosition, int index)
 Return a specific value within the specified axis position at the given index of this curve.
 
Type GetValueType ()
 Return value type (i.e the .Net type) of the curve values.
 
override string ToString ()
 

Detailed Description

Model a log curve of a DLIS file.

A log curve consists of measurement data of a specific type. The curve may have one or more dimensions.

Author
Petroware AS

Constructor & Destructor Documentation

◆ DlisCurve()

DlisCurve ( string name,
string unit,
string description,
int representationCode,
int nDimensions )

Create a DLIS log curve.

Parameters
nameName (mnemonic) of curve. Non-null.
unitUnit of measure for the curve data. Null if unknown or unitless.
descriptionCurve long name or description. May be null if not provided.
representationCodeType of curve data. See DlisType.
nDimensionsNumber of dimensions in curve. [1,>.

Member Function Documentation

◆ AddValue() [1/2]

void AddValue ( int dimension,
object value )

Add a value to this curve.

Parameters
dimensionDimension index. [0,nDimensions>.
valueValue to add. Null to indicate absent.

◆ AddValue() [2/2]

void AddValue ( object value)

Add a value to the first dimension of this curve.

This is a convenience method if the client knows that there is only one dimension in the curve. Equivalent of calling AddValue(0, value).

Parameters
valueValue to add. Null to indicate absent.

◆ GetAxisName()

string GetAxisName ( int axisNo)

Return name of the specified axis.

Parameters
axisNoAxis to get name of. [0,nAxes>.
Returns
Name of the requested axis. Null if none provided.
Exceptions
ArgumentExceptionIf axisNo is out of bounds.

◆ GetDescription()

string GetDescription ( )

Return description of this curve.

Returns
Description of this curve. Null if not provided.

◆ GetName()

string GetName ( )

Return name of this curve.

Returns
Name of this curve. Never null.

◆ GetNAxes()

int GetNAxes ( )

Return number of axes for a multidimensional curve.

For a single value curve, the number returned is always 0. For a multidimensional curve the number returned is [1,>.

Returns
Number of axes. [0,>.

◆ GetNDimensions() [1/2]

int GetNDimensions ( )

Return the number of dimensions in this curve.

In case the curve contains multiple axes (see getNAxes()) this number is the Cartesian product of their dimensions.

Returns
Number of dimensions in this curve. [1,>.

◆ GetNDimensions() [2/2]

int GetNDimensions ( int axisNo)

Return the number of dimensions along the specified axis.

Parameters
axisNoAxis to get dimension of. [0,nAxes>.
Returns
Dimension of the requested axis. [1,>.
Exceptions
ArgumentExceptionIf axisNo is out of bounds.

◆ GetNValues()

int GetNValues ( )

Return the number of values (per dimension) in this curve.

All dimensions have the same number of values.

Returns
Number of values in this curve. [0,>.

◆ GetRange()

object[] GetRange ( )

Return the range (i.e the min and max value) of this curve.

The returned array is never null. The two entries may be null if min/max does not exist.

If the curve is multi-dimensional, the range is reported across all dimensions.

The objects returned is of type according to GetValueType().

Returns
The range of this curve as an array of two (min/max). Never null. The entries may be null if no range exists.

◆ GetRepresentationCode()

int GetRepresentationCode ( )

Return the DLIS representation code for the values of this curve.

This is the internal type of the curve data as defined by DLIS. It is exposed in the API for information only. The actual (.Net) type of the curve data is retrieved from GetValueType().

Returns
Representation code for the values of this curve.

◆ GetStatistics()

Statistics GetStatistics ( )

Return curve statistics.

Statistics is available even if log data has not been stored.

Returns
Curve statistics. Never null.

◆ GetUnit()

string GetUnit ( )

Return unit of measure of the values of this curve.

Returns
Unit of measure of the curve values. Null if N/A, unitless or not provided.

◆ GetValue() [1/3]

object GetValue ( int dimension,
int index )

Return a specific value from the given dimension of this curve.

The object returned is of type according to GetValueType().

Parameters
dimensionDimension index. [0,nDimensions>.
indexPosition index. [0,nValues>.
Returns
The requested value. Null if absent.

◆ GetValue() [2/3]

object GetValue ( int index)

Return a specific value from this curve.

If this is a multi-dimensional curve, the value is retrieved from the first dimension.

This is a convenience method if the caller knows that there is only one dimension in the curve. Equivalent of calling GetValue(0, index).

The object returned is of type according to GetValueType().

Parameters
indexPosition index. [0,nValues>.
Returns
The requested value. Null if absent.

◆ GetValue() [3/3]

object GetValue ( int[] axisPosition,
int index )

Return a specific value within the specified axis position at the given index of this curve.

This is a convenience method for accessing elements within a multidimensional curve with multiple axes.

Parameters
axisPositionAxis position to get value from. Non-null. Array length must equal GetNAxes() and index i must be [0, GetNDimensions(i)>.
indexPosition index. [0,nValues>.
Returns
The requested value. Null if absent.
Exceptions
ArgumentNullExceptionIf axisPosition is null.
ArgumentExceptionIf axisPosition has wrong length or its content is out of bounds, or if index is out of bounds.

◆ GetValueType()

Type GetValueType ( )

Return value type (i.e the .Net type) of the curve values.

Returns
Value type of curve data. Never null.

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