vtkSegYReaderInternal.h 1.86 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkSegYReaderInternal.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

#ifndef vtkSegYReaderInternal_h
#define vtkSegYReaderInternal_h
#ifndef __VTK_WRAP__

#include <fstream>
#include <string>
#include <vector>

// Forward declarations
class vtkStructuredGrid;
class vtkImageData;
class vtkSegYTraceReader;
class vtkSegYTrace;
class vtkSegYBinaryHeaderBytesPositions;

class vtkSegYReaderInternal
{
public:
  vtkSegYReaderInternal();
35 36
  vtkSegYReaderInternal(const vtkSegYReaderInternal& other) = delete;
  vtkSegYReaderInternal& operator=(const vtkSegYReaderInternal& other) = delete;
37 38 39
  ~vtkSegYReaderInternal();

public:
40
  bool Is3DComputeParameters(int* extent, double* origin, double* spacing, int* spacingSign);
41 42
  void LoadTraces();

43 44
  void ExportData(vtkImageData*, int* extent,
                  double* origin, double* spacing, int* spacingSign);
45
  void ExportData(vtkStructuredGrid*, int* extent);
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

  void SetXYCoordBytePositions(int x, int y);
  void SetVerticalCRS(int);

  std::ifstream In;

protected:
  bool ReadHeader();

private:
  std::vector<vtkSegYTrace*> Traces;
  vtkSegYBinaryHeaderBytesPositions* BinaryHeaderBytesPos;
  vtkSegYTraceReader* TraceReader;
  int VerticalCRS;
  // Binary Header
  short SampleInterval;
  int FormatCode;
  int SampleCountPerTrace;
};

#endif
#endif // vtkSegYReaderInternal_h
// VTK-HeaderTest-Exclude: vtkSegYReaderInternal.h