Seeing only grain boundary line

I have a system with grains and particles. I want to visualize like this figure. I need some suggestions how I can do it. Thanks in advanced.

Looks like a job for the DigitalRockPhysics plugin AnalyseMaterialClusters filter.

Actually I am looking like this one. This result of grain coarsening analysis.