A multiscale approach to the representation of 3D images, with application to polymer solar cells