com.esri.arcgis.geoprocessing.tools.spatialanalysttools
Class MajorityFilter

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.AbstractGPTool
      extended by com.esri.arcgis.geoprocessing.tools.spatialanalysttools.MajorityFilter
All Implemented Interfaces:
GPTool

public class MajorityFilter
extends AbstractGPTool

Replaces cells in a raster based on the majority of their contiguous neighboring cells. The Majority Filter tool is contained in the Spatial Analyst Tools tool box.

Usage tips:


Field Summary
 
Fields inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
vals
 
Constructor Summary
MajorityFilter()
          Creates the Majority Filter tool with defaults.
MajorityFilter(Object inRaster, Object outRaster)
          Creates the Majority Filter tool with the required parameters.
 
Method Summary
 Object getInRaster()
          Returns the Input raster parameter of this tool .
 String getMajorityDefinition()
          Returns the Replacement threshold parameter of this tool .
 String getNumberNeighbors()
          Returns the Number of neighbors to use parameter of this tool .
 Object getOutRaster()
          Returns the Output raster parameter of this tool .
 String getToolboxAlias()
          Returns the alias of the tool box containing this tool.
 String getToolboxName()
          Returns the name of the tool box containing this tool.
 String getToolName()
          Returns the name of this tool.
 void setInRaster(Object inRaster)
          Sets the Input raster parameter of this tool .
 void setMajorityDefinition(String majorityDefinition)
          Sets the Replacement threshold parameter of this tool .
 void setNumberNeighbors(String numberNeighbors)
          Sets the Number of neighbors to use parameter of this tool .
 void setOutRaster(Object outRaster)
          Sets the Output raster parameter of this tool .
 
Methods inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
getParameterValues, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MajorityFilter

public MajorityFilter()
Creates the Majority Filter tool with defaults.

Initializes the array of tool parameters with the default values specified when the tool was created.


MajorityFilter

public MajorityFilter(Object inRaster,
                      Object outRaster)
Creates the Majority Filter tool with the required parameters.

Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.

Parameters:
inRaster - the input raster to be filtered based on the the majority of contiguous neighboring cells. it must be of integer type.
outRaster - the output filtered raster.
Method Detail

getInRaster

public Object getInRaster()
Returns the Input raster parameter of this tool . This parameter is the input raster to be filtered based on the the majority of contiguous neighboring cells. it must be of integer type. This is a required parameter.

Returns:
the Input raster

setInRaster

public void setInRaster(Object inRaster)
Sets the Input raster parameter of this tool . This parameter is the input raster to be filtered based on the the majority of contiguous neighboring cells. it must be of integer type. This is a required parameter.

Parameters:
inRaster - the input raster to be filtered based on the the majority of contiguous neighboring cells. it must be of integer type.

getOutRaster

public Object getOutRaster()
Returns the Output raster parameter of this tool . This parameter is the output filtered raster. This is a required parameter.

Returns:
the Output raster

setOutRaster

public void setOutRaster(Object outRaster)
Sets the Output raster parameter of this tool . This parameter is the output filtered raster. This is a required parameter.

Parameters:
outRaster - the output filtered raster.

getNumberNeighbors

public String getNumberNeighbors()
Returns the Number of neighbors to use parameter of this tool . This parameter is determines the number of neighboring cells to use in the kernel of the filter. This is an optional parameter.

Returns:
the Number of neighbors to use

setNumberNeighbors

public void setNumberNeighbors(String numberNeighbors)
Sets the Number of neighbors to use parameter of this tool . This parameter is determines the number of neighboring cells to use in the kernel of the filter. This is an optional parameter.

Parameters:
numberNeighbors - determines the number of neighboring cells to use in the kernel of the filter.

getMajorityDefinition

public String getMajorityDefinition()
Returns the Replacement threshold parameter of this tool . This parameter is specifies the number of contiguous (spatially connected) cells that must be of the same value before a replacement will occur. This is an optional parameter.

Returns:
the Replacement threshold

setMajorityDefinition

public void setMajorityDefinition(String majorityDefinition)
Sets the Replacement threshold parameter of this tool . This parameter is specifies the number of contiguous (spatially connected) cells that must be of the same value before a replacement will occur. This is an optional parameter.

Parameters:
majorityDefinition - specifies the number of contiguous (spatially connected) cells that must be of the same value before a replacement will occur.

getToolName

public String getToolName()
Returns the name of this tool.

Returns:
the tool name

getToolboxName

public String getToolboxName()
Returns the name of the tool box containing this tool.

Returns:
the tool box name

getToolboxAlias

public String getToolboxAlias()
Returns the alias of the tool box containing this tool.

Returns:
the tool box alias