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 ; }
Creates an interpolation class of the specified type for the specified image type .