code: public static <T extends ImageGray<T>> InterpolatePixelS<T>
  	createPixelS(double min, double max, InterpolationType type, BorderType borderType, Class<T> imageType)
  	{
  		InterpolatePixelS<T> alg;
  
  		switch( type ) {
  			case NEAREST_NEIGHBOR:
  				alg = nearestNeighborPixelS(imageType);
  				break;
  
  			case BILINEAR:
  				return bilinearPixelS(imageType, borderType);
  
  			case BICUBIC:
  				alg = bicubicS(-0.5f, (float) min, (float) max, imageType);
  				break;
  
  			case POLYNOMIAL4:
  				alg = polynomialS(4, min, max, imageType);
  				break;
  
  			default:
  				throw new IllegalArgumentException("Add type: "+type);
  		}
  
  		if( borderType != null )
  			alg.setBorder(FactoryImageBorder.single(imageType, borderType));
  		return alg;
  	}
docs: Creates an interpolation class of the specified type for the specified image type.
  
  @param min Minimum possible pixel value.  Inclusive.
  @param max Maximum possible pixel value.  Inclusive.
  @param type Interpolation type
  @param borderType Border type. If null then it will not be set here.
  @param imageType Type of input image
  @return Interpolation