COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coImageRGB.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_IMAGERGB_H_
9 #define _CO_IMAGERGB_H_
10 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 // CLASS coImageRGB
12 //
13 // Initial version: 2004-04-27 [we]
14 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 // (C) 2001 by VirCinity IT Consulting
16 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17 // Changes:
18 //
19 
20 #include "coImageImpl.h"
21 extern "C" {
22 #define CM_NORMAL 0
23 /* file contains rows of values which
24  * are either RGB values (zsize == 3)
25  * or greyramp values (zsize == 1) */
26 typedef struct
27 {
28  unsigned short imagic; /* stuff saved on disk . . */
29  unsigned short type;
30  unsigned short dim;
31  unsigned short xsize;
32  unsigned short ysize;
33  unsigned short zsize;
34  unsigned long min;
35  unsigned long max;
36  unsigned long wastebytes;
37  char name[80];
38  unsigned long colormap;
39 } IMAGE;
40 extern IMAGE *iopen(const char *, const char *);
41 extern void getrow(IMAGE *, short *, int, int);
42 extern void iclose(IMAGE *);
43 #if !defined(__hpux) && !defined(__linux__)
44 extern void i_seterror(void (*func)(char *));
45 #endif
46 };
47 
52 namespace covise
53 {
54 
55 class coImageRGB : public coImageImpl
56 {
57 public:
58  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
59  // ++ Constructors / Destructor
60  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61 
63  coImageRGB(const char *filename);
64 
66  virtual ~coImageRGB();
67 
68  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
69  // ++ Operations
70  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
71 
73  virtual unsigned char *getBitmap(int frameno = 0);
74 
75  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
76  // ++ Attribute request/set functions
77  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
78 
79 protected:
80  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81  // ++ Attributes
82  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
83  int dimension_;
84  int bytesPerPixel_;
85  unsigned char *pixmap_;
86 
87 private:
88  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
89  // ++ Internally used functions
90  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
91  void readBW(IMAGE *image);
92  void readRGB(IMAGE *image);
93  void readRGBA(IMAGE *image);
94  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
95  // ++ prevent auto-generated bit copy routines by default
96  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
97 
99  coImageRGB(const coImageRGB &);
100 
102  coImageRGB &operator=(const coImageRGB &);
103 
105  coImageRGB();
106 };
107 #endif
void getrow(IMAGE *, short *, int, int)
unsigned short type
Definition: coImageRGB.h:29
unsigned short xsize
Definition: coImageRGB.h:31
GLuint const GLchar * name
Definition: khronos-glext.h:6722
unsigned long max
Definition: coImageRGB.h:35
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: khronos-glext.h:6356
IMAGE * iopen(const char *, const char *)
unsigned short ysize
Definition: coImageRGB.h:32
unsigned short zsize
Definition: coImageRGB.h:33
Definition: coImageRGB.h:26
unsigned short dim
Definition: coImageRGB.h:30
void iclose(IMAGE *)
unsigned long min
Definition: coImageRGB.h:34
void i_seterror(void(*func)(char *))
GLenum func
Definition: khronos-glext.h:6719
unsigned short imagic
Definition: coImageRGB.h:28
unsigned long colormap
Definition: coImageRGB.h:38
unsigned long wastebytes
Definition: coImageRGB.h:36