The algorithm implementation involved reading the header information from the
input ERDAS/Lan map file, determining partition size,
reading the input map, performing cluster identification,
and tabulating the results.
In the sequential implementation (SI), reading the header information and
map data were performed using the C++ language file input/output functions.
The map header contains sufficient information to determine
the appropriate size of the data structures
for the csize and matrix working arrays.
The number of rows read and processed by the SI was limited to 1024. This
limitation is due to limited physical memory resources, i.e., random access memory and
virtual memory swap space on the Sun SPARCstation's local hard disk drive.
If the number of rows
exceeds 1024, the algorithm will partition the map and perform cluster
identification on each of the partitions in sequential order.
After the algorithm completes, the csize array on
contains
the appropriate number of pixels in each cluster and the matrix array
contains the temporary cluster label for each non-zero pixel in the input map.
Final cluster statistics are obtained by traversing the csize
array and tabulating the positive non-zero values.