VTK
vtkSegYTraceReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSegYTraceReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef vtkSegYTraceReader_h
17 #define vtkSegYTraceReader_h
18 #ifndef __VTK_WRAP__
19 
20 #include <fstream>
21 #include <vector>
22 
24 
25 /*
26  * Single Seg-Y trace
27  */
29 {
30 public:
34  std::vector<float> Data;
38 };
39 
40 /*
41  * Single Seg-Y trace reader
42  */
44 {
45 private:
46  vtkSegYTraceHeaderBytesPositions traceHeaderBytesPos;
47 
48  int XCoordinate;
49  int YCoordinate;
50 
51 public:
53 
54  void SetXYCoordBytePositions(int x, int y);
55  void PrintTraceHeader(std::ifstream& in, int startPos);
56  void ReadTrace(std::streamoff& startPos,
57  std::ifstream& in,
58  int formatCode,
59  vtkSegYTrace* trace);
60  void ReadInlineCrossline(std::streamoff& startPos,
61  std::ifstream& in,
62  int formatCode,
63  int* inlineNumber, int* crosslineNumber,
64  int* xCoord, int* yCoord, short* coordMultiplier);
65 
66  int GetTraceSize(int numSamples, int formatCode);
67 };
68 
69 #endif
70 #endif // vtkSegYTraceReader_h
71 // VTK-HeaderTest-Exclude: vtkSegYTraceReader.h
std::vector< float > Data
short CoordinateMultiplier