This document is archived and information here might be outdated.  Recommended version.


IRaster Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IR > IRaster Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabase)  

IRaster Interface

Provides access to members that control an in-memory raster.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

The IRaster interface controls the reading of pixels from a Raster object.

Members

Name Description
Method CreateCursor Allocates a Raster Cursor for fast raster scanning.
Method CreatePixelBlock Allocates a PixelBlock of requested size.
Method Read Read a block of pixels starting from the top left corner.
Read/write property ResampleMethod Interpolation method used when reading pixels.

CoClasses that implement IRaster

CoClasses and Classes Description
MosaicRaster (esriDataSourcesRaster) A mosaic of rasters.
Raster (esriDataSourcesRaster) An in-memory representation of a dynamic raster that can perform resampling and reprojection.
RenderedRaster (esriCarto) A raster that is rendered using a renderer.

Remarks

The IRaster interface controls the reading of pixels from a Raster object.

The IRaster interface provides the ability to read data from a raster. This interface controls the resampling technique used when pixels are read from the Raster through the ResampleMethod property.

The CreatePixelBlock method creates a PixelBlock that can be used to read pixels from the Raster. The input Size specifies the number of rows and columns in the PixelBlock and is specified with the Pnt object.

The Read method transfers data into a PixelBlock after it is created. Once the data is read into the PixelBlock, it can be accessed through the methods on that object. The read can be initiated from any pixel in the raster, and the top-left corner of the area being read is specified as a Pnt using the tlc argument.

The CreateCursor method creates a RasterCursor that can be used to successively read the set of PixelBlocks that make up the Raster.

It is recommended to pass an integer type for the X and Y arguments when defining Pnt object for either the demension or the pixel location of the pixel block.

See Also

Raster Class | MosaicRaster Class

.NET Snippets

Create DistanceOp EucDistanceFull Direction Raster | Create LogicalOp Combinatorial XOR Raster | Create TrigOp ATan2 Raster | Create BitwiseOp OR Raster | Create TrigOp ACos Raster | Create DistanceOp EucDistanceFull Distance Raster | Create LogicalOp Combinatorial OR Raster | Create TrigOp Sin Raster | Create GeneralizeOp Aggregate Raster | Create DistanceOp CostDistanceFull Backlink Raster | Create MathOp ABS Raster | Create LogicalOp Boolean XOR Raster | Create ExtractOp Circle Raster | Create DistanceOp EucDirection Raster | Create TrigOp CosH Raster | Create HydrologyOp Basin Raster | Create MathOp Square Root Raster | Create DistanceOp Cost Back Link Raster | Create GeneralizeOp Boundary Clean Raster | Create MathOp Round Down Raster | Create MathOp Round Up Raster | Create BitwiseOp Left Shift Raster | Create NeighborhoodOp Block Statistics Raster | Create TrigOp TanH Raster | Create TrigOp ATanH Raster | Create TrigOp ACosH Raster | Create ConditionalOp Con Raster | Create DistanceOp EucAllocation Raster | Create BitwiseOp AND Raster | Create DistanceOp Corridor Raster | Create DistanceOp EucDistanceFull Allocation Raster | Create LogicalOp Combinatorial AND Raster | Create MathOp Square Raster | Create DistanceOp Cost Path Raster | Create LogicalOp Boolean AND Raster | Create LocalOp Combine Raster | Create TrigOp Tan Raster | Create BitwiseOp Right Shift Raster | Create TrigOp Cos Raster | Create TrigOp ASin Raster | Create LogicalOp Boolean NOT Raster | Create ExtractionOp Attribute Raster | Create DistanceOp CostDistanceFull Least Accumulative Cost Raster | Create LogicalOp Boolean OR Raster | Create DistanceOp Cost Allocation Raster | Create TrigOp ASinH Raster | Create MathOp Times Raster | Create TrigOp ATan Raster | Create DistanceOp CostDistanceFull Cost Allocation Raster | Create DistanceOp Cost Distance Raster | Create BitwiseOp NOT Raster | Create TrigOp SinH Raster

.NET Samples

Create a custom raster type (Code Files: ThumbnailBuilder) | Create a custom default raster renderer (Code Files: RasterRendererMaker_1bit_TIFF_VBNET) | Create a custom NoData pixel filter (Code Files: TestApp) | Create an NDVI custom raster function (Code Files: NDVICustomFunctionUIForm) | Create a custom raster function (Code Files: WatermarkFunction WatermarkFunctionUIForm)

.NET Related Topics

Data processing in spatial analysis operations | DataSourcesRaster | Executing a map algebra expression | Handling multiband output | How to create a custom convolution filter | How to create a raster classify renderer | How to create a raster dataset | How to create a raster stretch renderer | How to create an image server layer | How to georeference a raster using polynomial transformation | How to identify pixel values using a raster object | How to pan sharpen an image | How to project a raster with a datum transformation | How to save raster data and set storage properties | How to set raster properties when saving as a raster | Performing a spatial analysis operation using objects | Pixel filters | Working with field and selection | Working with helper objects | Working with the analysis environment