|
degate 0.1.1
|
The base class for image readers. More...
#include <ImageReaderBase.h>

Public Member Functions | |
| ImageReaderBase (std::string const &_filename) | |
| Constructor. | |
| virtual | ~ImageReaderBase () |
| The destructor. | |
| std::string | get_filename () const |
| Get the filename. | |
| virtual bool | read ()=0 |
| Read the image ot at least its meta data. | |
| unsigned int | get_width () const |
| Get the image width. | |
| unsigned int | get_height () const |
| Get the image height. | |
| virtual bool | get_image (std::tr1::shared_ptr< ImageType > img)=0 |
| Read the file content into image. | |
Protected Member Functions | |
| void | set_width (unsigned int _width) |
| Set the width of the image. | |
| void | set_height (unsigned int _height) |
| Set the height of the image. | |
Private Attributes | |
| std::string | filename |
| unsigned int | width |
| unsigned int | height |
The base class for image readers.
Definition at line 41 of file ImageReaderBase.h.
| degate::ImageReaderBase< ImageType >::ImageReaderBase | ( | std::string const & | _filename | ) | [inline] |
Constructor.
Definition at line 71 of file ImageReaderBase.h.
| virtual degate::ImageReaderBase< ImageType >::~ImageReaderBase | ( | ) | [inline, virtual] |
| std::string degate::ImageReaderBase< ImageType >::get_filename | ( | ) | const [inline] |
Get the filename.
Definition at line 86 of file ImageReaderBase.h.
References degate::ImageReaderBase< ImageType >::filename.
{ return filename; }
| unsigned int degate::ImageReaderBase< ImageType >::get_height | ( | ) | const [inline] |
Get the image height.
You have to call read() before.
Definition at line 115 of file ImageReaderBase.h.
References degate::ImageReaderBase< ImageType >::height.
{ return height; }
| virtual bool degate::ImageReaderBase< ImageType >::get_image | ( | std::tr1::shared_ptr< ImageType > | img | ) | [pure virtual] |
Read the file content into image.
Implemented in degate::JPEGReader< ImageType >, and degate::TIFFReader< ImageType >.
| unsigned int degate::ImageReaderBase< ImageType >::get_width | ( | ) | const [inline] |
Get the image width.
You have to call read() before.
Definition at line 107 of file ImageReaderBase.h.
References degate::ImageReaderBase< ImageType >::width.
{ return width; }
| virtual bool degate::ImageReaderBase< ImageType >::read | ( | ) | [pure virtual] |
Read the image ot at least its meta data.
If you derive from class ImageReaderBase, you can implement a full image read operation here. But it is also possible to implement just the read of meta data, such as width and height.
Implemented in degate::JPEGReader< ImageType >, and degate::TIFFReader< ImageType >.
| void degate::ImageReaderBase< ImageType >::set_height | ( | unsigned int | _height | ) | [inline, protected] |
Set the height of the image.
This method should be called by derived image readers to set the image size.
Definition at line 62 of file ImageReaderBase.h.
References degate::ImageReaderBase< ImageType >::height.
{ height = _height; }
| void degate::ImageReaderBase< ImageType >::set_width | ( | unsigned int | _width | ) | [inline, protected] |
Set the width of the image.
This method should be called by derived image readers to set the image size.
Definition at line 54 of file ImageReaderBase.h.
References degate::ImageReaderBase< ImageType >::width.
{ width = _width; }
std::string degate::ImageReaderBase< ImageType >::filename [private] |
Definition at line 44 of file ImageReaderBase.h.
Referenced by degate::ImageReaderBase< ImageType >::get_filename().
unsigned int degate::ImageReaderBase< ImageType >::height [private] |
Definition at line 45 of file ImageReaderBase.h.
Referenced by degate::ImageReaderBase< ImageType >::get_height(), and degate::ImageReaderBase< ImageType >::set_height().
unsigned int degate::ImageReaderBase< ImageType >::width [private] |
Definition at line 45 of file ImageReaderBase.h.
Referenced by degate::ImageReaderBase< ImageType >::get_width(), and degate::ImageReaderBase< ImageType >::set_width().
1.7.4