code: public static <I extends ImageGray<I>, II extends ImageGray<II>>
  	Class<II> getIntegralType( Class<I> inputType ) {
  		if( inputType == GrayF32.class ) {
  			return (Class<II>)GrayF32.class;
  		} else if( inputType == GrayU8.class ){
  			return (Class<II>)GrayS32.class;
  		} else if( inputType == GrayS32.class ){
  			return (Class<II>)GrayS32.class;
  		} else {
  			throw new IllegalArgumentException("Unknown input image type: "+inputType.getSimpleName());
  		}
  	}
docs: Given the input image, return the type of image the integral image should be.