Available in LEADTOOLS Document and Medical Imaging toolkits.
L_AnnGetGrouping
L_AnnGroup
L_AnnSetGrouping
L_AnnUngroup