code: public static <I extends ImageGray<I>, T extends ImageGray>
  	T transform( I input , T transformed ) {
  		if( input instanceof GrayF32) {
  			return (T)IntegralImageOps.transform((GrayF32)input,(GrayF32)transformed);
  		} else if( input instanceof GrayF64) {
  			return (T)IntegralImageOps.transform((GrayF64)input,(GrayF64)transformed);
  		} else if( input instanceof GrayU8) {
  			return (T)IntegralImageOps.transform((GrayU8)input,(GrayS32)transformed);
  		} else if( input instanceof GrayS32) {
  			return (T)IntegralImageOps.transform((GrayS32)input,(GrayS32)transformed);
  		} else if( input instanceof GrayS64) {
  			return (T)IntegralImageOps.transform((GrayS64)input,(GrayS64)transformed);
  		} else {
  			throw new IllegalArgumentException("Unknown input type: "+input.getClass().getSimpleName());
  		}
  	}
docs: Converts a regular image into an integral image.
  
  @param input Regular image. Not modified.
  @param transformed Integral image. If null a new image will be created. Modified.
  @return Integral image.