00001 #ifndef EDDIMAGEDATASOURCE_H
00002 #define EDDIMAGEDATASOURCE_H
00003
00004 #include <EDDSourceLib/inc/EDDDataSource.h>
00005 #include <proto/EDDImageDataMsg.h>
00006
00007 #ifndef EDD_EXPORT
00008 #define EDD_EXPORT
00009 #endif
00010
00017 class EDD_EXPORT tcEDDImageDataSource : public tcEDDDataSource
00018 {
00019 public:
00021 typedef enum
00022 {
00023 eeX,
00024 eeY,
00025 eeZ
00026 } teAxis;
00027
00028 tcEDDImageDataSource(char* apDesc);
00029
00030 virtual ~tcEDDImageDataSource(void);
00031
00032 virtual int HandleMsg(tsEDDMsgHdr* apMsg);
00033
00035
00047 int SendImageData(uint16_t* apData, uint16_t anRows, uint16_t anCols,
00048 uint8_t anType = EDDIMGMSG_MONO_16BIT);
00049
00050 int SendImageData(uint8_t* apData, uint16_t anRows, uint16_t anCols,
00051 uint8_t anType = EDDIMGMSG_MONO_8BIT);
00053
00055
00072 int SendSparseImageData(uint16_t anDefault, uint16_t anRows, uint16_t anCols,
00073 uint32_t* apImageOffset, uint16_t* apValue, uint16_t anNumPts,
00074 uint8_t anType = EDDIMGMSG_MONO_16BIT);
00075
00076 int SendSparseImageData(uint8_t anDefault, uint16_t anRows, uint16_t anCols,
00077 uint32_t* apImageOffset, uint8_t* apValue, uint16_t anNumPts,
00078 uint8_t anType = EDDIMGMSG_MONO_8BIT);
00080
00081 int SetLabel(teAxis aeAxis, char* apLabel);
00082 int SetDescription(char* apDesc);
00083
00084 static const int gnMaxStringLen = 64;
00085
00086 protected:
00087 void BuildOutputBuffer(void);
00088 void SendImageDescriptor(uint16_t anRows, uint16_t anCols, uint8_t anType, uint8_t anFlags);
00089 int Send3DData(void* apData, uint16_t anRows, uint16_t anCols, int WordSizeBytes, uint8_t anDataType);
00090 int SendSparseData(void* apDefault, uint16_t anRows, uint16_t anCols,
00091 uint32_t* apImageOffset, void* apValue, uint16_t anNumPts,
00092 int WordSizeBytes, uint8_t anType);
00093
00094 int mnImageType;
00095 char maDescription[gnMaxStringLen];
00096 char maXLabel[gnMaxStringLen];
00097 char maYLabel[gnMaxStringLen];
00098 char maZLabel[gnMaxStringLen];
00099 uint16_t mnImageNo;
00100 char* mpOutputBuffer;
00101 int mnOutputBufferLen;
00102 };
00103
00104
00105 #endif