|
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...
|
|
|
| PngReader () |
| Default constructor. More...
|
|
| PngReader (std::string data_filename) |
|
virtual | ~PngReader () |
| Destructor. More...
|
|
|
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::PngReader< Container2d, T, Nb_components, Nb_block >
PngReader, inherited from ContainerReader, is a reader for png images.
- Version
- Fluex 1.0
- Date
- 2013/04/22
- 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.
- Examples:
- netcdf_file_io.cpp.
Definition at line 40 of file PngReader.hpp.
template<class Container2d , typename T , std::size_t Nb_components, std::size_t Nb_block>
int slip::PngReader< 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 279 of file PngReader.hpp.