com.esri.arcgis.datasourcesraster
Class RasterConvolutionFilter

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.RasterConvolutionFilter
All Implemented Interfaces:
IPixelFilter, IRasterConvolutionFilter, IStockConvolutionFilter, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class RasterConvolutionFilter
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPixelFilter, IRasterConvolutionFilter, IStockConvolutionFilter

A raster kernel-based filter.

Description

The RasterConvolutionFitler object is a kernel based raster filter. There are several predefined kernels available, and you can also implement your own kernels to filter the raster.


RasterConvolutionFitler supports two convolution filter-specific interfaces, IStockConvolutionFilter and IRasterConvolutionFilter. IStockConvolutionFilter is used to select one of predefined, well-known convolution filters, such as horizontal and vertical line detection, 3x3 and 5x5 Laplacian filters, and etc. IRasterConvolutionFilter is used to set up custom kernel with kernel coefficients. A constant gain factor can be added to both stock or custom convolution filters.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RasterConvolutionFilter()
          Constructs a RasterConvolutionFilter using ArcGIS Engine.
RasterConvolutionFilter(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterConvolutionFilter theRasterConvolutionFilter = (RasterConvolutionFilter) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 void filter(IPixelBlock pBlock)
          Filters a pixel block.
 void getCenterPosition(int[] atColumn, int[] atRow)
          Gets center position of the filter.
static String getClsid()
          getClsid.
 double getGainFactor()
          The gain factor of the kernel filter.
 void getSize(int[] columns, int[] rows)
          Gets dimension of the filter.
 int getType()
          The type of the stock kernel filter.
 int hashCode()
          the hashcode for this object
 boolean isNormalized()
          Indicates whether the filter is normalized.
 boolean isRecursive()
          Indicates whether the filter is recursive.
 void normalize()
          Normalizes the filter.
 void putCoefficients(double[][] coefList)
          Sets the element coefficients of the kernel filter.
 void queryCoefficients(double[][] coefList)
          Gets the element coefficients of the kernel filter.
 void scaleBy(double scaleFactor)
          Scales the filter coefficients.
 void setCenterPosition(int atColumn, int atRow)
          Sets the center position of the kernel filter.
 void setGainFactor(double gainFactor)
          The gain factor of the kernel filter.
 void setRecursive(boolean recursive)
          Indicates whether the filter is recursive.
 void setSize(int nColumns, int nRows)
          Sets the size of the kernel filter.
 void setType(int filterType)
          The type of the stock kernel filter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

RasterConvolutionFilter

public RasterConvolutionFilter()
                        throws IOException,
                               UnknownHostException
Constructs a RasterConvolutionFilter using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

RasterConvolutionFilter

public RasterConvolutionFilter(Object obj)
                        throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterConvolutionFilter theRasterConvolutionFilter = (RasterConvolutionFilter) obj;

Construct a RasterConvolutionFilter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to RasterConvolutionFilter.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getSize

public void getSize(int[] columns,
                    int[] rows)
             throws IOException,
                    AutomationException
Gets dimension of the filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSize in interface IPixelFilter
Specified by:
getSize in interface IRasterConvolutionFilter
Parameters:
columns - The columns (in/out: use single element array)
rows - The rows (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCenterPosition

public void getCenterPosition(int[] atColumn,
                              int[] atRow)
                       throws IOException,
                              AutomationException
Gets center position of the filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCenterPosition in interface IPixelFilter
Specified by:
getCenterPosition in interface IRasterConvolutionFilter
Parameters:
atColumn - The atColumn (in/out: use single element array)
atRow - The atRow (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

filter

public void filter(IPixelBlock pBlock)
            throws IOException,
                   AutomationException
Filters a pixel block.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
filter in interface IPixelFilter
Parameters:
pBlock - A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSize

public void setSize(int nColumns,
                    int nRows)
             throws IOException,
                    AutomationException
Sets the size of the kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSize in interface IRasterConvolutionFilter
Parameters:
nColumns - The nColumns (in)
nRows - The nRows (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCenterPosition

public void setCenterPosition(int atColumn,
                              int atRow)
                       throws IOException,
                              AutomationException
Sets the center position of the kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setCenterPosition in interface IRasterConvolutionFilter
Parameters:
atColumn - The atColumn (in)
atRow - The atRow (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putCoefficients

public void putCoefficients(double[][] coefList)
                     throws IOException,
                            AutomationException
Sets the element coefficients of the kernel filter.

Remarks

PutCoefficents takes a dimentional (1D) array (row * column of the kernel), then transforms automatically to a 2D array. The side of 2D array is defined by SetSize method.

size of 1D array = row * column of the kernel

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
putCoefficients in interface IRasterConvolutionFilter
Parameters:
coefList - The coefList (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCoefficients

public void queryCoefficients(double[][] coefList)
                       throws IOException,
                              AutomationException
Gets the element coefficients of the kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryCoefficients in interface IRasterConvolutionFilter
Parameters:
coefList - The coefList (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGainFactor

public void setGainFactor(double gainFactor)
                   throws IOException,
                          AutomationException
The gain factor of the kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setGainFactor in interface IRasterConvolutionFilter
Parameters:
gainFactor - The gainFactor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGainFactor

public double getGainFactor()
                     throws IOException,
                            AutomationException
The gain factor of the kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGainFactor in interface IRasterConvolutionFilter
Returns:
The gainFactor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRecursive

public void setRecursive(boolean recursive)
                  throws IOException,
                         AutomationException
Indicates whether the filter is recursive.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setRecursive in interface IRasterConvolutionFilter
Parameters:
recursive - The recursive (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRecursive

public boolean isRecursive()
                    throws IOException,
                           AutomationException
Indicates whether the filter is recursive.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isRecursive in interface IRasterConvolutionFilter
Returns:
The recursive
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

normalize

public void normalize()
               throws IOException,
                      AutomationException
Normalizes the filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
normalize in interface IRasterConvolutionFilter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isNormalized

public boolean isNormalized()
                     throws IOException,
                            AutomationException
Indicates whether the filter is normalized.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isNormalized in interface IRasterConvolutionFilter
Returns:
The normalized
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

scaleBy

public void scaleBy(double scaleFactor)
             throws IOException,
                    AutomationException
Scales the filter coefficients.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
scaleBy in interface IRasterConvolutionFilter
Parameters:
scaleFactor - The scaleFactor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setType

public void setType(int filterType)
             throws IOException,
                    AutomationException
The type of the stock kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setType in interface IStockConvolutionFilter
Parameters:
filterType - A com.esri.arcgis.datasourcesraster.esriRasterFilterTypeEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
The type of the stock kernel filter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getType in interface IStockConvolutionFilter
Returns:
A com.esri.arcgis.datasourcesraster.esriRasterFilterTypeEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.