com.esri.arcgis.datasourcesraster
Class SimplePixelResampler

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.SimplePixelResampler
All Implemented Interfaces:
IPixelResampler, ISimplePixelResampler, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class SimplePixelResampler
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISimplePixelResampler

A simple pixel resampler class.

Description

The SimplePixelResampler is a concrete object that supports nearest neighbor, bilinear, cubic convolution and majority resampling. It is used to provide pixel resampling for the RasterXformer and can be replaced by any custom pixel resampler.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
SimplePixelResampler()
          Constructs a SimplePixelResampler using ArcGIS Engine.
SimplePixelResampler(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SimplePixelResampler theSimplePixelResampler = (SimplePixelResampler) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 double getCubicConvolutionParameter()
          The cubic convolution parameter (-1, -0.75, -0.5).
 int getResamplingMethod()
          The resampling method.
 int getWindowSize()
          The resampling window size in terms of number of source pixels.
 int hashCode()
          the hashcode for this object
 boolean isDownSampling()
          Indicates if this is a down sampling only type of resampler.
 boolean isLinearScaling()
          Indicates if only linear scaling is necessary.
 boolean isSupportLinearScaling()
          Indicates if this resampler can accept simplified point array for simple linear scaling.
 void resample(int iCol, int iRow, int nCols, int nRows, _WKSPoint points, double ulx, double uly, double dx, double dy, IPixelBlock pSrcPixelBlock, IPixelBlock pDstPixelBlock)
          Resamples an input pixel block into an output pixel block.
 void setCubicConvolutionParameter(double a)
          The cubic convolution parameter (-1, -0.75, -0.5).
 void setLinearScaling(boolean pLinearScaling)
          Indicates if only linear scaling is necessary.
 void setMajorityWindowSize(int rhs1)
          The majority resampling window size in pixels.
 void setResamplingMethod(int pMethod)
          The resampling method.
 
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

SimplePixelResampler

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

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

SimplePixelResampler

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

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

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

getResamplingMethod

public int getResamplingMethod()
                        throws IOException,
                               AutomationException
The resampling method.

Product Availability

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

Specified by:
getResamplingMethod in interface ISimplePixelResampler
Returns:
A com.esri.arcgis.geodatabase.rstResamplingTypes constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setResamplingMethod

public void setResamplingMethod(int pMethod)
                         throws IOException,
                                AutomationException
The resampling method.

Product Availability

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

Specified by:
setResamplingMethod in interface ISimplePixelResampler
Parameters:
pMethod - A com.esri.arcgis.geodatabase.rstResamplingTypes constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCubicConvolutionParameter

public double getCubicConvolutionParameter()
                                    throws IOException,
                                           AutomationException
The cubic convolution parameter (-1, -0.75, -0.5).

Remarks

A parameter, (-3,0) not inclusive, is used to adjust the sharpness of cubic resampling. The resampled image will show the edge effect as the factor is close to -3, and smooth when the factor is close to 0.

Product Availability

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

Specified by:
getCubicConvolutionParameter in interface ISimplePixelResampler
Returns:
The a
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCubicConvolutionParameter

public void setCubicConvolutionParameter(double a)
                                  throws IOException,
                                         AutomationException
The cubic convolution parameter (-1, -0.75, -0.5).

Remarks

A parameter, (-3,0) not inclusive, is used to adjust the sharpness of cubic resampling. The resampled image will show the edge effect as the factor is close to -3, and smooth when the factor is close to 0.

Product Availability

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

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

setMajorityWindowSize

public void setMajorityWindowSize(int rhs1)
                           throws IOException,
                                  AutomationException
The majority resampling window size in pixels.

Product Availability

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

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

isSupportLinearScaling

public boolean isSupportLinearScaling()
                               throws IOException,
                                      AutomationException
Indicates if this resampler can accept simplified point array for simple linear scaling.

Product Availability

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

Specified by:
isSupportLinearScaling in interface IPixelResampler
Returns:
The pSupportLinearScaling
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLinearScaling

public boolean isLinearScaling()
                        throws IOException,
                               AutomationException
Indicates if only linear scaling is necessary.

Product Availability

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

Specified by:
isLinearScaling in interface IPixelResampler
Returns:
The pLinearScaling
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLinearScaling

public void setLinearScaling(boolean pLinearScaling)
                      throws IOException,
                             AutomationException
Indicates if only linear scaling is necessary.

Product Availability

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

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

getWindowSize

public int getWindowSize()
                  throws IOException,
                         AutomationException
The resampling window size in terms of number of source pixels.

Product Availability

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

Specified by:
getWindowSize in interface IPixelResampler
Returns:
The pNumPixels
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDownSampling

public boolean isDownSampling()
                       throws IOException,
                              AutomationException
Indicates if this is a down sampling only type of resampler.

Product Availability

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

Specified by:
isDownSampling in interface IPixelResampler
Returns:
The pDownSampling
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resample

public void resample(int iCol,
                     int iRow,
                     int nCols,
                     int nRows,
                     _WKSPoint points,
                     double ulx,
                     double uly,
                     double dx,
                     double dy,
                     IPixelBlock pSrcPixelBlock,
                     IPixelBlock pDstPixelBlock)
              throws IOException,
                     AutomationException
Resamples an input pixel block into an output pixel block.

Product Availability

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

Specified by:
resample in interface IPixelResampler
Parameters:
iCol - The iCol (in)
iRow - The iRow (in)
nCols - The nCols (in)
nRows - The nRows (in)
points - A Structure: com.esri.arcgis.system._WKSPoint (A com.esri.arcgis.system._WKSPoint COM typedef) (in)
ulx - The ulx (in)
uly - The uly (in)
dx - The dx (in)
dy - The dy (in)
pSrcPixelBlock - A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
pDstPixelBlock - 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.