A method is proposed for the characterisation of the entropy of cellular structures, based on the compactivity concept for granular packings. Hamiltonian-like volume functions are constructed both in two and in three dimensions, enabling the identification of a phase space and making it possible to take account of geometrical correlations systematically. Case studies are presented for which explicit calculations of the mean vertex density and porosity fluctuations are given as functions of compactivity. The formalism applies equally well to two- and three-dimensional granular assemblies.