[ImageJ-devel] [fiji-devel] ImgLib2 merge to master

Stephan Saalfeld saalfeld at mpi-cbg.de
Thu Apr 21 15:42:06 CDT 2011


Or you mean

switch (mode) {
                case LINEAR:
                        inter = new NLinearInterpolatorFactory<R>();
                        break;
                case NEAREST_NEIGHBOR:
                        inter = new NearestNeighborInterpolatorFactory<R>();
                        break;
                default:
                        throw new IllegalArgumentException("Scale: don't know how to scale
with mode " + mode);
                }




On Thu, 2011-04-21 at 18:49 +0200, Albert Cardona wrote: 
> Imglib1 to Imglib2: why does the following code claims that:
> 
>   "Type mismatch: cannot convert from NearestNeighborInterpolator<R>
> to InterpolatorFactory<R,Img<R>>"
> 
> ... where <R extends RealType<R>> ?
> 
> 
> 		final InterpolatorFactory<R,Img<R>> inter;
> 		switch (mode) {
> 		case LINEAR:
> 			inter = new NLinearInterpolatorFactory<R>().create(img);
> 			break;
> 		case NEAREST_NEIGHBOR:
> 			inter = new NearestNeighborInterpolatorFactory<R>().create(img);
> 			break;
> 		default:
> 			throw new IllegalArgumentException("Scale: don't know how to scale
> with mode " + mode);
> 		}
> 
> -- 
> http://albert.rierol.net
> 





More information about the ImageJ-devel mailing list