Commit 20255be3 authored by Dan Lipsa's avatar Dan Lipsa Committed by Kitware Robot

Merge topic 'more-segy-fixes'

c5c670c0 Use a standard 4 byte unsigned int instead of long.
867c2066 Override and vector init warnings.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !4282
parents 68bb565b c5c670c0
......@@ -131,7 +131,7 @@ float vtkSegYIOUtils::readIBMFloat(std::ifstream& in)
// More details at
// https://en.m.wikipedia.org/wiki/IBM_Floating_Point_Architecture
long* longbuffer = reinterpret_cast<long*>(buffer);
uint32_t* longbuffer = reinterpret_cast<uint32_t*>(buffer);
int sign = longbuffer[0] >> 31 & 0x01;
int exponent = longbuffer[0] >> 24 & 0x7F;
float fraction = (longbuffer[0] & 0x00ffffff) / powf(2.0f, 24.0f);
......
......@@ -42,7 +42,7 @@ public:
vtkTypeMacro(vtkSegYReader, vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) override;
vtkSegYReader();
~vtkSegYReader();
~vtkSegYReader() override;
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
......
......@@ -182,9 +182,9 @@ bool vtkSegYReaderInternal::Is3DComputeParameters(
// The samples are uniformly placed at sample interval depths
// Dividing by 1000.0 to convert from microseconds to milliseconds.
float zStep = this->SampleInterval / 1000.0;
std::array<double, 3> o = {coordFirst[0],
coordFirst[1],
- zStep * (this->SampleCountPerTrace - 1)};
std::array<double, 3> o = {{coordFirst[0],
coordFirst[1],
- zStep * (this->SampleCountPerTrace - 1)}};
std::copy(o.begin(), o.end(), origin);
auto s = {xStep, yStep, zStep};
std::copy(s.begin(), s.end(), spacing);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment