Click or drag to resize
SoVRSegyFileReader Class

SEGY file format reader.

Inheritance Hierarchy

Namespace: OIV.VolumeViz.Readers
Assembly: OIV.VolumeViz (in OIV.VolumeViz.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoVRSegyFileReader : SoVolumeReader

The SoVRSegyFileReader type exposes the following members.

Constructors
  NameDescription
Public methodSoVRSegyFileReader

Constructor.

Top
Methods
  NameDescription
Public methodCloseAllHandles

Close all resources that are locked by the reader.

(Inherited from SoVolumeReader.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetBorderFlag Obsolete.
(Inherited from SoVolumeReader.)
Public methodGetConfiguredWriter (Inherited from SoVolumeReader.)
Public methodGetCoordinateType

Returns coordinate type used by the data set.

(Inherited from SoVolumeReader.)
Public methodGetCrosslineRange

Gets the crossline range.

Public methodGetDataChar

Gets the characteristics (file header) of the data volume.

(Overrides SoVolumeReaderGetDataChar(SbBox3f, SoDataSetDataTypes, SbVec3i32).)
Public methodGetDirectCoordSys

Return whether the coordinate system used is direct or not.

(Inherited from SoVolumeReader.)
Public methodGetDirectCoordSysAutoDetection

Return automatic detection value.

(Inherited from SoVolumeReader.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetFilename

Returns the path of the file.

(Inherited from SoVolumeReader.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetHistogram(IListInt64)

Returns histogram if available.

(Inherited from SoVolumeReader.)
Public methodGetHistogram(Queue) Obsolete.
Returns histogram if stored in file.
(Inherited from SoVolumeReader.)
Public methodGetInlineRange

Gets the inline range.

Public methodGetMinMax(Double, Double)

Returns min max for float data type, if available.

(Inherited from SoVolumeReader.)
Public methodGetMinMax(Int32, Int32) Obsolete.
(Inherited from SoVolumeReader.)
Public methodGetMinMax(Int64, Int64)

Returns min and max for integer data type, if available.

(Inherited from SoVolumeReader.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetNumSignificantBits

This method is optional.

(Inherited from SoVolumeReader.)
Public methodGetNumTraces

Returns the number of traces.

Public methodGetNumVoxels

Utility function provided by OIV.LDM.Readers.SoVolumeReader for subclass readers to call.

(Inherited from SoVolumeReader.)
Public methodGetOriginalFilename

Returns original file name from which the data has been converted to LDM format if stored in file.

(Inherited from SoVolumeReader.)
Public methodGetP1P2P3Coordinates

Gets the P1, P2, P3 and P4 coordinates.

Public methodGetReaderType

Returns the reader type, in this case, the enum value OIV.LDM.Readers.SoVolumeReader.ReaderTypes.SEGY.

(Overrides SoVolumeReaderGetReaderType.)
Public methodGetRectilinearCoordinates

Returns the coordinates for the specified axis.

(Inherited from SoVolumeReader.)
Public methodGetSegyAxisOrder

Get the storage order for X, Y, and Z axis.

Public methodGetSegyByteOrder

Gets the byte ordering to use when reading the SEGY file.

Public methodGetSegyFileHeader(SoVRSegyFileHeader)
Calls GetSegyFileHeader(fileHeader, false).
Public methodGetSegyFileHeader(SoVRSegyFileHeader, Boolean)

Gets the SEGY file header.

Public methodGetSegyTextHeader

Retreives the textual header (the first 3200-bytes) of the SEGY file.

Public methodGetSegyTraceData(Int32, SbNativeArrayByte)
Public methodGetSegyTraceData(Int32, SbNativeArrayByte, Int32)
Public methodGetSegyTraceData(Int32, SbNativeArrayByte, Int32, Int32)
Public methodGetSegyTraceHeader

Gets the SEGY trace header of the given trace traceNumber .

Public methodGetSegyTraceHeaderBytePosition

Gets the byte positions within the trace header.

Public methodGetSizeToAllocate

Utility function provided by OIV.LDM.Readers.SoVolumeReader for subclass readers to call.

(Inherited from SoVolumeReader.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetSubSlice(SbBox2i32, Int32, SoBufferObject)

Same as OIV.LDM.Readers.SoVolumeReader.GetSubSlice(OIV.Inventor.SbBox2i32, System.Int32, OIV.Inventor.Generic.SbNativeArray{{System.Byte}}) but using an OIV.Inventor.Devices.SoBufferObject as the target of the data.

(Inherited from SoVolumeReader.)
Public methodGetSubSlice(SbBox2i32, Int32, SbNativeArrayByte)

Must copy the rectangular part defined by subSlice of the XY slice sliceNumber to the memory referenced by data.

(Overrides SoVolumeReaderGetSubSlice(SbBox2i32, Int32, SbNativeArrayByte).)
Public methodGetTileMinMax

Returns the minimum and maximum data values for the given tile.

(Inherited from SoVolumeReader.)
Public methodGetTileSize

Returns tile dimensions in voxels when using data stored in tiles.

(Inherited from SoVolumeReader.)
Public methodGetTraceCoord
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetZRange

Gets the Z (time axis range.

Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsIgnoredFile

Should return true if at least one file has been ignored during reading.

(Inherited from SoVolumeReader.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsSegyRegular

Sets the trace header of a specific trace used to read the SEGY file [OPTIONAL].

Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodReadTile(Int32, SbBox3i32)

Given an index, reads a tile if the data is organized in tiles (for LDM).

(Inherited from SoVolumeReader.)
Public methodReadTile(Int32, SoBufferObject, SbBox3i32) Obsolete.

Same as OIV.LDM.Readers.SoVolumeReader.ReadTile(System.Int32, OIV.Inventor.Generic.SbNativeArray{{System.Byte}}, OIV.Inventor.SbBox3i32) but using an OIV.Inventor.Devices.SoBufferObject (allocated by LDM) as the target of the data.

(Inherited from SoVolumeReader.)
Public methodReadTile(Int32, SbNativeArrayByte, SbBox3i32) Obsolete.

Given an index, reads a tile if the data is organized in tiles (for LDM).

(Inherited from SoVolumeReader.)
Public methodReadXSliceInTile

Read directly from the data source, an orthoslice on the X axis (Zaxis == 0) inside a tile.

(Inherited from SoVolumeReader.)
Public methodReadXTraceInTile

Read directly from the data source, a trace inside a tile.

(Inherited from SoVolumeReader.)
Public methodReadYSliceInTile

Read directly from the data source, an orthoslice on the Y axis (Zaxis == 1) inside a tile.

(Inherited from SoVolumeReader.)
Public methodReadZSliceInTile

Read directly from the data source, an orthoslice on the Z axis (Zaxis == 2) inside a tile.

(Inherited from SoVolumeReader.)
Public methodReloadTileMinMax
(Inherited from SoVolumeReader.)
Public methodRestoreAllHandles

Restore resources that were closed by OIV.LDM.Readers.SoVolumeReader.CloseAllHandles().

(Inherited from SoVolumeReader.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetCrosslineRange

Sets the crossline range.

Public methodSetDirectCoordSysAutoDetection

Sets whether or not the reader should automatically try to detect if the coordinate system used is direct (right-handed) or not.

(Overrides SoVolumeReaderSetDirectCoordSysAutoDetection(Boolean).)
Public methodSetDirectCoorSys

Specifies if the coordinate system used is direct (right-handed) or not.

(Overrides SoVolumeReaderSetDirectCoorSys(Boolean).)
Public methodSetFilename

Specifies the path of the file.

(Overrides SoVolumeReaderSetFilename(String).)
Public methodSetInlineRange

Sets the inline range.

Public methodSetInputDataRange

Requests that the input be converted from the specified range to the range depending on the output data type.

(Overrides SoVolumeReaderSetInputDataRange(Boolean, Double, Double).)
Public methodSetName (Inherited from SoBase.)
Public methodSetOutputDataType

Requests that the input be converted (if necessary) to the specified data type.

(Overrides SoVolumeReaderSetOutputDataType(Boolean, SoDataSetDataTypes).)
Public methodSetRectilinearCoordinates

Sets rectilinear coordinates for the data set.

(Inherited from SoVolumeReader.)
Public methodSetSegyAxisOrder

Sets the storage order for X, Y, and Z axes.

Public methodSetSegyByteOrder

Sets the byte ordering to use when reading the SEGY file.

Public methodSetSegyFileHeader

Specifies the header used to read the SEGY file.

Public methodSetSegyTextHeaderAscii

Tells whether the textual header format is ASCII or not.

Public methodSetSegyTraceHeaderBytePosition

Tells the file reader where the fields are actually located (i.e., the byte positions) within the trace header.

Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodSetUserData Obsolete.
Stores the userData (for example the filename string) in the m_data protected variable.
(Inherited from SoVolumeReader.)
Public methodStatic memberSetVolumeSizeVoxels

If true, the volume extent (bounds in world coordinates) is set to 0 to dimension-1 on each axis.

Public methodSetZRange

Sets the Z (time axis) range.

Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoBase.)
Top
Properties
  NameDescription
Public propertyDataConverted
true if the data is already organized in tiles for the LDM module. In other words, all drivers that directly support the GetTile() method should set DataConverted to true. If true, VolumeViz will use the ReadTile method and will NOT call GetSubSlice().
(Inherited from SoVolumeReader.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyIsRGBA

Returns true if the data set contains RGBA color values.

(Inherited from SoVolumeReader.)
Public propertyIsThreadSafe

Should return true if the reader is thread safe.

(Inherited from SoVolumeReader.)
Public propertyScanningProgressCallback

Sets a progress callback when the SEGY file is scanned.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Remarks

Reader for SEGY files (SEG Y revision 1). The following data types are supported: unsigned or signed byte, short, int32, and float.

SEGY is a widely used format for storing seismic trace data, defined by the Society of Exploration Geophysicists publication "Digital Tape Standards" (http://www.seg.org). The VolumeViz reader supports all sizes of integer and float data, and can correctly determine the number of samples per trace in most cases.

The data will be mapped to the Open Inventor axes as follows:

  • The trace length is mapped onto the Inventor X axis (time).

  • The number of trace sensors per line is mapped onto the Inventor Y axis (inlines).

  • Z is the number of lines (crosslines).

Although in most cases the SEGY reader can automatically detect if the number of traces per line in a SEGY file is not uniform, in some cases it cannot. However, be aware that the initialization for file reading will take longer when this environment variable is set. Missing data is assigned the value zero.

Although in most cases the SEGY reader can automatically detect if the length of traces in a SEGY data file is not uniform, in some cases it cannot. However, be aware that the initialization for file reading will take significantly longer when this environment variable is set. Missing data is assigned the value zero.

In most cases the SEGY reader can automatically detect if the values in the file need to be "byte swapped", for example if the data was written on a "big-endian" machine (e.g., SPARC) and is being read on a "little-endian" machine (e.g., Intel). If necessary you can force byte swapping on or off using the environment variable IVVR_SEGY_SWAPBYTES.

A value of 1 in the format field of the SEGY header normally means that the data values were written in IBM floating point format. But in some cases the values were actually written in IEEE floating point format (which should be indicated by format = 5). Normally the SEGY reader is able to detect this, but if necessary you can specify that float values are in IEEE format by setting environment variable IVVR_SEGY_FLOATISIEEE.

If the SEGY reader fails to read the file correctly, you can set the following environment variables:

  • IVVR_SEGY_DEBUG=1 This outputs information of what the reader is actually doing.

  • IVVR_SEGY_DUMP=filename This requests that some information of the file and trace headers be written to the specified file while processing the SEGY data file. All these information can be sent to the VSG support for assitance.

Limitations: In some circontances few first traces might be skipped, typically when the first line contains only one trace (this trace might be skipped). In such a case a message warns the application of how many traces are actually skipped (throught OIV.Inventor.Errors.SoDebugError).

See OIV.Inventor.SoPreferences for information on using environment variables.

In some cases information such as line numbers and crossline numbers will be stored in non-standard locations in the header. Applications can specify the byte position of values within the header using the OIV.VolumeViz.Readers.SoVRSegyFileReader.SetSegyTraceHeaderBytePosition(OIV.VolumeViz.Readers.SoVRSegyTraceHeaderBytePosition) method. Example :

SoVRSegyFileReader reader = new SoVRSegyFileReader();
SoVRSegyTraceHeaderBytePosition bytePos = new SoVRSegyTraceHeaderBytePosition();
bytePos.SetBytePosition(SoVRSegyTraceHeaderBytePosition.TraceAttributes.SEGY_INLINE   , 189);
bytePos.SetBytePosition(SoVRSegyTraceHeaderBytePosition.TraceAttributes.SEGY_CROSSLINE, 193);
reader.SetSegyTraceHeaderBytePosition(bytePos);
reader.SetFilename(theFilePath);

Information about the range of inline / crossline numbers and the range of time values can be queried using the OIV.VolumeViz.Readers.SoVRSegyFileReader.GetInlineRange(System.Int32@, System.Int32@, System.Int32@), OIV.VolumeViz.Readers.SoVRSegyFileReader.GetCrosslineRange(System.Int32@, System.Int32@, System.Int32@) and OIV.VolumeViz.Readers.SoVRSegyFileReader.GetZRange(System.Int32@, System.Int32@, System.Int32@) methods.

Applications can use this class to open a SEGY file and extract information from the file directly (in other words without necessarily creating a volume data node). To get the SEGY text file header call OIV.VolumeViz.Readers.SoVRSegyFileReader.GetSegyTextHeader(). To get the SEGY binary file header call OIV.VolumeViz.Readers.SoVRSegyFileReader.GetSegyFileHeader(OIV.VolumeViz.Readers.SoVRSegyFileHeader@, System.Boolean). To get the header of a specific trace call OIV.VolumeViz.Readers.SoVRSegyFileReader.GetSegyTraceHeader(System.Int32, OIV.VolumeViz.Readers.SoVRSegyTraceIdHeader@). To get the values in a specific trace call ().

See Also