01: package org.libtiff.jai.codec;
02:
03: /*
04: * XTIFF: eXtensible TIFF libraries for JAI.
05: *
06: * The contents of this file are subject to the JAVA ADVANCED IMAGING
07: * SAMPLE INPUT-OUTPUT CODECS AND WIDGET HANDLING SOURCE CODE License
08: * Version 1.0 (the "License"); You may not use this file except in
09: * compliance with the License. You may obtain a copy of the License at
10: * http://www.sun.com/software/imaging/JAI/index.html
11: *
12: * Software distributed under the License is distributed on an "AS IS"
13: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14: * the License for the specific language governing rights and limitations
15: * under the License.
16: *
17: * The Original Code is JAVA ADVANCED IMAGING SAMPLE INPUT-OUTPUT CODECS
18: * AND WIDGET HANDLING SOURCE CODE.
19: * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
20: * Portions created by: Niles Ritter
21: * are Copyright (C): Niles Ritter, GeoTIFF.org, 1999,2000.
22: * All Rights Reserved.
23: * Contributor(s): Niles Ritter
24: */
25:
26: import com.sun.media.jai.codec.TIFFDecodeParam;
27:
28: /**
29: * An extension of <code>TIFFDecodeParam</code> for decoding images in
30: * the TIFF format. In addition to the inherited properties, this object
31: * also retains a reference to the parsed XTIFFDirectory that is
32: * constructed from the file. For encoding, an empty XTIFFDirectory
33: * is constructed, into which the user may provide any additional
34: * tags for controlling the contents of the data. For example, if
35: * the image is to be compressed, some additional tags may be needed
36: * to specify parameters for the particular compression scheme.
37: *
38: * @see XTIFFDirectory
39: * @see XTIFFDecodeParam
40: */
41:
42: public class XTIFFDecodeParam extends TIFFDecodeParam {
43:
44: protected XTIFFDirectory directory = null;
45:
46: /**
47: * Promotes an XTIFFEncodeParam object from simpler one
48: */
49: public XTIFFDecodeParam(TIFFDecodeParam param) {
50: if (param == null)
51: return;
52: setDecodePaletteAsShorts(param.getDecodePaletteAsShorts());
53: }
54:
55: /** Constructs a default instance of <code>XTIFFDecodeParam</code>. */
56: public XTIFFDecodeParam() {
57: }
58:
59: /** returns the current XTIFFDirectory */
60: public XTIFFDirectory getDirectory() {
61: return directory;
62: }
63:
64: /** sets the current XTIFFDirectory */
65: public void setDirectory(XTIFFDirectory dir) {
66: directory = dir;
67: }
68: }
|