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 
19 #include <fstream>
20 #include <vector>
21 
23 
24 /*
25  * Single Seg-Y trace
26  */
28 {
29 public:
30  float xCoordinate;
31  float yCoordinate;
33  std::vector<float> data;
37 };
38 
39 /*
40  * Single Seg-Y trace reader
41  */
43 {
44 private:
45  vtkSegYTraceHeaderBytesPositions traceHeaderBytesPos;
46 
47  int XCoordinate;
48  int YCoordinate;
49 
50 public:
52 
53  void SetXYCoordBytePositions(int x, int y);
54  void PrintTraceHeader(std::ifstream& in, int startPos);
55  bool ReadTrace(int& startPos,
56  std::ifstream& in,
57  int formatCode,
58  vtkSegYTrace* trace);
59  int GetTraceSize(int numSamples, int formatCode);
60 };
61 
62 #endif // vtkSegYTraceReader_h
63 // VTK-HeaderTest-Exclude: vtkSegYTraceReader.h
int GetTraceSize(int numSamples, int formatCode)
std::vector< float > data
void PrintTraceHeader(std::ifstream &in, int startPos)
void SetXYCoordBytePositions(int x, int y)
bool ReadTrace(int &startPos, std::ifstream &in, int formatCode, vtkSegYTrace *trace)
short CoordinateMultiplier