code: protected Double getCubicInterpolationValue(Double value0, Double value1,
  			Double value2, Double value3, double offset) {
  
  		Double value = null;
  
  		if (value0 != null && value1 != null && value2 != null
  				&& value3 != null) {
  
  			double coefficient0 = 2 * value1;
  			double coefficient1 = value2 - value0;
  			double coefficient2 = 2 * value0 - 5 * value1 + 4 * value2 - value3;
  			double coefficient3 = -value0 + 3 * value1 - 3 * value2 + value3;
  			value = (coefficient3 * offset * offset * offset + coefficient2
  					* offset * offset + coefficient1 * offset + coefficient0) / 2;
  		}
  
  		return value;
  	}
docs: Interpolate 4 values using the offset between value1 and value2
  
  @param value0
  index 0 value
  @param value1
  index 1 value
  @param value2
  index 2 value
  @param value3
  index 3 value
  @param offset
  offset between the middle two pixels
  @return value coverage data value