COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coImageImpl.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef _CO_IMAGEIMPL_H_
9 #define _CO_IMAGEIMPL_H_
10 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 // CLASS coImage
12 //
13 // Initial version: 2004-04-27 [we]
14 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 // (C) 2001 by VirCinity IT Consulting
16 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17 // Changes:
18 //
19 
20 #include <covise/covise.h>
21 
26 namespace covise
27 {
28 
30 {
31 public:
32  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33  // ++ Attribute request
34  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
35 
37  coImageImpl();
38  virtual ~coImageImpl()
39  {
40  }
41 
43  coImageImpl(int width, int height, int numChannels, int numFrames);
44 
46  virtual int getWidth();
47 
49  virtual int getHeight();
50 
52  virtual int getNumChannels();
53 
55  virtual int getNumFrames();
56 
58  virtual unsigned char *getBitmap(int frameno = 0) = 0;
59 
61  virtual bool isBad();
62 
64  virtual const char *errorMessage();
65 
66  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
67  // ++ Attribute setting
68  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
69 
70  // set error flag to true and copy error string
71  void setError(const char *errorString);
72 
73 protected:
74  // the values for these variables HAVE to be set by the implementation
75  int width_;
76  int height_;
79 
80 private:
81  char *errString_;
82  bool isBad_;
83 };
84 }
85 #endif
virtual bool isBad()
Did we have errors on reading.
Definition: coImageImpl.cpp:74
virtual int getNumFrames()
get number of frames
Definition: coImageImpl.cpp:68
int numChannels_
Definition: coImageImpl.h:77
virtual int getNumChannels()
get number of Color Channels
Definition: coImageImpl.cpp:62
int height_
Definition: coImageImpl.h:76
Definition: coImageImpl.h:29
GLint GLint GLsizei width
Definition: khronos-glext.h:6344
GLint GLint GLsizei GLsizei height
Definition: khronos-glext.h:6344
virtual int getHeight()
height of image;
Definition: coImageImpl.cpp:56
virtual int getWidth()
width of image
Definition: coImageImpl.cpp:50
coImageImpl()
Construct without setting anything - derived classes will do later.
Definition: coImageImpl.cpp:26
virtual ~coImageImpl()
Definition: coImageImpl.h:38
int numFrames_
Definition: coImageImpl.h:78
char * errString_
Definition: coImageImpl.h:81
bool isBad_
Definition: coImageImpl.h:82
void setError(const char *errorString)
Definition: coImageImpl.cpp:86
virtual const char * errorMessage()
Error message if problems occurred: empty if ok.
Definition: coImageImpl.cpp:80
virtual unsigned char * getBitmap(int frameno=0)=0
get pointer to internal data
int width_
Definition: coImageImpl.h:75