public static < T extends ImageBase < T > > InterpolatePixelMB < T > createPixelMB ( double min , double max , InterpolationType type , BorderType borderType , ImageType < T > imageType ) { switch ( imageType . getFamily ( ) ) { case PLANAR : return ( InterpolatePixelMB < T > ) createPixelPL ( ( InterpolatePixelS ) createPixelS ( min , max , type , borderType , imageType . getDataType ( ) ) ) ; case GRAY : { InterpolatePixelS interpS = createPixelS ( min , max , type , borderType , imageType . getImageClass ( ) ) ; return new InterpolatePixel_S_to_MB ( interpS ) ; } case INTERLEAVED : switch ( type ) { case NEAREST_NEIGHBOR : return nearestNeighborPixelMB ( ( ImageType ) imageType , borderType ) ; case BILINEAR : return bilinearPixelMB ( ( ImageType ) imageType , borderType ) ; default : throw new IllegalArgumentException ( "Interpolate type not yet support for ImageInterleaved" ) ; } default : throw new IllegalArgumentException ( "Add type: " + type ) ; } }
Pixel based interpolation on multi - band image