code: public static <I extends ImageGray<I>, D extends ImageGray<D>>
  		Class<D> getDerivativeType( Class<I> imageType ) {
  		if( imageType == GrayF32.class ) {
  			return (Class<D>) GrayF32.class;
  		} else if( imageType == GrayU8.class ) {
  			return (Class<D>) GrayS16.class;
  		} else if( imageType == GrayU16.class ) {
  			return (Class<D>) GrayS32.class;
  		} else {
  			throw new IllegalArgumentException("Unknown input image type: "+imageType.getSimpleName());
  		}
  	}
docs: Returns the type of image the derivative should be for the specified input type.
  @param imageType Input image type.
  @return Appropriate output image type.