97 void to_png(std::string fname,
int cmap,
bool hillshading =
false);
119 std::function<
Array(
const Array &,
const int current_level)> function,
121 std::vector<float> level_weights = {},
122 int finest_level = 0);
128 Array *p_array =
nullptr;
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:32
Pyramid decomposition class, to handle low-pass pyramids (like Laplacian pyramid).
Definition pyramid.hpp:40
void decompose()
Generate the pyramid decomposition.
Definition pyramid_decomposition.cpp:48
Array transform(std::function< Array(const Array &, const int current_level)> function, int support=0, std::vector< float > level_weights={}, int finest_level=0)
Apply a transformation to each component of the pyramid and return the field constructed based on the...
Definition pyramid_decomposition.cpp:130
std::function< Array(const Array &)> low_pass_filter_function
Reference to the low-pass filter function.
Definition pyramid.hpp:60
int nlevels
Number of levels in the pyramid.
Definition pyramid.hpp:45
Array reconstruct()
Reconstruct a field (ideally identical to the input field) based on the pyramid decomposition.
Definition pyramid_decomposition.cpp:81
Array residual
Residual field (low-pass component) a the coarsest level.
Definition pyramid.hpp:50
std::vector< Array > components
High-pass component for each level.
Definition pyramid.hpp:55
void to_png(std::string fname, int cmap, bool hillshading=false)
Export pyramid as png image file.
Definition pyramid_decomposition.cpp:101
Definition algebra.hpp:28
pyramid_transform_support
Define on which part of the pyramid component the transform function should be applied.
Definition pyramid.hpp:29
@ HIGHPASS_ONLY
High pass component only.
Definition pyramid.hpp:32
@ FULL
Complete field (sum of low and high pass)
Definition pyramid.hpp:30
@ LOWPASS_ONLY
Low pass component only.
Definition pyramid.hpp:31