23#ifndef _SO_VR_SEGY_FILE_READER_
24#define _SO_VR_SEGY_FILE_READER_
26#include <LDM/readers/SoVolumeReader.h>
27#include <VolumeViz/readers/SoVRSegyReader.h>
28#include <Inventor/STL/vector>
29#include <VolumeViz/nodes/SoVolumeData.h>
32#pragma warning( push )
33#pragma warning(disable:4251)
390 virtual void getZRange(
int &from,
int &to,
int &step );
470 virtual int getSegyTraceData(
int traceNumber,
void* &traceData,
int start = 0,
int size = -1 );
510 static void ibm2ieee(
int numValues,
void* ibm2ieeeBuffer );
515 void *m_scanningCBdata;
518 bool m_textHeaderAscii;
524 bool m_swapBytesData;
530 bool m_trHdrBytePosSet;
533 bool m_crosslineRangeSet;
534 int m_crosslineFrom, m_crosslineTo, m_crosslineStep;
535 bool m_inlineRangeSet;
536 int m_inlineFrom, m_inlineTo, m_inlineStep;
538 int m_zFrom, m_zTo, m_zStep;
547 double m_dataRangeMin, m_dataRangeMax;
557 bool m_constantTraceLength;
558 unsigned int m_numSamplesPerTrace;
559 unsigned int m_numTracesPerLine;
560 unsigned int m_numLines;
566 std::vector<int64_t> m_traceOffset;
567 std::vector<int> m_traceLength;
575 bool m_regularTraceNum;
584 static bool m_isVolumeSizeVoxels ;
586 int getTraceNum(
const int,
const int );
588 bool searchForPoint(
const int which,
int & i,
int & j,
SbVec2d & P );
589 void extrapolatePoint(
SbVec2d & P0,
int & i0,
int & j0,
590 const SbVec2d & Px,
int ix,
int jx,
591 const SbVec2d & Py,
int iy,
int jy,
592 int newi0,
int newj0 );
593 float evaluateValuesValidity(
const int num_values,
const float *values );
594 float evaluateValuesCorrelation(
const int trace,
const int format1,
const bool swap1,
const int format2,
const bool swap2 );
600 std::vector<std::vector<int>> m_traceMap;
604#pragma warning( pop )
Class for smart character strings.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 2D vector class ...
DataType
Supported data type.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> SEGY file format read...
virtual SoVRSegyTraceHeaderBytePosition getSegyTraceHeaderBytePosition()
Gets the byte positions within the trace header.
virtual void setSegyTextHeaderAscii(bool ascii)
Tells whether the textual header format is ASCII or not.
virtual void setSegyByteOrder(SegyByteOrder byteOrder)
Sets the byte ordering to use when reading the SEGY file.
SoVRSegyFileReader()
Constructor.
virtual int getSegyTraceData(int traceNumber, void *&traceData, int start=0, int size=-1)
Gets the SEGY trace data of the specified trace traceNumber.
virtual SbBool getP1P2P3Coordinates(SbVec2d &P1, SbVec2d &P2, SbVec2d &P3, SbVec2d &P4)
Gets the P1, P2, P3 and P4 coordinates.
virtual SoVolumeReader::ReaderType getReaderType()
Returns the reader type, in this case, the enum value SoVolumeReader::SEGY.
virtual void setCrosslineRange(int from, int to, int step)
Sets the crossline range.
virtual int setFilename(const SbString &filename)
Specifies the path of the file.
virtual SbBool setSegyFileHeader(const SoVRSegyFileHeader &fileHeader)
Specifies the header used to read the SEGY file.
virtual SbBool setInputDataRange(SbBool doChange, double min, double max)
Requests that the input be converted from the specified range to the range depending on the output da...
virtual SegyAxisOrder getSegyAxisOrder()
Get the storage order for X, Y, and Z axis.
virtual void getZRange(int &from, int &to, int &step)
Gets the Z (time axis range.
static void setVolumeSizeVoxels(SbBool flag)
If TRUE, the volume extent (bounds in world coordinates) is set to 0 to dimension-1 on each axis.
virtual void getCrosslineRange(int &from, int &to, int &step)
Gets the crossline range.
virtual SbBool setDirectCoordSysAutoDetection(SbBool autoValue)
Sets whether or not the reader should automatically try to detect if the coordinate system used is di...
virtual SegyByteOrder getSegyByteOrder()
Gets the byte ordering to use when reading the SEGY file.
SegyScanningResp
SoSegyScanningCB return code.
SegyByteOrder
Segy byte order mode.
@ SEGY_BIG_ENDIAN
Big endian.
@ SEGY_LITTLE_ENDIAN
Little endian.
void setScanningProgressCallback(SoSegyScanningCB *func, void *data)
Sets a progress callback when the SEGY file is scanned.
virtual SbBool isSegyRegular()
Sets the trace header of a specific trace used to read the SEGY file [OPTIONAL].
virtual SbBool getSegyFileHeader(SoVRSegyFileHeader &fileHeader, bool readFile=false)
Gets the SEGY file header.
virtual SbString getSegyTextHeader()
Retreives the textual header (the first 3200-bytes) of the SEGY file.
SegyScanningResp SoSegyScanningCB(void *data, float percent, SoVRSegyFileReader *reader)
SoSegyScanningCB Callback type.
SegyAxisOrder
SegY axis order mode.
@ XYZ_AS_INLINE_CROSSLINE_SAMPLE
XYZ_AS_INLINE_CROSSLINE_SAMPLE.
@ XYZ_AS_SAMPLE_INLINE_CROSSLINE
XYZ_AS_SAMPLE_INLINE_CROSSLINE.
virtual SbBool setOutputDataType(SbBool doChange, SoDataSet::DataType type)
Requests that the input be converted (if necessary) to the specified data type.
bool getTraceCoord(const int i, const int j, SbVec2d &P)
virtual ReadError getDataChar(SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim) override
Gets the characteristics (file header) of the data volume.
virtual SbBool setDirectCoorSys(SbBool directCoord)
Specifies if the coordinate system used is direct (right-handed) or not.
virtual void setInlineRange(int from, int to, int step)
Sets the inline range.
virtual void setSegyAxisOrder(SegyAxisOrder axisOrder)
Sets the storage order for X, Y, and Z axes.
virtual void setZRange(int from, int to, int step)
Sets the Z (time axis) range.
virtual SbBool getSegyTraceHeader(int traceNumber, SoVRSegyTraceIdHeader &traceHeader)
Gets the SEGY trace header of the given trace traceNumber .
virtual void setSegyTraceHeaderBytePosition(const SoVRSegyTraceHeaderBytePosition &traceHeaderBytePosition)
Tells the file reader where the fields are actually located (i.e., the byte positions) within the tra...
virtual int getNumTraces()
Returns the number of traces.
virtual void getSubSlice(const SbBox2i32 &subSlice, int sliceNumber, void *data)
Must copy the rectangular part defined by subSlice of the XY slice sliceNumber to the memory refe...
virtual void getInlineRange(int &from, int &to, int &step)
Gets the inline range.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Abstract...
virtual ReadError getDataChar(SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim)=0
Gets the characteristics (file header) of the data volume.
ReaderType
Available reader type.
virtual void getSubSlice(const SbBox2i32 &subSlice, int sliceNumber, void *data)
Must copy the rectangular part defined by subSlice of the XY slice sliceNumber to the memory refe...