code: public static BufferedImage colorizeGradient(ImageGray derivX, ImageGray derivY, double maxAbsValue,
  												 BufferedImage output){
  		if( derivX instanceof GrayS16) {
  			return colorizeGradient((GrayS16)derivX,(GrayS16)derivY,(int)maxAbsValue, output);
  		} else if( derivX instanceof GrayF32) {
  			return colorizeGradient((GrayF32)derivX,(GrayF32)derivY,(float)maxAbsValue, output);
  		} else {
  			throw new IllegalArgumentException("Image type not supported");
  		}
  	}
docs: Renders two gradients on the same image using two sets of colors, on for each input image.
  
  @param derivX (Input) Image with positive and negative values.
  @param derivY (Input) Image with positive and negative values.
  @param maxAbsValue  The largest absolute value of any pixel in the image.  Set to < 0 if not known.
  @param output
  @return visualized gradient