BITHASH

Compute image hash number


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

Back to top

Description


BITHASH computes a hash number that represents a window of bitmap values from an input bitmap segment. This hash number is used as a checksum for software testing.
Back to top

Parameters


bithash(file, dbib, dbiw)

Name Type Caption Length Value range
FILE * str Input file name 1 -    
DBIB * List[int] Input bitmap channel(s) 1 -    
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the GDB-supported file containing the bitmap data for which the hash number will be computed.

DBIB

Specifies the bitmap channel(s) in the input file to be processed.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers. If DBIW is not specified, the entire layer 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.

Back to top

Return Value

Returns: Image Statistics

Type:  PCI_FLOAT

Parameter: imstat

Upon completion, BITHASH writes out to the IMSTAT parameter a hash number for each of the bitmap segments sampled. This hash number is always a number between 0 and 32767.

Back to top

Details

BITHASH computes a hash value for a window of bitmap data in a GDB-supported file. This function is primarily used for the construction of test procedures.

The hash function results in a value between 0 and 32767 being placed into the IMSTAT parameter.

Back to top

Example

Compute and display the hash values for each of the bitmaps in irvine.pix.

from pci.bithash import bithash

file = 'irvine.pix'        #irvine.pix in the program's working dir
dbib = [9,10,11,12,13,14,15,16]
dbiw = []                  #defaults to whole image

bithash(file,dbib,dbiw)

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