com.esri.arcgis.datasourcesraster
Class PansharpeningFilter

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.PansharpeningFilter
All Implemented Interfaces:
IPansharpeningFilter, IPixelFilter, IPixelFilter2, IPixelFilter3, com.esri.arcgis.interop.RemoteObjRef, IDocumentVersionSupportGEN, IPersist, IPersistStream, IXMLVersionSupport, Externalizable, Serializable

public class PansharpeningFilter
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPixelFilter, IPixelFilter2, IPixelFilter3, IPansharpeningFilter, IPersistStream, IDocumentVersionSupportGEN, IXMLVersionSupport, Externalizable

A class for pansharpening filter.

Description

The PanSharpeningFilter object is used to perform image fusion of low-resolution multispectral and high resolution panchromatic satellite images and to provide a better visualization of the multispectral image.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
PansharpeningFilter()
          Constructs a PansharpeningFilter using ArcGIS Engine.
PansharpeningFilter(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
PansharpeningFilter thePansharpeningFilter = (PansharpeningFilter) obj;
 
Method Summary
 Object convertToSupportedObject(int docVersion)
          Convert the object to another object that is supported.
 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.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IRaster getInfraredImage()
          The optional infrared image.
 String getMinNamespaceSupported()
          The minimum namespace the class can serialize to (eg the 90 namespace).
 IRaster getPanImage()
          The panchromatic image.
 int getPansharpeningType()
          The current pansharpening type.
 void getSize(int[] columns, int[] rows)
          Gets dimension of the filter.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void init(int nCols, int nRows, IEnvelope pExtent)
          Initializes this filter for a given area of interest.
 void initBlock(IPnt pTopLeft, int nBlkCols, int nBlkRows)
          Initialize this filter for a given pixel block.
 void isDirty()
          isDirty
 boolean isSupportedAtVersion(int docVersion)
          Is this object valid at the given document version.
 void load(IStream pstm)
          load
 void putWeights(double rW, double gW, double bW, double iW)
          Puts the Red, Green, Blue, and Infrared weights contributing to panchromatic image.
 void queryWeights(double[] pRW, double[] pGW, double[] pBW, double[] pIW)
          Gets the Red, Green, Blue, and Infrared weights contributing to panchromatic image.
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void setInfraredImageByRef(IRaster ppInfraredImage)
          The optional infrared image.
 void setPanImageByRef(IRaster ppPanImage)
          The panchromatic image.
 void setPansharpeningType(int pSharpeningType)
          The current pansharpening type.
 void synchronize(IRaster pRaster)
          Synchronizes this filter when raster properties are changed.
 void writeExternal(ObjectOutput out)
           
 
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

PansharpeningFilter

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

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

PansharpeningFilter

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

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

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
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
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.

init

public void init(int nCols,
                 int nRows,
                 IEnvelope pExtent)
          throws IOException,
                 AutomationException
Initializes this filter for a given area of interest.

Product Availability

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

Specified by:
init in interface IPixelFilter2
Parameters:
nCols - The nCols (in)
nRows - The nRows (in)
pExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initBlock

public void initBlock(IPnt pTopLeft,
                      int nBlkCols,
                      int nBlkRows)
               throws IOException,
                      AutomationException
Initialize this filter for a given pixel block.

Product Availability

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

Specified by:
initBlock in interface IPixelFilter2
Parameters:
pTopLeft - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
nBlkCols - The nBlkCols (in)
nBlkRows - The nBlkRows (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

synchronize

public void synchronize(IRaster pRaster)
                 throws IOException,
                        AutomationException
Synchronizes this filter when raster properties are changed.

Product Availability

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

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

getPanImage

public IRaster getPanImage()
                    throws IOException,
                           AutomationException
The panchromatic image.

Product Availability

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

Specified by:
getPanImage in interface IPansharpeningFilter
Returns:
A reference to a com.esri.arcgis.geodatabase.IRaster
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPanImageByRef

public void setPanImageByRef(IRaster ppPanImage)
                      throws IOException,
                             AutomationException
The panchromatic image.

Remarks

This Raster must be a raster of single band.

Product Availability

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

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

getPansharpeningType

public int getPansharpeningType()
                         throws IOException,
                                AutomationException
The current pansharpening type.

Description

Pan-sharpening is a process of transformaing a set of low special resolution multispectral images to high spatial resolution color images, by fusing a co-georegistered high spatial resolution panchromatic image.

ArcGIS 9.2 provides four pan-sharpening methods: Simple, Brovey, IHS, and ERSI pansharpening. These methods are all based on the following general model:


A pixel value of a Pan image is considered a weighted average of Red, Green, Blue, and (optional) Infrared components:

P = R*RW + G*GW + B*BW + I*IW
1 = RW + GW + BW + IW

where RW, GW, BW, and IW are weights for Red, Green, Blue, and Infrared components. P, R, G, B, and I (as wll as P', R', G', I') represent the input and output pixel values of the panchromatic, Red, green, blue and Infrared bands respectively.


Brovey method:

DNF = (P-IW*I)/(RW*R+GW*G+BW*B)
R' = R*DNF
G' = G*DNF
B' = B*DNF
I' = I*DNF

IHS method:

RGBToHSI(R, G, B, H, S, INTENSITY)
INTENSITY = P-I*IW
HSIToRGB(H, S, INTENSITY, R', G', B')


ESRI method:

WA (Weighted averate) = R*RW + G*GW + B* BW + + I*IW /(RW+GW+BW+IW)
ADJ (Adjusted value) = P- WA

R' = R+ADJ
G' = G+ADJ
B' = B+ADJ
I' = I+ADJ

Mean method:

R' = 0.5 * (R + P)
G' = 0.5 * (G + P)
B' = 0.5 * (B + P) < /P >

Product Availability

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

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

setPansharpeningType

public void setPansharpeningType(int pSharpeningType)
                          throws IOException,
                                 AutomationException
The current pansharpening type.

Product Availability

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

Specified by:
setPansharpeningType in interface IPansharpeningFilter
Parameters:
pSharpeningType - A com.esri.arcgis.datasourcesraster.esriPansharpeningType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryWeights

public void queryWeights(double[] pRW,
                         double[] pGW,
                         double[] pBW,
                         double[] pIW)
                  throws IOException,
                         AutomationException
Gets the Red, Green, Blue, and Infrared weights contributing to panchromatic image.

Product Availability

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

Specified by:
queryWeights in interface IPansharpeningFilter
Parameters:
pRW - The pRW (out: use single element array)
pGW - The pGW (out: use single element array)
pBW - The pBW (out: use single element array)
pIW - The pIW (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putWeights

public void putWeights(double rW,
                       double gW,
                       double bW,
                       double iW)
                throws IOException,
                       AutomationException
Puts the Red, Green, Blue, and Infrared weights contributing to panchromatic image.

Product Availability

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

Specified by:
putWeights in interface IPansharpeningFilter
Parameters:
rW - The rW (in)
gW - The gW (in)
bW - The bW (in)
iW - The iW (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInfraredImage

public IRaster getInfraredImage()
                         throws IOException,
                                AutomationException
The optional infrared image.

Remarks

It is optional. If not set, Infrared band will not be used in the pan sharpening operation.

Product Availability

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

Specified by:
getInfraredImage in interface IPansharpeningFilter
Returns:
A reference to a com.esri.arcgis.geodatabase.IRaster
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInfraredImageByRef

public void setInfraredImageByRef(IRaster ppInfraredImage)
                           throws IOException,
                                  AutomationException
The optional infrared image.

Product Availability

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

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

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSupportedAtVersion

public boolean isSupportedAtVersion(int docVersion)
                             throws IOException,
                                    AutomationException
Is this object valid at the given document version.

Remarks

Use IsSupportedAtVersion to identify if a particular object should be saved to the ObjectStream. This result is based on the esriArcGISVersion enumeration. In some instances, if the object is not supported at a particular ArcGIS version, the object may support conversion to another similar object; use IDocumentVersionSupportGEN::ConvertToSupportedObject to accomplish this.

Product Availability

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

Specified by:
isSupportedAtVersion in interface IDocumentVersionSupportGEN
Parameters:
docVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Returns:
The supported
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertToSupportedObject

public Object convertToSupportedObject(int docVersion)
                                throws IOException,
                                       AutomationException
Convert the object to another object that is supported.

Remarks

This method should be used when IDocumentVersionSupportGEN::IsSupportedAtVersion returns FALSE. Calling ConvertToSupportedObject will return an IUnknown pointer to a relevant object supported at the particular ArcGIS version. Not all objects will return a supported object; in these cases a null pointer will be returned.

Product Availability

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

Specified by:
convertToSupportedObject in interface IDocumentVersionSupportGEN
Parameters:
docVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMinNamespaceSupported

public String getMinNamespaceSupported()
                                throws IOException,
                                       AutomationException
The minimum namespace the class can serialize to (eg the 90 namespace).

Product Availability

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

Specified by:
getMinNamespaceSupported in interface IXMLVersionSupport
Returns:
The namespaceURI
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException