r.pi.graph input=landclass96 output=landclass96_graph keyval=5 distance=10 neighborhood=gabriel index=largest_patch_diameter
the results are 2 files:
landclass96_graph: the information of the index are provided (here a range of 3-589 of patch diameter)
landclass96_graph_clusters: the generated cluster IDs are provided (here 16 clusters are identified), doing it with a distance of 5 pixel is resulting in a total of 66 cluster.