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