docs: public static double sum( ImageBase input ) {
  
  		if( input instanceof ImageGray) {
  			if (GrayU8.class == input.getClass()) {
  				return ImageStatistics.sum((GrayU8) input);
  			} else if (GrayS8.class == input.getClass()) {
  				return ImageStatistics.sum((GrayS8) input);
  			} else if (GrayU16.class == input.getClass()) {
  				return ImageStatistics.sum((GrayU16) input);
  			} else if (GrayS16.class == input.getClass()) {
  				return ImageStatistics.sum((GrayS16) input);
  			} else if (GrayS32.class == input.getClass()) {
  				return ImageStatistics.sum((GrayS32) input);
  			} else if (GrayS64.class == input.getClass()) {
  				return ImageStatistics.sum((GrayS64) input);
  			} else if (GrayF32.class == input.getClass()) {
  				return ImageStatistics.sum((GrayF32) input);
  			} else if (GrayF64.class == input.getClass()) {
  				return ImageStatistics.sum((GrayF64) input);
  			} else {
  				throw new IllegalArgumentException("Unknown image Type");
  			}
  		} else if( input instanceof ImageInterleaved ) {
  			if (InterleavedU8.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedU8) input);
  			} else if (InterleavedS8.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedS8) input);
  			} else if (InterleavedU16.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedU16) input);
  			} else if (InterleavedS16.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedS16) input);
  			} else if (InterleavedS32.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedS32) input);
  			} else if (InterleavedS64.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedS64) input);
  			} else if (InterleavedF32.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedF32) input);
  			} else if (InterleavedF64.class == input.getClass()) {
  				return ImageStatistics.sum((InterleavedF64) input);
  			} else {
  				throw new IllegalArgumentException("Unknown image Type");
  			}
  		} else if( input instanceof Planar ) {
  			double sum = 0;
  			Planar in = (Planar) input;
  			for (int i = 0; i < in.getNumBands(); i++) {
  				sum += sum( in.getBand(i));
  			}
  			return sum;
  		} else {
  			throw new IllegalArgumentException("Image type not yet supported "+input.getClass().getSimpleName());
  		}
  	}