/** * Handles mechanics of projection by selecting appropriate pixel array type. We do this rather * than using more general ImageProcessor getPixelValue() and putPixel() methods because direct * manipulation of pixel arrays is much more efficient. */ private void projectSlice(Object pixelArray, RayFunction rayFunc, int ptype) { switch (ptype) { case BYTE_TYPE: rayFunc.projectSlice((byte[]) pixelArray); break; case SHORT_TYPE: rayFunc.projectSlice((short[]) pixelArray); break; case FLOAT_TYPE: rayFunc.projectSlice((float[]) pixelArray); break; } }