00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 123 Front Street West, Suite 1401 00009 * Toronto, Ontario 00010 * Canada M5J 2M2 00011 * 416-504-9876 00012 * 00013 * NAME: TIL_DeepReader.h ( TIL Library, C++) 00014 * 00015 * COMMENTS: A deep reader is in an interface to writing a deep raster. 00016 * The user may write arbitrary tags to the image. However, there 00017 * are a couple of well defined tags which should be handled: 00018 * flipbook - It's in flipbook mode 00019 * blackpoint(P) - Set the blackpoint 00020 * whitepoint(P) - Set the whitepoint 00021 * edgestreak(P) - Turn on edge streaking (4 ints) 00022 * sourcename - The name of the image 00023 * statusmessage - A status message 00024 * aspect - Aspect ratio for the image 00025 * cropwindow - Specify the crop window (4 ints) 00026 * Attributes marked with (P) are considered either global or 00027 * per-plane. 00028 */ 00029 00030 #ifndef __TIL_DeepReader__ 00031 #define __TIL_DeepReader__ 00032 00033 #include "TIL_API.h" 00034 #include <SYS/SYS_Types.h> 00035 class UT_StringArray; 00036 00037 class TIL_API TIL_DeepReader { 00038 public: 00039 TIL_DeepReader(); 00040 virtual ~TIL_DeepReader(); 00041 00042 // Query methods. 00043 virtual int getXres() const = 0; 00044 virtual int getYres() const = 0; 00045 virtual int getPlaneDataFormat(int plane_index) const = 0; 00046 00047 /// When no more data will be written to the reader, this method is called. 00048 virtual bool complete(); 00049 00050 /// This assumes that the data is in the "correct" endian-ness. Please 00051 /// ensure that this is done (esp. when reading from sockets). 00052 00053 virtual bool writeTile(int plane_index, 00054 int x0, int x1, int y0, int y1, 00055 void *data) = 0; 00056 00057 /// Call to notify something that the image has updated. This allows you 00058 /// to uncouple tile writes from updates. This version does nothing. 00059 virtual void updateImage(); 00060 00061 // Per plane attributes. For an attribute which is global (i.e. 00062 // cropwindow), set the plane index to -1. 00063 virtual bool setTag(int plane, const char *tag, const char *val); 00064 virtual bool setTag(int plane, const char *tag, 00065 const UT_StringArray &values); 00066 virtual bool setTag(int plane, const char *tag, 00067 const int *values, int nvalues); 00068 virtual bool setTag(int plane, const char *tag, 00069 const fpreal *values, int nvalues); 00070 00071 protected: 00072 virtual int adjustPlaneIndex( int index ) const; 00073 }; 00074 00075 #endif
1.5.9