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

Albert Cardona sapristi at gmail.com
Thu Apr 21 11:49:24 CDT 2011


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