COVISE Core
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
covise::coImage Class Reference

#include <coImage.h>

Collaboration diagram for covise::coImage:
Collaboration graph
[legend]

Public Types

typedef coImageImplvCtor(const char *filename)
 type for virtual constructor creating from a file name More...
 

Public Member Functions

 coImage (const char *filename)
 Constructor: build from filename. More...
 
 coImage (coBinImage *binImage)
 
 coImage ()
 Default c'tor: does nothing. More...
 
 ~coImage ()
 Destructor: build from filename. More...
 
void scale (int newWidth, int newHeight)
 
void scaleExp2 ()
 scale to next lower 2^x in both dimensions More...
 
int getWidth ()
 width of image More...
 
int getHeight ()
 height of image; More...
 
int getNumChannels ()
 get number of Color Channels More...
 
int getNumFrames ()
 get number of frames More...
 
const unsigned char * getBitmap (int frameno=0)
 get pointer to internal data More...
 
bool isBad ()
 Did we have errors on reading. More...
 
const char * errorMessage ()
 Error message if problems occurred: empty if ok. More...
 

Static Public Member Functions

static bool registerImageType (const char *suffixes[], vCtor *cTor)
 register a derived class for usage with the Factory More...
 

Private Attributes

coImageImplimage_
 the real internal image More...
 

Static Private Attributes

static map< string, vCtor * > * vCtorList_ = NULL
 virtual c'tors for given file endings More...
 

Detailed Description

Base Class for all kinds of images

Member Typedef Documentation

◆ vCtor

typedef coImageImpl * covise::coImage::vCtor(const char *filename)

type for virtual constructor creating from a file name

Constructor & Destructor Documentation

◆ coImage() [1/3]

coImage::coImage ( const char *  filename)

Constructor: build from filename.

◆ coImage() [2/3]

coImage::coImage ( coBinImage binImage)

◆ coImage() [3/3]

covise::coImage::coImage ( )
inline

Default c'tor: does nothing.

◆ ~coImage()

coImage::~coImage ( )

Destructor: build from filename.

Member Function Documentation

◆ errorMessage()

const char * coImage::errorMessage ( )

Error message if problems occurred: empty if ok.

◆ getBitmap()

const unsigned char * coImage::getBitmap ( int  frameno = 0)

get pointer to internal data

◆ getHeight()

int coImage::getHeight ( )

height of image;

◆ getNumChannels()

int coImage::getNumChannels ( )

get number of Color Channels

◆ getNumFrames()

int coImage::getNumFrames ( )

get number of frames

◆ getWidth()

int coImage::getWidth ( )

width of image

◆ isBad()

bool coImage::isBad ( )

Did we have errors on reading.

◆ registerImageType()

bool coImage::registerImageType ( const char *  suffixes[],
coImage::vCtor cTor 
)
static

register a derived class for usage with the Factory

◆ scale()

void COIMAGEEXPORT coImage::scale ( int  newWidth,
int  newHeight 
)

create a scaled image: implemented, can be overridden by subclasses @@@ currently only shrink

To scale an image, we create a new coBinImage instead of the current image and attach it to our image_ variable

Line-by-line calculations of result image

◆ scaleExp2()

void coImage::scaleExp2 ( )

scale to next lower 2^x in both dimensions

Member Data Documentation

◆ image_

coImageImpl* covise::coImage::image_
private

the real internal image

◆ vCtorList_

map< string, coImage::vCtor * > * coImage::vCtorList_ = NULL
staticprivate

virtual c'tors for given file endings


The documentation for this class was generated from the following files: