/home/fwph/code/wurde/rde/utils/ImageSource.H

Go to the documentation of this file.
00001 #ifndef _IMAGE_SOURCE_H
00002 #define _IMAGE_SOURCE_H
00003 
00004 #include <ImageTransport.H>
00005 #include <opencv/cv.h>
00006 #include <utility>
00007 #include <rleCoding.H>
00008 
00009 namespace WURDE{
00010         typedef std::pair<WURDE::Time,IplImage *> WURDEImage;
00017        class ImageSource : public ImageTransport {
00018               
00019        public:
00023               explicit ImageSource(const std::string & streamname):
00024                      ImageTransport(streamname){
00025                      setAutoTimestamp(false);
00026                      setAutoPing(false);
00027                      data.image=NULL;
00028                      data.imagesize=0;
00029               }
00030 
00036               ImageSource(const ConnectionStrategy & strategy,const std::string & gblName):
00037                      ImageTransport(strategy,gblName){
00038                      setAutoTimestamp(false);
00039                      setAutoPing(false);
00040                      data.image=NULL;
00041                      data.imagesize=0;
00042               }
00043 
00049               ImageSource(const std::string & streamname,const std::string & gblName):
00050                      ImageTransport(streamname,gblName){
00051                      setAutoTimestamp(false);
00052                      setAutoPing(false);
00053                      data.image=NULL;
00054                      data.imagesize=0;
00055               }
00056 
00061               WURDEImage getImage();
00062 
00067               void publishImage(WURDEImage &image);
00068 
00072               void setFormat(ImageFormat format){ m_format=format; info.format.setValue(format);}
00073 
00077               void setCompression(ImageCompression compression){ m_compression=compression; info.compression.setValue(compression);}
00078 
00079        private:
00080               WURDEImage m_localImage;
00081               ImageFormat m_format;
00082               ImageCompression m_compression;
00083        };
00084 
00085 
00086 }
00087 #endif

Generated on Thu Feb 1 15:31:54 2007 for WURDE by  doxygen 1.5.1