OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
lodalgo.h
Go to the documentation of this file.
1 // Copyright 2017-2020, Schlumberger
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 //Adapted from: Zgy/ArrayBasic/ArrayTile
16 #pragma once
17 
18 #include "../declspec.h"
19 #include "enum.h"
20 
21 #include <cstdint>
22 #include <memory>
23 #include <array>
24 
30 namespace InternalZGY {
31 #if 0
32 }
33 #endif
34 
35 class DataBuffer;
36 template<typename T, int NDim> class DataBufferNd;
37 
45 enum class LodAlgorithm
46 {
47  LowPass = 0,
49  Average,
50  Median,
51  Minimum,
52  Maximum,
53  MinMax,
54  Decimate,
57  AllZero,
58  WhiteNoise,
59  MostFrequent,
61  AverageNon0,
62 };
63 
64 void OPENZGY_TEST_API createLod(const std::shared_ptr<DataBuffer>& result,
65  const std::shared_ptr<const DataBuffer>& input,
66  LodAlgorithm algorithm,
67  const std::int64_t* hist,
68  std::int32_t bincount,
69  double histogram_min,
70  double histogram_max);
71 
72 void OPENZGY_TEST_API createLodMT(const std::shared_ptr<DataBuffer>& result,
73  const std::shared_ptr<const DataBuffer>& input,
74  LodAlgorithm algorithm,
75  const std::int64_t* hist,
76  std::int32_t bincount,
77  double histogram_min,
78  double histogram_max);
79 
80 void OPENZGY_TEST_API createLodST(const std::shared_ptr<DataBuffer>& result,
81  const std::shared_ptr<const DataBuffer>& input,
82  LodAlgorithm algorithm,
83  const std::int64_t* hist,
84  std::int32_t bincount,
85  double histogram_min,
86  double histogram_max);
87 
88 } // namespace
AverageNon0
AverageNon0
Average value, but treat 0 as NaN.
Definition: api.h:265
InternalZGY::LodAlgorithm
LodAlgorithm
Definition: lodalgo.h:45
MostFrequentNon0
MostFrequentNon0
The non-zero value that occurs most frequently.
Definition: api.h:264
AllZero
AllZero
Just fill the LOD brick with zeroes.
Definition: api.h:261
enum.h
enums and type aliases not visible to the public API.
Decimate
Decimate
Simple decimation, use first sample.
Definition: api.h:258
Median
Median
Somewhat more expensive averaging.
Definition: api.h:254
Average
Average
Simple averaging.
Definition: api.h:253
MinMax
MinMax
Checkerboard of minimum and maximum values.
Definition: api.h:257
Maximum
Maximum
Maximum value.
Definition: api.h:256
DecimateSkipNaN
DecimateSkipNaN
Use first sample that is not NaN.
Definition: api.h:259
LowPass
LowPass
Lowpass Z / decimate XY.
Definition: api.h:251
DecimateRandom
DecimateRandom
Random decimation using a fixed seed.
Definition: api.h:260
WhiteNoise
WhiteNoise
Fill with white noise, hope nobody notices.
Definition: api.h:262
WeightedAverage
WeightedAverage
Weighted averaging (depends on global stats).
Definition: api.h:252
InternalZGY
Implementation not visible to clients.
Minimum
Minimum
Minimum value.
Definition: api.h:255
MostFrequent
MostFrequent
The value that occurs most frequently.
Definition: api.h:263