Class storing the image.
More...
#include <ImageBuffer.hpp>
|
|
class | ImageBufferIterator< PixelFormat > |
| |
|
| | ImageBufferBase () |
| | Protected constructor. More...
|
| |
|
PixelData | m_pixelData |
| |
|
unsigned int | m_width |
| |
|
unsigned int | m_height |
| |
|
unsigned int | m_tileExtent |
| |
|
unsigned int | m_numOfTilesHorizontal |
| |
|
unsigned int | m_numOfTilesVertical |
| |
|
long | m_stamp |
| |
template<ValueType::Enum PixelFormat>
class FotoSHOCKcore::ImageBuffer< PixelFormat >
Class storing the image.
The ImageBuffer encapsulates the access to image pixels. The image is divided into set of independent tiles (see Tile class). Pixels can be accessed using ImageBuffer::Iterator or by accessing tiles directly (faster).
- Examples:
- graph/example.cpp.
template<ValueType::Enum PixelFormat>
Iterator used for data traversal in the ImageBuffer.
The iterator iterates over lines in the buffer.
template<ValueType::Enum PixelFormat>
A constructor.
Constructs the ImageBuffer with specified attributes.
- Parameters
-
| width | width of the buffer in pixels |
| height | height of the buffer in pixels |
| pixelData | PixelData structure describing the format of a pixel |
| tileExtent | size in pixels of a side of a Tile. The tileExtent mush be power of two. |
| allocateTiles | if set to true (default) the tiles necessary to store image data are constructed along with the buffer |
template<ValueType::Enum PixelFormat>
A copy constructor.
Performs a deep copy.
- Parameters
-
template<ValueType::Enum PixelFormat>
A destructor.
Frees any allocated memory
template<ValueType::Enum PixelFormat>
template<ValueType::Enum PixelFormat>
Get the given Tile.
Get the pointer to a Tile. If the Tile doesn't exist yet, it's created. The numbering starts from 0.
- Parameters
-
| horizontal | horizontal position of a tile in the tile grid |
| vertical | vertical position in a tile grid |
- Returns
- pointer to a Tile
template<ValueType::Enum PixelFormat>
Get a Tile storing the pixel at the given position in the image.
Get the pointer to a Tile at the given position. If the Tile doesn't exist yet, it's created.
- Parameters
-
| x | x coordinate |
| y | y cordinate |
- Returns
- pointer to a Tile
template<ValueType::Enum PixelFormat>
template<ValueType::Enum PixelFormat>
An assignment operator.
Performs a deep copy of the data.
- Parameters
-
- Returns
- reference to the current ImageBuffer
template<ValueType::Enum PixelFormat>
Set stamp for all Tiles.
A stamp is used to help operations identify whether they have alrey run on a specific buffer.
The stamp used should be obtained by calling the ImageBufferBase::newStamp() function.
- Parameters
-
template<ValueType::Enum PixelFormat>
The documentation for this class was generated from the following file: