MIRROR

Mirror image channels


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples

Back to top

Description


Creates a mirror image of the input image channels, along the vertical or horizontal axis.
Back to top

Parameters


mirror (file, filo, dbic, dboc, dbiw, axis, dbgc, ftype, foptions)

Name Type Caption Length Value range
FILE * str Input file name 1 -    
FILO str Output file name 0 -    
DBIC * List[int] Input raster channel(s) 1 -    
DBOC List[int] Output mirrored channel(s) 0 -    
DBIW List[int] Input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
AXIS str Mirror Axis 0 - 4 VERT | HORI
Default: VERT
DBGC List[int] Input GCP segment 0 - 1  
FTYPE str Output file type 0 - 4
FOPTIONS str output file options 0 - 64  

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK image file containing the channels to mirror.

FILO

Specifies the name of the output file to receive the mirrored image.

If FILO is not the same as FILE the FILO must not exist

A new filo will be created.

FILO can be the same as FILE.

DBIC

Specifies the input image channels to be mirrored.

At least one channel must be specified. Duplicates are not allowed.

DBOC

Specifies the output raster channels to receive the mirrored image if FILO is defaulted or equal FILE.

If FILO is created then DBOC defaults or is ignored.

At least one channel must be specified. Duplicates are not allowed.

The output channel may be the same as the input channel; if so, existing data will be overwritten.

DBIW

Optionally specifies the rectangular window (Xoffset, Yoffset, Xsize, Ysize) of image data to mirror. If this parameter is not specified, the entire image is processed 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.

Note: If the input GCP parameter (DBGC) is set, the DBIW parameter must not be specified.

AXIS

Optionally specifies the axis of rotation to use for mirroring.

Available options are:

DBGC

Optionally specifies the GCP2 segment to be mirrored.

If this parameter is specified, a new GCP2 segment will be created to hold the mirrored result.

Note: If the DBIW parameter is set, this parameter (DBGC) must not be specified.

FTYPE

Optionally specifies the output file format type, represented by a three- or four-letter code. The format type must be a GDB-recognized file type.

If FILO specifies an existing file, this parameter should not be set; MIRROR updates the existing file without changing its type.

Supported file format codes include, among others:

The default value is PIX.

For a full list of GDB-recognized file types and their codes, see GDB file formats in the Technical Reference section of the CATALYST Professional online Help.

FOPTIONS

Optionally specifies the file creation options that are to be applied when creating the output file. These are specific to the file format; in each case, the default of no options is allowed. FOPTIONS can be used to specify the compression schemes, file format subtypes, and other information.

Different options are available for different file types (see the FTYPE parameter). For a full list of GDB-recognized file typ es and options, see GDB file formats in the Technical Reference section of the CATALYST Professional online Help.

Back to top

Details

MIRROR creates a set of mirror images along the vertical or horizontal axis, given a specified window (DBIW) within a set of input channels (DBIC), and saves the mirrored result in new file FILO if specified or input file as the defined output channels (DBOC).

For rotation about the vertical axis, the gray-level values of the first and last input pixels on each line of image data are swapped, the second and second-last pixels on each line are swapped, and so on. For rotation about the horizontal axis, the gray-level values of the first and last input lines are swapped, the second and second-last lines are swapped, and so on.

MIRROR can be run on aircraft radar and MSS image data, to convert left-looking images to right-looking images, or to invert ascending radar data to descending order.

Note: If a GCP segment is to be mirrored as well, the DBIW parameter should default to the entire image; only the image coordinates in the GCP segment are mirrored.
Back to top

Examples

Create a mirror image along the vertical axis for 3 channels in the file 'irvine.pix'.

from pci.mirror import mirror

file	=	'irvine.pix'	# input file
filo    =       'irvine_mirror.tif'  # new output TIFF file
dbic	=	[1,2,3]	# input channels
dboc	=	[]	# output channels default , created new file
dbiw	=	[0,0,256,256]	# mirror upper-left corner
axis	=	'VERT'	# mirror along vertical axis
dbgc	=	[]
ftype   =       "TIF"    # output to a TIFF
foptions =      ""       # output file options

mirror( file, filo, dbic, dboc, dbiw, axis, dbgc, ftype, foptions )

Create a mirror image along horizontal axis.

from pci.mirror import mirror

file	=	'irvine.pix'
filo	=	'irvine_mirror.tif'
dbic	=	[4]
dboc	=	[]	# output channel
dbiw	=	[]	# mirror entire image
axis	=	'HORI'	# mirror along horizontal axis
dbgc	=	[27]	# gcp segment to mirror
ftype   =   "TIF"    # output to a TIFF
foptions = ""       # output file options

mirror( file, filo, dbic, dboc, dbiw, axis, dbgc, ftype, foptions )

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