* @param xMax domain max for the second point on the interpolation line
     * always (2<sup>bitsPerComponent</sup> - 1).
     * @return
     */
    private static float[] getNormalizedComponents(
            byte[] pixels,
            Vector decode, int xMax) {
        float[] normComponents = new float[pixels.length];
        int val;
        float yMin;
        float yMax;
        // interpolate each colour component for the given decode domain.
        for (int i = 0; i < pixels.length; i++) {
            val = pixels[i] & 0xff;
            yMin = ((Number)decode.get(i * 2)).floatValue();
            yMax = ((Number)decode.get((i * 2) + 1)).floatValue();
            normComponents[i] =
                    Function.interpolate(val, 0, xMax, yMin, yMax);
        }
        return normComponents;
    }