Functions | |
bool | Image._pushSchemetkRaster (GridColorScheme cScheme) |
Sets color scheme to use in process of generation of the image representation of the grid. More... | |
Grid | Image.OpenAsGrid () |
Opens the datasource of the image as grid. More... | |
Properties | |
tkGridRendering | Image.AllowGridRendering [get, set] |
Gets or sets the value which indicates whether the image will be rendered as grid, i.e. with a color scheme applied to a band set by Image.SourceGridBandIndex. More... | |
bool | Image.AllowHillshade [get, set] |
Indicate whether hillshade algorithm will be used for generation of image representation of the grid. More... | |
GridColorScheme | Image.CustomColorScheme [get, set] |
Gets or sets the color scheme to render image with. More... | |
GridColorScheme | Image.GridProxyColorScheme [get] |
Gets grid color scheme this proxy image was generated with. The method should be called for proxy images only: Image.IsGridProxy = true. More... | |
bool | Image.GridRendering [get] |
Returns true if the image is rendered as grid. More... | |
PredefinedColorScheme | Image.ImageColorScheme [get, set] |
Gets or sets the predefined color scheme for the image. Applicable for GDAL images only. More... | |
bool | Image.IsGridProxy [get] |
Gets the value which indicates whether an image object represents a visualization proxy for another datasource. More... | |
int | Image.SourceGridBandIndex [get, set] |
Gets or sets index of band within datasource whose values should be used to apply color scheme. More... | |
string | Image.SourceGridName [get] |
Gets the name of the source grid in case the image represent a visualization proxy for a grid. More... | |
Here is a list of properties and methods that affects rendering of grids. The properties and methods described here belong to Image class.
Graph description
Working with grid data.
Image class can be used for rendering grid data. Grid datasources can be rendered in 2 ways:
In both cases the name of the original datasource is stored in Image.SourceGridName property. Source grid can be opened using Image.OpenAsGrid. No interpolation is usually used during rendering of grid datasources since it's often desirable to see borders of individual pixels (see Image.UpsamplingMode, Image.DownsamplingMode). More details on grids see of Grid class.
1. Grid rendering.
Any GDAL-based image can be displayed using so called grid rendering, i.e. not by using it's own colors but by mapping the values of one of its bands to new set of colors. Grid rendering is used depending on datasource type:
Image.IsRgb property can be used to determine whether the current datasource is grid or RGB image. The rendering method can be returned by Image.GridRendering property. Grid rendering always applies to a single band specified by Image.SourceGridBandIndex.
Color scheme for grid rendering can be set using:
Forcing grid rendering for RGB image:
Setting custom unique values color scheme for directly rendered grid:
Setting default color scheme for directly rendered grid:
2. Proxy images for grids.
Proxy image is regular RGB image file created for rendering a grid. It can have BMP or GTiff format and name of the grid + "_proxy" postfix (see details on their creation in Grid class). The rendering of proxy image has no differences compared to any other RGB image. Additional responsibilities of Image class in this case include:
It's implemented like this:
The source grid can be accessed using Image.OpenAsGrid method.
Here is an examples which demonstrate changing of format for proxy image already added to the map from BMP to GTiff (it's not very practical example, but good demonstration of API):
bool Image._pushSchemetkRaster | ( | GridColorScheme | cScheme | ) |
Sets color scheme to use in process of generation of the image representation of the grid.
cScheme | The color scheme. |
Grid Image.OpenAsGrid | ( | ) |
Opens the datasource of the image as grid.
If the image represents a visualization proxy for grid, than the grid datasource will be opened, otherwise the datasource of image itself.
|
getset |
Gets or sets the value which indicates whether the image will be rendered as grid, i.e. with a color scheme applied to a band set by Image.SourceGridBandIndex.
|
getset |
Indicate whether hillshade algorithm will be used for generation of image representation of the grid.
The behaviour has changed in v4.9. Now when active it only switches ColoringType from Hillshade to Gradient. In v.4.8. it used to have the same behaviour as Image.AllowExternalColorScheme.
|
getset |
Gets or sets the color scheme to render image with.
This property should be used for grid datasources in the first place (when there is no build-in colors). But may also be used for a single band of regular RGB/ARGB images for synthetic colors and hillshading. When no custom color scheme is set, grid rendering is chosen the color scheme from Image.ImageColorScheme will be used.
|
get |
Gets grid color scheme this proxy image was generated with. The method should be called for proxy images only: Image.IsGridProxy = true.
Color scheme will be read from .mwleg XML file on the disk.
|
get |
Returns true if the image is rendered as grid.
|
getset |
Gets or sets the predefined color scheme for the image. Applicable for GDAL images only.
The color scheme is used for generation of image representation of the grid.
|
get |
Gets the value which indicates whether an image object represents a visualization proxy for another datasource.
Will return true if the image was opened with Grid.OpenAsImage only. When opened directly the link to the source grid will be lost.
|
getset |
Gets or sets index of band within datasource whose values should be used to apply color scheme.
Other bands will ignored during display process. This is useful for multiband grids (e.g. NetCDF), but may also be used with RGB images, to set synthetic colors for a single band.
|
get |
Gets the name of the source grid in case the image represent a visualization proxy for a grid.