PCIADD2

Add Image Channel to Database


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

Back to top

Description


Adds one new image channel to a TILED, BAND or FILE interleaved PCIDSK image file, with the input channel stored in an external file. An image channel can be added to an existing image file, or to a new, empty image file to hold the output.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DATATYPE String Output raster data type 0 - 4 8U | 16S | 16U | 32R | C16S | C32R
Default: 8U
ADDMODE * String Add File Mode: CREATE/EXIST 5 - 6 CREATE | EXIST
IFILE String New image file name 0 - 192  
CHANINFO Integer Channel layout information 0 - 4  
REPORT String Report mode 0 - 192 Quick links

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK database file to receive the new image channel.

DATATYPE

Specifies the data type for the output image channel.

Valid data types are:

ADDMODE

Specifies the mode for adding a new image channel.

Supported options are:

IFILE

Specifies the name of the new image file to add to the PCIDSK header file.

If ADDMODE="CREATE" and IFILE is not specified, the new image file will have the same file name as the input image file, and will use the three-digit channel number (with leading zeroes) as the file extension (.nnn).

If ADDMODE="EXIST", IFILE must be specified.

CHANINFO

Optionally specifies information about the layout of the image data channel within the file specified by IFILE.

For 'raw' files (that is, those that have no header information and only a single packed channel), this parameter should be defaulted. CHANINFO is used only if ADDMODE="EXIST".

Specify this parameter as follows:

RAW files:	(nothing)
Other files:	header, pixelgroup, linelength, swap
where:

REPORT

Specifies where to direct the generated report.

Available options are:

Back to top

Details

PCIADD2 adds one image channel to a PCIDSK image file (FILE). The specified file must be either BAND- or FILE-interleaved. PIXEL-interleaved files cannot have external image channels added. The image data type (DATATYPE) can be 8-bit unsigned (8U), 16-bit signed (16S), 16-bit unsigned (16U), 32-bit real (32R), 16-bit signed complex (C16S), or 32-bit real complex (C32R). The file (IFILE) that receive the new image data is either created (ADDMODE="CREATE") or already exists (ADDMODE="EXIST").

The channel number for the new image is the first available channel in the image file, and can either be a channel previously deleted by PCIDEL2, or the next sequential channel after the last channel in the file.

If ADDMODE="CREATE", a new image file of the appropriate size is created, and initially contains zeros (no useful data). If IFILE is not specified, the image file is created, using the same name as the database file and the three-digit channel number (with leading zeroes) as the file extension (.nnn). If the image file already exists, the new channel is not created.

If ADDMODE="EXIST", an image file of appropriate size and type must already exist, and must contain valid image data. IFILE must be specified; there is no default file name. The image file is assumed to have the same number of pixels and lines as all other image channels on the database.

The CHANINFO parameter can be used to specify how the channel of information in an existing file (when ADDMODE="EXIST") is organized. If the data is in 'raw' format (no header information, single packed channel of data), this parameter may be defaulted. If the file is not in 'raw' format, careful use of the CHANINFO parameter can allow access to the channel of data.

Warning: Ensure that the size and data type for existing image files are correct for the specified database file; otherwise, programs that access data on the image channel may not perform as expected.

Unlike pixel-interleaved PCIDSK files created by CIM, the data type for image channels on band- or file-interleaved PCIDSK files do not need to follow a particular order. The data type (DATATYPE) for additional image channels may be anything, and does not depend on the data types of existing channels on the database.

Back to top

Example

Add a new 16-bit signed image channel to a 512x512 PCIDSK file created by CIM, which already contains six image channels.

EASI>file	=	"image.pix"
EASI>datatype	=	"16S"
EASI>addmode	=	"create"
EASI>ifile	=	""
EASI>chaninfo	=	

EASI>RUN PCIADD2

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