code: public static <T extends ImageGray<T>> T loadImage(String fileName, Class<T> imageType ) {
  		BufferedImage img = loadImage(fileName);
  		if( img == null )
  			return null;
  
  		return ConvertBufferedImage.convertFromSingle(img, (T) null, imageType);
  	}
docs: Loads the image and converts into the specified image type.
  
  @param fileName Path to image file.
  @param imageType Type of image that should be returned.
  @return The image or null if the image could not be loaded.