sofa::helper::io::Image Class Reference

#include <Image.h>

Inheritance diagram for sofa::helper::io::Image:

Inheritance graph
[legend]
Collaboration diagram for sofa::helper::io::Image:

Collaboration graph
[legend]

Public Types

typedef Factory< std::string,
Image, std::string > 
FactoryImage

Public Member Functions

 Image ()
virtual ~Image ()
void init (int w, int h, int nbb)
void clear ()
int getWidth () const
int getHeight () const
int getNbBits () const
int getLineSize () const
int getImageSize () const
unsigned char * getData ()
const unsigned char * getData () const

Static Public Member Functions

static Image * Create (std::string filename)
template<class Object >
static void create (Object *&obj, std::string arg)

Protected Attributes

int width
int height
int nbBits
unsigned char * data

Detailed Description

Definition at line 42 of file Image.h.


Member Typedef Documentation

typedef Factory<std::string, Image, std::string> sofa::helper::io::Image::FactoryImage

Definition at line 63 of file Image.h.


Constructor & Destructor Documentation

sofa::helper::io::Image::Image (  ) 

Definition at line 43 of file Image.cpp.

sofa::helper::io::Image::~Image (  )  [virtual]

Definition at line 48 of file Image.cpp.

References data.


Member Function Documentation

void sofa::helper::io::Image::clear (  ) 

Definition at line 62 of file Image.cpp.

References data, height, nbBits, and width.

Referenced by init().

template<class Object >
static void sofa::helper::io::Image::create ( Object *&  obj,
std::string  arg 
) [inline, static]

Definition at line 68 of file Image.h.

Image * sofa::helper::io::Image::Create ( std::string  filename  )  [static]

const unsigned char* sofa::helper::io::Image::getData (  )  const [inline]

Definition at line 61 of file Image.h.

References data.

unsigned char* sofa::helper::io::Image::getData (  )  [inline]

int sofa::helper::io::Image::getHeight (  )  const [inline]

int sofa::helper::io::Image::getImageSize (  )  const [inline]

Definition at line 59 of file Image.h.

References getLineSize(), and height.

int sofa::helper::io::Image::getLineSize (  )  const [inline]

Definition at line 58 of file Image.h.

References nbBits, and width.

Referenced by getImageSize(), sofa::helper::io::ImagePNG::load(), and sofa::helper::io::ImagePNG::save().

int sofa::helper::io::Image::getNbBits (  )  const [inline]

Definition at line 57 of file Image.h.

References nbBits.

Referenced by sofa::helper::gl::Texture::init(), and sofa::helper::io::ImagePNG::save().

int sofa::helper::io::Image::getWidth (  )  const [inline]

void sofa::helper::io::Image::init ( int  w,
int  h,
int  nbb 
)

Definition at line 53 of file Image.cpp.

References clear(), data, height, nbBits, and width.

Referenced by sofa::helper::io::ImagePNG::load(), and sofa::helper::gl::Capture::saveScreen().


Field Documentation

unsigned char* sofa::helper::io::Image::data [protected]

Definition at line 46 of file Image.h.

Referenced by clear(), getData(), init(), sofa::helper::io::ImageBMP::save(), and ~Image().

Definition at line 45 of file Image.h.

Referenced by clear(), getLineSize(), getNbBits(), init(), and sofa::helper::io::ImageBMP::save().


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

Generated on Sun Nov 23 04:24:18 2008 for Sofa by  doxygen 1.5.7.1