IMAGEINV

Arithmetic inverse of raster data


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

Back to top

Description


Finds the inverse of the input raster channel(s).
Back to top

Parameters


imageinv(fili, filo, dbic, dboc, emptyvl)

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(s) 0 -    
EMPTYVL List[float] Replacement for invalid numeric value 0 - 1 0.0001 - 100000.0
Default: 1.0

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the raster channels to process.

FILO

Specifies the name of the PCIDSK image file to receive the output channels. If this parameter is not specified, it will be 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 the input file is copied to the new output file.

DBIC

Specifies the input raster channel(s) to be processed.

DBOC

Specifies the output raster channel(s) to receive the image produced by taking the inverse of the input image channels (DBIC).

If the output file already exists, the output channels (DBOC) must be specified, the output channel type must be CHN_32R, and the number of output channels must be the same as the number input channels (DBIC).

EMPTYVL

Specifies the number used as replacement for invalid numerical values.

The default value is 1.0.

Back to top

Details

IMAGEINV takes all the pixel values from the input channel(s) and calculates the inverse value, placing those values in the output channel(s). If an invalid value exists, the value specified in the Replacement Value parameter is used instead.

Back to top

Example

This example demonstrates the use of IMAGEINV in taking the inverse of input raster channels.

from pci.imageinv import imageinv

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

imageinv( fili, filo, dbic, dboc, emptyvl )

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