Skip To Content ArcGIS for Developers Sign In Dashboard

StretchRenderer Class

(Esri::ArcGISRuntime::StretchRenderer)

A stretch renderer that can help visualize raster data using RasterLayer. More...

Header: #include <StretchRenderer>
Since: Esri::ArcGISRuntime 100.0
Inherits: BaseStretchRenderer

Public Functions

StretchRenderer(QObject *parent = nullptr)
StretchRenderer(const StretchParameters &stretchParameters, const QList<double> &gammas, bool estimateStats, PresetColorRampType presetColorRampType, QObject *parent = nullptr)
StretchRenderer(const StretchParameters &stretchParameters, const QList<double> &gammas, bool estimateStats, ColorRamp *colorRamp, QObject *parent = nullptr)
~StretchRenderer()
ColorRamp *colorRamp() const

Additional Inherited Members

Detailed Description

A stretch renderer that can help visualize raster data using RasterLayer.

A stretch renderer displays continuous raster cell values across a gradual ramp of colors. Use it to draw a single band of continuous data. The stretch renderer works well when you have a large range of values to display, such as in imagery, aerial photographs, or elevation models.

Stretching improves the appearance of the raster data by spreading its pixel values along a histogram whose minimum and maximum values are defined by the raster's bit depth. For example, an 8-bit raster dataset will be stretched along a histogram from 0 to 255.

Member Function Documentation

StretchRenderer::StretchRenderer(QObject *parent = nullptr)

Default constructor with an optional parent.

Constructs a stretch renderer with a stretchType of StretchType::None.

StretchRenderer::StretchRenderer(const StretchParameters &stretchParameters, const QList<double> &gammas, bool estimateStats, PresetColorRampType presetColorRampType, QObject *parent = nullptr)

Constructor that takes the following parameters:

  • stretchParameters - The StretchParameters.
  • gammas - The list of gamma values.
  • estimateStats - Whether to estimate statistics if they exist.
  • presetColorRampType - The type of color ramp.
  • parent - An optional parent.

StretchRenderer::StretchRenderer(const StretchParameters &stretchParameters, const QList<double> &gammas, bool estimateStats, ColorRamp *colorRamp, QObject *parent = nullptr)

Constructor that takes the following parameters:

  • stretchParameters - The StretchParameters.
  • gammas - The list of gamma values.
  • estimateStats - Whether to estimate statistics if they exist.
  • colorRamp - The ColorRamp object.
  • parent - The optional parent.

StretchRenderer::~StretchRenderer()

Destructor.

ColorRamp *StretchRenderer::colorRamp() const

The ColorRamp object used to create this StretchRenderer.


Feedback on this topic?