Statistical mechanics of cellular structures