You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
|
|
using System;
|
|
|
|
namespace Unplugged.Segy
|
|
{
|
|
class TraceHeader : ITraceHeader
|
|
{
|
|
public int SampleCount { get; set; }
|
|
public int TraceNumber { get; set; }
|
|
public int InlineNumber { get; set; }
|
|
public int CrosslineNumber { get; set; }
|
|
public int Delay { get; set; }
|
|
public int X { get; set; }
|
|
public int Y { get; set; }
|
|
public int GetValue(int position, int len, bool isLittleEndian)
|
|
{
|
|
int nDataValue = int.MinValue;
|
|
if (headerBuffer == null || headerBuffer.Length == 0)
|
|
{
|
|
return nDataValue;
|
|
}
|
|
|
|
if (len == 2)
|
|
{
|
|
nDataValue = SegyReader.ToInt16(headerBuffer, position, isLittleEndian);
|
|
}
|
|
else if(len == 4)
|
|
{
|
|
nDataValue = SegyReader.ToInt32(headerBuffer, position, isLittleEndian);
|
|
}
|
|
return nDataValue;
|
|
}
|
|
public byte[] headerBuffer;
|
|
}
|
|
}
|