![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Raster renderer driven by the shared ClassificationScheme — continuous (stretched) or classified single-band colouring. More...
#include "render/classificationscheme.h"#include "render/irasterrenderer.h"#include "render/scalarramplut.h"#include <QColor>#include <QPair>#include <QRgb>#include <QVector>#include <algorithm>#include <array>Go to the source code of this file.
Classes | |
| class | OpenSWMM::Render::GraduatedRasterRenderer |
| ClassificationScheme-driven single-band raster colouring. More... | |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
Raster renderer driven by the shared ClassificationScheme — continuous (stretched) or classified single-band colouring.
The raster analogue of GraduatedRenderer on the feature side and the model behind the raster Symbology tab's "Singleband pseudocolor" renderer. Everything the shared ClassificationEditor edits (Continuous/Classified mode, ramp + invert, method, class count, manual breaks, custom range, per-class colour / label overrides, label format) lives in the embedded ClassificationScheme; this class adds what a raster needs on top:
Hot path: colorForValue() is pure arithmetic over state baked by rebake() — a 256-entry LUT for Continuous mode (ScalarRampLut contract) and one QRgb per class for Classified mode. Every mutator rebakes eagerly, so the clone() handed to a tile worker is immutable: no lazy caches, no locking, and no ClassificationScheme call per pixel (the scheme's colour lookups build a RasterColorRamp on every call).