COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coImage.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_IMAGE_H_
9 #define _CO_IMAGE_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 
22 namespace covise
23 {
24 class coImageImpl;
25 class coBinImage;
26 
32 {
33 public:
35  typedef coImageImpl *vCtor(const char *filename);
36 
37  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
38  // ++ Operations
39  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
40 
42  coImage(const char *filename);
43 
44  /* Constructor: build from binary image: Takes over control about
45  given coBinImage and its memor and deletes it in dTor or after
46  scaling operations
47  */
48  coImage(coBinImage *binImage);
49 
51  coImage(){};
52 
54  ~coImage();
55 
57  static bool registerImageType(const char *suffixes[], vCtor *cTor);
58 
61  void scale(int newWidth, int newHeight);
62 
64  void scaleExp2();
65 
66  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
67  // ++ Attribute request/set functions
68  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
69 
71  int getWidth();
72 
74  int getHeight();
75 
77  int getNumChannels();
78 
80  int getNumFrames();
81 
83  const unsigned char *getBitmap(int frameno = 0);
84 
86  bool isBad();
87 
89  const char *errorMessage();
90 
91 private:
93  static map<string, vCtor *> *vCtorList_;
94 
97 };
98 }
99 #endif
coImageImpl * image_
the real internal image
Definition: coImage.h:96
GLenum GLenum GLenum GLenum GLenum scale
Definition: khronos-glext.h:9991
Definition: coImageImpl.h:29
Definition: coBinImage.h:29
#define COIMAGEEXPORT
Definition: coExport.h:105
coImageImpl * vCtor(const char *filename)
type for virtual constructor creating from a file name
Definition: coImage.h:35
static map< string, vCtor * > * vCtorList_
virtual c&#39;tors for given file endings
Definition: coImage.h:93
coImage()
Default c&#39;tor: does nothing.
Definition: coImage.h:51
static const char * suffixes[]
Definition: coImagePNG.cpp:33
Definition: coImage.h:31