Function_0(Dictionary d) {
        // initiate, domain and range
        super(d);

        Vector s = (Vector) d.getObject("Size");
        // setup size array, each entry represents the number of samples for
        // each input dimension.
        size = new int[s.size()];
        for (int i = 0; i < s.size(); i++) {
            size[i] = (int) (((Number) s.elementAt(i)).floatValue());
        }
        // setup bitspersample array, each entry represents the number of bits used
        // for each sample
        bitspersample = d.getInt("BitsPerSample");

        // setup of encode table, specifies the linear mapping of input values
        // into the domain of the function's sample table.
        Vector enc = (Vector) d.getObject("Encode");
        encode = new float[size.length * 2];
        if (enc != null) {
            for (int i = 0; i < size.length * 2; i++) {
                encode[i] = ((Number) enc.elementAt(i)).floatValue();
            }
        } else {
            // encoding is optional, so fill up encode area with uniform
            // mapping of 0,size[0]-1, 0,size[1]-1, 0,size[2]-1 which is
            // the default value which is defined in the spec.
            for (int i = 0; i < size.length; i++) {
                encode[2 * i] = 0;
                encode[2 * i + 1] = size[i] - 1;
            }
        }

        // setup decode, an array of  2 x n numbers specifying the linear mapping
        // of sample values into the range appropriate for the function's output values.
        Vector dec = (Vector) d.getObject("Decode");
        decode = new float[range.length];
        if (dec != null) {
            for (int i = 0; i < range.length; i++) {
                decode[i] = ((Number) dec.elementAt(i)).floatValue();
            }
        } else {
            // deocode is optional, so we should copy range as a default values
            System.arraycopy(range, 0, decode, 0, range.length);
//            for (int i = 0; i < range.length; i++) {
//                decode[i] = range[i];
//            }
        }

        // lastly get the stream byte data if any.
        Stream stream = (Stream) d;
        bytes = stream.getBytes();
    }