public void SetMosaicRule( CIMMosaicRule mosaicRule )
Public Sub SetMosaicRule( _ ByVal mosaicRule As CIMMosaicRule _ )
Parameters
- mosaicRule
- ArcGIS.Core.CIM.CIMMosaicRule
public void SetMosaicRule( CIMMosaicRule mosaicRule )
Public Sub SetMosaicRule( _ ByVal mosaicRule As CIMMosaicRule _ )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
await QueuedTask.Run(() =>
{
// Get the image sub-layer from the mosaic layer.
ImageServiceLayer mosaicImageSubLayer = mosaicLayer.GetImageLayer();
// Get the mosaic rule.
CIMMosaicRule mosaicingRule = mosaicImageSubLayer.GetMosaicRule();
// Set the Mosaic Method to Center.
mosaicingRule.MosaicMethod = RasterMosaicMethod.Center;
// Update the mosaic with the changed mosaic rule.
mosaicImageSubLayer.SetMosaicRule(mosaicingRule);
});
}
{
await QueuedTask.Run(() =>
{
// Get the image sub-layer from the mosaic layer.
ImageServiceLayer mosaicImageSublayerToUse = mosaicLayer.GetImageLayer();
// Get the mosaic rule.
CIMMosaicRule mosaicRule = mosaicImageSublayerToUse.GetMosaicRule();
// Set the Mosaic Operator to Mean.
mosaicRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
// Update the mosaic with the changed mosaic rule.
mosaicImageSublayerToUse.SetMosaicRule(mosaicRule);
});
}
{
await QueuedTask.Run(() =>
{
// Get the mosaic rule of the image service.
CIMMosaicRule mosaicRule = imageServiceLayer.GetMosaicRule();
// Set the Mosaic Method to Center.
mosaicRule.MosaicMethod = RasterMosaicMethod.Center;
// Update the image service with the changed mosaic rule.
imageServiceLayer.SetMosaicRule(mosaicRule);
});
}
{
await QueuedTask.Run(() =>
{
// Get the mosaic rule of the image service.
CIMMosaicRule mosaicingRule = imageServiceLayer.GetMosaicRule();
// Set the Mosaic Operator to Mean.
mosaicingRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
// Update the image service with the changed mosaic rule.
imageServiceLayer.SetMosaicRule(mosaicingRule);
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)