JpegReader, inherited from ContainerReader, is a reader for jpeg images.
More...
#include <JpegReader.hpp>
|
void | initialize () |
| initialized the reading process. More...
|
|
void | release () |
| release the reading process. More...
|
|
int | read (Container2d &in) |
| virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1. More...
|
|
|
| JpegReader () |
|
| JpegReader (std::string data_filename) |
|
virtual | ~JpegReader () |
|
|
const std::string & | get_data_filename () const |
| return the name of the file containing the data to read More...
|
|
void | set_data_filename (const std::string &data_filename) |
|
std::size_t | get_nb_block () const |
| return the number of splitting blocks of the data More...
|
|
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
class slip::JpegReader< Container2d, T, Nb_components, Nb_block >
JpegReader, inherited from ContainerReader, is a reader for jpeg images.
- Version
- Fluex 1.0
- Date
- 2013/04/05
- Author
- Denis Arrivault <denis.arrivault_AT_inria.fr>
- Parameters
-
Container2d | should be a 2d Container with a component number equal to Nb_components. |
T | the type of the container data. |
Nb_components | the number of image components (3 for a color image or 1 for a gray scale image). |
Nb_block | is the number of containers to create (>1 if one want to split the input data into different containers, default is 1). Notice that the image data is always cut according to the rows dimension which must be the first dimension of the input container. In other words each container will contain a set of rows which size depends on the Nb_block. |
- Precondition
- Container2d should have Nb_components components
-
Nb_components should be 1 or 3.
- Axis conventions (dim1 = rows, dim2 = cols):
axis and notation conventions
- Examples:
- jpg_file_io.cpp.
Definition at line 45 of file JpegReader.hpp.
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
Constructor with parameters.
- Parameters
-
data_filename | is the name of the file containing the data to read |
- Note
- this constructor automatically call the initialize() method.
Definition at line 68 of file JpegReader.hpp.
template<class Container2d, typename T, std::size_t Nb_components, std::size_t Nb_block>
return the name of the file containing the data to read
return the number of splitting blocks of the data
template<class Container2d , typename T , std::size_t Nb_components, std::size_t Nb_block>
void slip::JpegReader< Container2d, T, Nb_components, Nb_block >::initialize |
( |
| ) |
|
|
inline |
initialized the reading process.
- Note
- an initialization is called by the JpegReader(std::string) constructor.
Definition at line 128 of file JpegReader.hpp.
template<class Container2d , typename T , std::size_t Nb_components, std::size_t Nb_block>
int slip::JpegReader< Container2d, T, Nb_components, Nb_block >::read |
( |
Container2d & |
in | ) |
|
|
virtual |
virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1.
- Parameters
-
in | is the container to fill. Warning, the container should be a 2d container with [] operator, resize(), width() and height() methods defined. |
- Returns
- true if there is still data to read, false if the file has been completely read.
Implements slip::ContainerReader< Container2d, T, Nb_block >.
Definition at line 211 of file JpegReader.hpp.
template<class Container2d , typename T , std::size_t Nb_components, std::size_t Nb_block>
release the reading process.
- Note
- this method is called by the destructor.
Definition at line 248 of file JpegReader.hpp.
void slip::ContainerReader< Container2d , T, Nb_block >::set_data_filename |
( |
const std::string & |
data_filename | ) |
|
|
inherited |
- Parameters
-
data_filename | is the name of the file containing the data to read |
The documentation for this class was generated from the following file: