IRemapFilter Interface

Provides access to members that control a remap filter.

Members

Name Description
Method AddClass Adds a remap class that remaps values in [minvalue,maxvalue) to a give new value.
Method AddNoDataClass Adds a remap class that remaps values in [minvalue,maxvalue) to NoData.
Read/write property AllowUnmatched Indicates if unmatched values should be passed through.
Read-only property ClassCount The number of remapped classes.
Method Empty Removes all classes.
Method PutClass Puts a remap class at a given class index (starting from 0).
Method QueryClass Queries a remap class at a given class index (starting from 0).

IRemapFilter.AddClass Method

Adds a remap class that remaps values in [minvalue,maxvalue) to a give new value.

Public Sub AddClass ( _
    ByVal minvalue As Double, _
    ByVal maxvalue As Double, _
    ByVal newvalue As Double _
)
public void AddClass (
    double minvalue,
    double maxvalue,
    double newvalue
);

IRemapFilter.AddNoDataClass Method

Adds a remap class that remaps values in [minvalue,maxvalue) to NoData.

Public Sub AddNoDataClass ( _
    ByVal minvalue As Double, _
    ByVal maxvalue As Double _
)
public void AddNoDataClass (
    double minvalue,
    double maxvalue
);

IRemapFilter.AllowUnmatched Property

Indicates if unmatched values should be passed through.

Public Property AllowUnmatched As Boolean
public bool AllowUnmatched {get; set;}

IRemapFilter.ClassCount Property

The number of remapped classes.

Public ReadOnly Property ClassCount As Integer
public int ClassCount {get;}

IRemapFilter.Empty Method

Removes all classes.

Public Sub Empty ( _
)
public void Empty (
);

IRemapFilter.PutClass Method

Puts a remap class at a given class index (starting from 0).

Public Sub PutClass ( _
    ByVal Index As Integer, _
    ByVal minvalue As Double, _
    ByVal maxvalue As Double, _
    ByVal newvalue As Double _
)
public void PutClass (
    int Index,
    double minvalue,
    double maxvalue,
    double newvalue
);

IRemapFilter.QueryClass Method

Queries a remap class at a given class index (starting from 0).

Public Sub QueryClass ( _
    ByVal Index As Integer, _
    ByRef minvalue As Double, _
    ByRef maxvalue As Double, _
    ByRef newvalue As Double _
)
public void QueryClass (
    int Index,
    ref double minvalue,
    ref double maxvalue,
    ref double newvalue
);

Classes that implement IRemapFilter

Classes Description
RemapFilter A class for remap filter.

Remarks

Provides access to the members of IRemapFilter. Similar to the reclass concept, this filters group raster pixel values into classes and creates a raster with those classes. Another benefit of this filter is that you can specify a range of values to be nodata and add it to nodataclass.

Sub remap(pRaster As iRaster, pOutWs As IWorkspace)Dim pFilter As IRemapFilterSet pFilter = New RemapFilter

'add classespFilter.AddClass 5, 20, 0pFilter.AddClass 20, 50, 1pFilter.AddClass 50, 100, 2pFilter.AddClass 100, 120, 3pFilter.AddClass 120, 150, 4pFilter.AddClass 150, 256, 5'add nodatdclass, all values between 0 and 5 (>= 0 and <5) will turn to nodata in the outputpFilter.AddNoDataClass 0, 5

Dim pSaveAs As ISaveAsSet pSaveAs = pRaster'set filterDim pFilterOp As IPixelOperationSet pFilterOp = pRasterSet pFilterOp.PixelFilter = pFilter'save outpSaveAs.saveas "Remap3.img", pOutWs, "IMAGINE Image"End Sub

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.