Help for CONCOMPI

PURPOSE:
concompi uses connectivity defined by adjacency (not diagonal) of pixels
to turn an image into a connected component image.  Each connected
component receives a unique pixel number.  The input and output must be
halfword or fullword.

This version of the concomp program has an additional image input.  The
values in this image are treated as a boolean (0=false, non-0=true) and
only components that intersect or touch a true value are kept in the
output.  All other components are zero'd.  The components that are kept
are resequenced 1..n.

The highest numbered component can be output to a tcl variable named
LASTCMP.  The component numbering can also be started at a user selected
number with the parm STARTCMP.

EXECUTION:

Example

concompi (A,C) (B,WORK)      The image A will be turned into connected 
                        components in image B, but only components that
                        touch a non-0 value in C will be kept.  The WORK
                        image is needed for calcualtions and can be deleted.
                               
OPERATION:



TIMING: 

As fast as VICAR can read and write the lines.  

 ORIGINAL PROGRAMMER:    A. Zobrist          11 Sep 2007
 COGNIZANT PROGRAMMER:   A. Zobrist          11 Sep 2007
 
 REVISION HISTORY
  2007-09-11 AZ  Initial version
  2008-01-03 WLB switched to USES_ANSI_C AND LIB_CARTO; misc cleanup  
  2016-01-13 WLB Migrated to MIPL; replaced printfs with zifmessages


PARAMETERS:


INP

The input image, and a masking image to select which components to keep

OUT

The output image, and the name of a working image, to be discarded later

SIZE

Region of input file to be operated on

SL

Starting line

SS

Starting sample

NL

Number of lines

NS

Number of samples

THRESH

Components smaller than this are discarded

ZEDGE

All components touching edge are zeroed out

STARTCMP

Start component numbering with this value

LASTCMP

Output highest component number in this integer TCL variable

See Examples:


Cognizant Programmer: