COVISE Core
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"
21extern "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) */
26typedef 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;
40extern IMAGE *iopen(const char *, const char *);
41extern void getrow(IMAGE *, short *, int, int);
42extern void iclose(IMAGE *);
43#if !defined(__hpux) && !defined(__linux__)
44extern void i_seterror(void (*func)(char *));
45#endif
46};
47
52namespace covise
53{
54
55class coImageRGB : public coImageImpl
56{
57public:
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
79protected:
80 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81 // ++ Attributes
82 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
83 int dimension_;
84 int bytesPerPixel_;
85 unsigned char *pixmap_;
86
87private:
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
GLenum func
Definition: khronos-glext.h:6719
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: khronos-glext.h:6356
GLuint const GLchar * name
Definition: khronos-glext.h:6722
void getrow(IMAGE *, short *, int, int)
void iclose(IMAGE *)
IMAGE * iopen(const char *, const char *)
void i_seterror(void(*func)(char *))
list of all chemical elements
Definition: coConfig.h:27
Definition: coImageRGB.h:27
unsigned long max
Definition: coImageRGB.h:35
unsigned short ysize
Definition: coImageRGB.h:32
unsigned short dim
Definition: coImageRGB.h:30
unsigned short imagic
Definition: coImageRGB.h:28
unsigned long min
Definition: coImageRGB.h:34
unsigned short type
Definition: coImageRGB.h:29
unsigned short xsize
Definition: coImageRGB.h:31
unsigned long wastebytes
Definition: coImageRGB.h:36
unsigned short zsize
Definition: coImageRGB.h:33
unsigned long colormap
Definition: coImageRGB.h:38