orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
image.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Tom Burdick, Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This distribution is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 #ifndef HYDRO_INTERFACES_IMAGE_H 00011 #define HYDRO_INTERFACES_IMAGE_H 00012 00013 #include <string> 00014 #include <vector> 00015 #include <hydroutil/context.h> 00016 00017 namespace hydrointerfaces 00018 { 00019 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 class SOEXPORT Image 00044 { 00045 00046 public: 00047 00049 class Config 00050 { 00051 public: 00052 Config(); 00053 bool validate() const; 00054 std::string toString() const; 00055 bool operator==( const Config & other ); 00056 bool operator!=( const Config & other ); 00057 00059 uint32_t width; 00061 uint32_t height; 00063 uint32_t size; 00065 //ImageFormat format; 00067 //ImageCompression compression; 00068 }; 00069 00071 class Data 00072 { 00073 public: 00074 Data() 00075 : haveWarnings(false) 00076 {} 00077 00078 unsigned char * data; 00079 int timeStampSec; 00080 int timeStampUsec; 00081 bool haveWarnings; 00083 std::string warnings; 00084 }; 00085 00086 virtual ~Image() {}; 00087 00091 virtual void read( Data &data )=0; 00092 00093 private: 00094 00095 }; 00096 00098 class SOEXPORT ImageFactory { 00099 public: 00100 virtual ~ImageFactory() {}; 00102 virtual Image *createDriver( const Image::Config &config, 00103 const hydroutil::Context &context ) const=0; 00104 }; 00105 00107 } // namespace 00108 00109 // Function for dynamically instantiating drivers. 00110 // A driver must have a function like so: 00111 // extern "C" { 00112 // hydrointerfaces::LaserScanner2dFactory *createDriverFactory(); 00113 // } 00114 typedef hydrointerfaces::ImageFactory *DriverFactoryMakerFunc(); 00115 00116 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)