IMAGESUM

Arithmetic summation of raster data


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


Performs an arithmetic summation of raster data, and saves the result to the specified output channel.
Back to top

Parameters


imagesum(fili, filo, dbic, dboc)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
FILO str Output file name 0 -    
DBIC * List[int] Input raster channel(s) 1 -    
DBOC List[int] Output raster channel 0 - 1  

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the raster channel(s) to process.

FILO

Specifies the name of the PCIDSK image file to receive the summed channel. If the output file is not specified, it is assumed to be the same as FILI. If FILO exists, its projection must be the same as FILI.

If FILO does not exist, a new PCIDSK file will be created. By default, the georeferencing information from FILI will be copied to the new FILO.

DBIC

Specifies the input channel(s) to be processed.

DBOC

Specifies one output raster channel to receive the image produced by the summation of the input image channel(s).

If the output file (FILO) already exists, this parameter must be specified.

Back to top

Details

IMAGESUM takes all the pixel values from the specified input channel(s) and adds them up, then places the sum values in the output channel.

Back to top

Example

This example demonstrates the use of IMAGESUM in generating an arithmetic summation channel from raster channels.

from pci.imagesum import imagesum

fili	=	"irvine.pix"	# input file
filo	=	"output.pix"	# output file (will be created)
dbic	=	list(range(1, 5 + 1))	# input channels
dboc	=	[1]	# output channel

imagesum( fili, filo, dbic, dboc )

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.