|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRemapFilter
Provides access to members that control a remap filter.
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 IRemapFilter
Set pFilter = New RemapFilter
'add classes
pFilter.AddClass 5, 20, 0
pFilter.AddClass 20, 50, 1
pFilter.AddClass 50, 100, 2
pFilter.AddClass 100, 120, 3
pFilter.AddClass 120, 150, 4
pFilter.AddClass 150, 256, 5
'add nodatdclass, all values between 0 and 5 (>= 0 and <5) will turn to nodata in the output
pFilter.AddNoDataClass 0, 5
Dim pSaveAs As ISaveAs
Set pSaveAs = pRaster
'set filter
Dim pFilterOp As IPixelOperation
Set pFilterOp = pRaster
Set pFilterOp.PixelFilter = pFilter
'save out
pSaveAs.saveas "Remap3.img", pOutWs, "IMAGINE Image"
End Sub
Method Summary | |
---|---|
void |
addClass(double minvalue,
double maxvalue,
double newvalue)
Adds a remap class that remaps values in [minvalue,maxvalue) to a give new value. |
void |
addNoDataClass(double minvalue,
double maxvalue)
Adds a remap class that remaps values in [minvalue,maxvalue) to NoData. |
void |
empty()
Removes all classes. |
int |
getClassCount()
The number of remapped classes. |
boolean |
isAllowUnmatched()
Indicates if unmatched values should be passed through. |
void |
putClass(int index,
double minvalue,
double maxvalue,
double newvalue)
Puts a remap class at a given class index (starting from 0). |
void |
queryClass(int index,
double[] minvalue,
double[] maxvalue,
double[] newvalue)
Queries a remap class at a given class index (starting from 0). |
void |
setAllowUnmatched(boolean pAllowUnmatched)
Indicates if unmatched values should be passed through. |
Method Detail |
---|
int getClassCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addClass(double minvalue, double maxvalue, double newvalue) throws IOException, AutomationException
minvalue
- The minvalue (in)maxvalue
- The maxvalue (in)newvalue
- The newvalue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addNoDataClass(double minvalue, double maxvalue) throws IOException, AutomationException
minvalue
- The minvalue (in)maxvalue
- The maxvalue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryClass(int index, double[] minvalue, double[] maxvalue, double[] newvalue) throws IOException, AutomationException
index
- The index (in)minvalue
- The minvalue (out: use single element array)maxvalue
- The maxvalue (out: use single element array)newvalue
- The newvalue (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void putClass(int index, double minvalue, double maxvalue, double newvalue) throws IOException, AutomationException
index
- The index (in)minvalue
- The minvalue (in)maxvalue
- The maxvalue (in)newvalue
- The newvalue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void empty() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAllowUnmatched() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAllowUnmatched(boolean pAllowUnmatched) throws IOException, AutomationException
pAllowUnmatched
- The pAllowUnmatched (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPixelFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |