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; } }