Abstract : The physical properties of granular materials on a macro-scopic scale derive from their microstructures. The segmentation of CT-images of this type of material is the first step towards simulation and modeling but it is not a trivial task. Non-spherical, elongated or non-convex objects fail to be separated with classical methods. Moreover, grains are commonly fragmented due to external conditions: aging, storage conditions, or even user-induced mechanical deformations. Grains are crushed into multiple fragments of different shape and volume; those fragments drift from one another in the binder phase. This paper focuses on reconstruction of grains from these fragments using scores that match the local thickness and the regularity of the interface between two objects from a given primary segmentation of the material. An affinity graph is built from those scores and optimized for a given application using a user-generated ground truth on a 2D slice of the tridimensional structures. A minimum spanning tree is generated, and a hierarchical cut is performed. This process allows to reassemble drifted fragments into whole grains and to solve the touching grains problem in tridimensional acquisitions.