code: public static void checkShape(ImageGray original , ImageGray transformed )
  	{
  		if( transformed.width % 2 == 1 || transformed.height % 2 == 1 )
  			throw new IllegalArgumentException("Image containing the wavelet transform must have an even width and height.");
  
  		int w = original.width + original.width%2;
  		int h = original.height + original.height%2;
  
  		if( transformed.width < w || transformed.height < h)
  			throw new IllegalArgumentException("Transformed image must be larger than the original image. " +
  					"("+w+","+h+") vs ("+transformed.width+","+transformed.height+")");
  	}
docs: The original image can have an even or odd number of width/height.  While the transformed
  image must have an even number of pixels.  If the original image is even then the sames
  are the same, otherwise the transformed image's shape is rounded up.
  
  @param original Original input image.
  @param transformed Image which has been transformed.