01: /*
02: * $RCSfile: SequentialImage.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:57:21 $
10: * $State: Exp $
11: */
12: package javax.media.jai;
13:
14: /**
15: * A class representing an image that is associated with a time stamp
16: * and a camera position. This class is used with <code>ImageSequence</code>.
17: *
18: * <p> This class is equivalent to an <code>AttributedImage</code> with an
19: * attribute defined as:
20: *
21: * <pre>
22: * public class SequentialAttribute {
23: * protected Object position;
24: * protected Float timeStamp;
25: *
26: * public SequentialAttribute(Object position, float timeStamp);
27: *
28: * public Object getPosition();
29: * public float getTimeStamp();
30: *
31: * public boolean equals(Object o) {
32: * if(o instanceof SequentialAttribute) {
33: * SequentialAttribute sa = (SequentialAttribute)o;
34: * return sa.getPosition().equals(position) &&
35: * sa.getTimeStamp().equals(timeStamp);
36: * }
37: * return false;
38: * }
39: * }
40: * </pre>
41: *
42: * @see ImageSequence
43: *
44: * @deprecated as of JAI 1.1. Use
45: * <code>AttributedImage</code> instead.
46: */
47: public class SequentialImage {
48:
49: /** The image. */
50: public PlanarImage image;
51:
52: /** The time stamp associated with the image. */
53: public float timeStamp;
54:
55: /**
56: * The camera position associated with the image. The type of this
57: * parameter is <code>Object</code> so that the application may choose
58: * any class to represent a camera position based on the individual's
59: * needs.
60: */
61: public Object cameraPosition;
62:
63: /**
64: * Constructor.
65: *
66: * @param pi The specified planar image.
67: * @param ts The time stamp, as a float.
68: * @param cp The camera position object.
69: * @throws IllegalArgumentException if <code>pi</code> is <code>null</code>.
70: */
71: public SequentialImage(PlanarImage pi, float ts, Object cp) {
72: if (pi == null) {
73: throw new IllegalArgumentException(JaiI18N
74: .getString("Generic0"));
75: }
76:
77: image = pi;
78: timeStamp = ts;
79: cameraPosition = cp;
80: }
81: }
|