Added simple nearest neighbour calculation Fixed compact XML of all examples to work with the new segmentation types