COVISE Core
coDoPixelImage.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_DO_PIXELIMAGE_H
9 #define CO_DO_PIXELIMAGE_H
10 
11 /***************************************************************************
12  ** (C)1996 RUS **
13  ** **
14  ** Description: Class-Declaration of a new COVISE-OBJECT **
15  ** for handling Image-Data **
16  ** **
17  ** **
18  ** **
19  ** (C) 1996 **
20  ** Paul Benoelken **
21  ** Computer Center University of Stuttgart **
22  ** Allmandring 30 **
23  ** 70550 Stuttgart **
24  ** Author: Paul Benoelken **
25  ** **
26  ** Date: 04.12.96 V1.0 **
27  ****************************************************************************/
28 
29 #include "coDistributedObject.h"
30 
31 namespace covise
32 {
33 
35 {
36  friend class coDoInitializer;
37  static coDistributedObject *virtualCtor(coShmArray *arr);
38 
39 private:
40  coShortShm pixelsize; // number of bytes stored per pixels
41  coIntShm width; // number of Pixels in X-direction
42  coIntShm height; // number of Pixels in Y-direction
43  coIntShm format; // id for pixelformat
44  coCharShmArray pixels; // image data
45 
46 protected:
47  int rebuildFromShm();
48  int getObjInfo(int, coDoInfo **) const;
49  coDoPixelImage *cloneObject(const coObjInfo &newinfo) const;
50 
51 public:
52  coDoPixelImage(const coObjInfo &info);
53  coDoPixelImage(const coObjInfo &info, coShmArray *arr);
54  coDoPixelImage(const coObjInfo &info, int width, int height, short psize, unsigned form,
55  const char **buffer);
56  coDoPixelImage(const coObjInfo &info, int width, int height, short psize, unsigned form,
57  const char *buffer);
58  coDoPixelImage(const coObjInfo &info, int width, int height, short psize, unsigned form);
59 
60  int getWidth() const;
61  int getHeight() const;
62  int getPixelsize() const;
63  unsigned getFormat() const;
64  char *getPixels() const;
65  char &operator()(int x, int y);
66  const char &operator()(int x, int y) const;
67  char &operator[](int i);
68  const char &operator[](int i) const;
69 };
70 }
71 #endif
coIntShm height
Definition: coDoPixelImage.h:42
GLuint buffer
Definition: khronos-glext.h:6606
Definition: covise_shm.h:481
GLint GLint GLsizei GLsizei height
Definition: khronos-glext.h:6344
Definition: coDistributedObject.h:266
coShortShm pixelsize
Definition: coDoPixelImage.h:40
GLint GLint GLsizei width
Definition: khronos-glext.h:6344
Definition: covise_shm.h:615
Definition: coObjID.h:230
Definition: coDoPixelImage.h:34
Definition: covise_statics.cpp:54
Definition: coDistributedObject.h:295
GLint GLint GLint GLint GLint x
Definition: khronos-glext.h:6346
GLint GLint GLint GLint GLint GLint y
Definition: khronos-glext.h:6346
#define DOEXPORT
Definition: coExport.h:331
coIntShm width
Definition: coDoPixelImage.h:41
coCharShmArray pixels
Definition: coDoPixelImage.h:44
coIntShm format
Definition: coDoPixelImage.h:43
list of all chemical elements
Definition: coConfig.h:26