HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TIL_DeepReader.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: TIL_DeepReader.h ( TIL Library, C++)
7  *
8  * COMMENTS: A deep reader is in an interface to writing a deep raster.
9  * The user may write arbitrary tags to the image. However, there
10  * are a couple of well defined tags which should be handled:
11  * flipbook - It's in flipbook mode
12  * blackpoint(P) - Set the blackpoint
13  * whitepoint(P) - Set the whitepoint
14  * edgestreak(P) - Turn on edge streaking (4 ints)
15  * sourcename - The name of the image
16  * statusmessage - A status message
17  * aspect - Aspect ratio for the image
18  * cropwindow - Specify the crop window (4 ints)
19  * Attributes marked with (P) are considered either global or
20  * per-plane.
21  */
22 
23 #ifndef __TIL_DeepReader__
24 #define __TIL_DeepReader__
25 
26 #include "TIL_API.h"
27 #include <SYS/SYS_Types.h>
28 
29 class UT_StringArray;
30 
31 template<typename T>
32 class UT_Vector3T;
33 
35 {
36 public:
38  virtual ~TIL_DeepReader();
39 
40  virtual int64 getMemoryUsage(bool inclusive) const = 0;
41 
42  // Query methods.
43  virtual int getXres() const = 0;
44  virtual int getYres() const = 0;
45  virtual int getPlaneDataFormat(int plane_index) const = 0;
46 
47  /// When no more data will be written to the reader, this method is called.
48  virtual bool complete();
49 
50  /// This assumes that the data is in the "correct" endian-ness. Please
51  /// ensure that this is done (esp. when reading from sockets).
52  virtual bool writeTile(int plane_index,
53  int x0, int x1, int y0, int y1,
54  void *data) = 0;
55 
56  virtual bool writeSamples(
57  int nsamples,
58  int floats_per_sample,
60  const float *data) = 0;
61 
62  /// Call to notify something that the image has updated. This allows you
63  /// to uncouple tile writes from updates. This version does nothing.
64  virtual void updateImage();
65 
66  // Per plane attributes. For an attribute which is global (i.e.
67  // cropwindow), set the plane index to -1.
68  virtual bool setTag(int plane, int tag, const char *val);
69  virtual bool setTag(int plane, int tag,
70  const UT_StringArray &values);
71  virtual bool setTag(int plane, int tag,
72  const int *values, int nvalues);
73  virtual bool setTag(int plane, int tag,
74  const float *values, int nvalues);
75 
76 protected:
77  virtual int adjustPlaneIndex( int index ) const;
78 };
79 
80 #endif
void writeSamples(short *data, int size)
3D Vector class.
long long int64
Definition: SYS_Types.h:106
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1601
GLboolean * data
Definition: glcorearb.h:130
GLsizei samples
Definition: glcorearb.h:1297
GLuint index
Definition: glcorearb.h:785
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define TIL_API
Definition: TIL_API.h:10