Patent ID: 8300945

Claim:
A method for identifying a connected component, said method comprising: a) receiving a class map; b) run-length encoding a first line in said class map; c) receiving a first element in a second line in said class map, wherein said second line is adjacent to said first line and wherein a first class value is associated with said first element; d) identifying a second element in said first line, wherein said second element is adjacent to said first element according to an adjacency criterion and wherein a second class value is associated with said second element; and e) when said first class value is equal to said second class value, performing the following: i) receiving a first parent reference, said first parent reference associated with said first element; ii) receiving a second parent reference, said second parent reference associated with said second element; iii) comparing said first parent reference and said second parent reference; iv) when said comparing meets a first criterion, performing the following: (1) receiving a third parent reference, said third parent reference associated with said first parent reference; (2) updating said first parent reference to said second parent reference; and (3) updating said third parent reference to said second parent reference; and v) when said comparing does not meet said first criterion, performing the following: (1) receiving a fourth parent reference, said fourth parent reference associated with said second parent reference; (2) updating said second parent reference to said first parent reference; and (3) updating said fourth parent reference to said first parent reference.