III

Database-to-database image transfer


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

Back to top

Description


Transfers image data between two image files or in one image file.
Back to top

Parameters


iii(fili, filo, dbic, dboc, dbiw, dbow, options)

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) 1 -    
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
DBOW List[int] Raster output window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
OPTIONS str Optional processing parameters 0 -    

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the image file from which image data is read.

FILO

Specifies the name of the PCIDSK file to receive image data. The output file can be the same as the input file. The output file must already exist before running III.

DBIC

Specifies the input channel(s) to read from the input file (FILI).

DBOC

Specifies the output channel(s) generated to the output file (FILO).

The total number of channels specified by DBOC must be equal to the total number of channels specified by DBIC.

If the corresponding input and output channels are the same, the input and output windows (DBIW and DBOW) must not overlap.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers. If DBIW is not specified, the entire channel is used by default. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

DBOW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) to be output. If DBOW is not specified, the entire layer is output by default. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

The Xsize and Ysize need not be the same for DBIW and DBOW. Image scaling and mapping is automatic.

If FILI equals FILO and DBIC, DBOC, DBIW, and DBOW are defined in such a way that the windows overlap, unexpected results may occur.

OPTIONS

The following options are available.

Tip: You can specify more than one option, with each separated by a space.
Back to top

Details

III transfers data from image channels (DBIC) in the input file (FILI) to image channels (DBOC) in the output file (FILO). Channel remapping is automatic.

The output image file (FILO) must already exist before running III; otherwise, you must create it by running CIM. The output and input files can be the same file.

Any arbitrary rectangular window on the input file (DBIW) can be transferred to an arbitrary rectangular window in the output file (DBOW). Shrinking or zooming of image data, or both, is automatic when the input window size does not match the output window size.

Use the MOSAIC function to transfer images in which resampling is desired or where the imagery must be copied based on the georeferencing relationship between the two files.

Note: If an input channel is 32-bit real and the output channel is 16-bit integer or 8-bit, or if the input channel is 16-bit integer and the output channel is 8-bit, data values may be truncated. In general, III is not recommended for transfers of this type; instead, use SCALE.
Back to top

Example

Create a display-sized image (512x512) by placing a single 256x256 image in the upper-left quadrant, followed by a 256x256 image in the upper-right quadrant.

from pci.iii import iii

fili    =   "small.pix" # small file used in composite
filo    =   "composit.pix"  # larger file in which to perform composite
dbic    =   [1] # image channel 1
dboc    =   [1] # image output to channel 1 in composite
dbiw    =       []  # use full image
dbow    =   [0,0,256,256]   # position image at 0x0 and 256x256 for lower-right corner
options =   ""

iii( fili, filo, dbic, dboc, dbiw, dbow, options )           # merge image

# note: any parameters that are not listed are already set above.

dbic    =   [2] # source channel 2
dboc    =   [1] # output channel 1 (existing data will be merged)
dbow    =   [256,0,256,256] # output to upper-right quadrant

iii( fili, filo, dbic, dboc, dbiw, dbow, options )           # merge image
      

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