RegionGrow

Available with Image Analyst license.

Available with Spatial Analyst license.

Summary

Groups adjacent pixels depending on the specified radius from the seed point.

Discussion

For more information about how this function works, see the Region Grow raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

Syntax

RegionGrow (raster, seed_points, max_growth_radius_field, similarity_threshold_field, {fill_value_field})
ParameterExplanationData Type
raster

The input raster.

Raster
seed_points

The point feature class, serving as the initial seeds for the algorithm.

Each seed point corresponds to one entry in the attribute table, which includes values for the maximum growth radius, similarity threshold, and an optional fill value.

String
max_growth_radius_field

The field in the attribute table that defines the maximum growth radius, in the image's spatial reference units.

String
similarity_threshold_field

The field that defines the similarity threshold, as Euclidean distance in spectral space.

String
fill_value_field

The field that defines the fill value for the group of pixels formed from each seed point. In a multiband image, all bands will be assigned this value.

(The default value is None)

String
Return Value
Data TypeExplanation
Raster

The output raster.

Code sample

RegionGrow example

Groups adjacent pixels based on the input seed points and assigns fill values for each group of pixels.

from arcpy.ia import *
out_regiongrow_raster = RegionGrow("mlc.tif", "seeds.shp",
                                   "radius", "similarity")
out_regiongrow_raster.save(
    "C:/arcpyExamples/outputs/Multispectral_Landsat_grow.crf")
RegionGrow example

Groups adjacent pixels based on the input seed points and assigns fill values for each group of pixels.

# Import system modules
import arcpy

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Set the local variables
raster = "C:/data/Multispectral_Landsat.tif"
seed_points = "C:/data/seed_point.shp"
max_growth_radius_field = "radius"
similarity_threshold_field = "similarity"
fill_value_field = "fill"

# Apply RegionGrow function
classified_raster = arcpy.ia.RegionGrow(raster, seed_points, max_growth_radius_field, similarity_threshold_field, fill_value_field)

# Save the output
classified_raster.save("C:/arcpyExamples/outputs/Multispectral_Landsat_grow.crf")