The length, width, and height of the domain, as well as the number of elements in each direction can be specified independently.
* A 2D GeneratedMesh where xmin, xmax, etc. are determined from an input image file.
* generate() calls this helper function to build 2D ImageMeshes.
* generate() calls this helper function to build 3D ImageMeshes from stacks of images.
* number of pixels in the x and y directions.
* while retaining the original aspect ratio of the image.