An ERDAS/Lan map is comprised of integer values ranging from zero to the number of map classes contained in the map. Each pixel contains either a zero or an integer representing the pixel's map class. The HK algorithm uses one data structure both to store the map pixel values and to store temporary pixel label values. This dual purpose will not allow different map classes to be stored in the same structure without altering the cluster identification process. Thus, the finite-state-machine implementation of the Hoshen-Kopelman algorithm requires the input ERDAS/Lan map to be pre-processed in a way which alters the original data by filtering out the pixel data values not belonging to the selected map class. Only one map class can be represented at a time in the input map for the finite state machine implementation. For example, to analyze map class 2, all of the map's pixel values equal to 2 would be changed to -1, and the rest of the pixel values in the map would be changed to 0. Figure 3 shows the results of pre-processing map class 2 of a simple ERDAS/Lan map file containing two map classes. The result is an input map containing only -1's and 0's where the -1's distinguish pixels belonging to the chosen map class.