@Override
    public double[] get3DData(int px, int pz, int py, int sy, int sx, int sz)
    {
        double[] d = f.get3DData(px, pz, py, sy, sx, sz);

        int s = sx * sy * sz;
        for (int i = 0; i < s; i++)
        {
            double n = d[i];
            if (n < min)
                n = min;
            if (n > max)
                n = max;

            d[i] = n;
        }

        return d;
    }