

Public Class CIMRasterRGBColorizer Inherits CIMRasterColorizer Implements System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
public class CIMRasterRGBColorizer : CIMRasterColorizer, System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
{
// Get the colorizer from the raster layer.
//Note: needs to be called on the QueuedTask
CIMRasterColorizer rColorizer = rasterLayer.GetColorizer();
// Check if the colorizer is an RGB colorizer.
if (rColorizer is CIMRasterRGBColorizer rasterRGBColorizer)
{
// Update RGB colorizer properties.
rasterRGBColorizer.StretchType = RasterStretchType.ESRI;
// Update the raster layer with the changed colorizer.
rasterLayer.SetColorizer(rasterRGBColorizer);
}
}
{
// Get the image sub-layer from the mosaic layer.
//Note: needs to be called on the QueuedTask
ImageMosaicSubLayer mosaicImageSubLayer = mosaicLayer.GetImageLayer();
// Get the colorizer from the image sub-layer.
CIMRasterColorizer rColorizer = mosaicImageSubLayer.GetColorizer();
// Check if the colorizer is an RGB colorizer.
if (rColorizer is CIMRasterRGBColorizer rasterRGBColorizer)
{
// Update RGB colorizer properties.
rasterRGBColorizer.StretchType = RasterStretchType.ESRI;
// Update the image sub-layer with the changed colorizer.
mosaicImageSubLayer.SetColorizer(rasterRGBColorizer);
}
}
{
// Get the colorizer from the image service layer.
//Note: needs to be called on the QueuedTask
CIMRasterColorizer rColorizer = imageServiceLayer.GetColorizer();
// Check if the colorizer is an RGB colorizer.
if (rColorizer is CIMRasterRGBColorizer rasterRGBColorizer)
{
// Update RGB colorizer properties.
rasterRGBColorizer.StretchType = RasterStretchType.ESRI;
// Update the image service layer with the changed colorizer.
imageServiceLayer.SetColorizer((CIMRasterColorizer)rasterRGBColorizer);
}
}
System.Object
ArcGIS.Core.CIM.CIMObject
ArcGIS.Core.CIM.CIMRasterColorizer
ArcGIS.Core.CIM.CIMRasterRGBColorizer
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)