Class for store variable channels of an image.
More...
#include <Image.h>
|
| | Image (const Size &Size) |
| | Constructor.
|
| |
| | Image (const Size &Size, const Type &Type) |
| | Constructor.
|
| |
| | Image (const Size &Size, const Type &Type, const float &v) |
| | Constructor.
|
| |
| | ~Image () |
| | Destructor.
|
| |
| const float & | getValue (const int &x, const int &y, const int &c) const |
| | Get a pixel value.
|
| |
| float | getValueLI (const float &x, const float &y, const int &c) const |
| | Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
|
| |
| const float & | getValue (const int &x, const int &y, const Channel &c) const |
| | Get a pixel value.
|
| |
| float | getValueLI (const float &x, const float &y, const Channel &c) const |
| | Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
|
| |
| Pixel | getPixel (const int &x, const int &y) const |
| | Get a pixel.
|
| |
| Pixel | getPixelLI (const float &x, const float &y) const |
| | Get a pixel with linear interpolation, like x = 4.56, y = 8.34.
|
| |
| void | setValue (const int &x, const int &y, const int &c, const float &v) |
| | Set a pixel value.
|
| |
| void | setValue (const int &x, const int &y, const Channel &c, const float &v) |
| | Set a pixel value.
|
| |
| void | setPixel (const int &x, const int &y, const Pixel &p) |
| | Set a pixel.
|
| |
| Size | getSize () const |
| | Get image size.
|
| |
| Type | getType () const |
| | Get image type.
|
| |
| const int & | getNumberOfChannels () const |
| | Get number of channels.
|
| |
|
| void | _Initialize (const float &v) |
| | Initialize array (Reserve dynamic memory)
|
| |
Class for store variable channels of an image.
Definition at line 42 of file Image.h.
◆ Channel
Channel enum.
| Enumerator |
|---|
| CHANNEL_R | |
| CHANNEL_G | |
| CHANNEL_B | |
| CHANNEL_A | |
Definition at line 58 of file Image.h.
◆ Type
Image type enum.
| Enumerator |
|---|
| TYPE_ONE_CHANNEL | |
| TYPE_TWO_CHANNELS | |
| TYPE_RGB | |
| TYPE_RGBA | Default.
|
Definition at line 47 of file Image.h.
◆ Image() [1/3]
| Hydrax::Image::Image |
( |
const Size & |
Size | ) |
|
Constructor.
- Parameters
-
Definition at line 29 of file Image.cpp.
◆ Image() [2/3]
| Hydrax::Image::Image |
( |
const Size & |
Size, |
|
|
const Type & |
Type |
|
) |
| |
Constructor.
- Parameters
-
Definition at line 37 of file Image.cpp.
◆ Image() [3/3]
| Hydrax::Image::Image |
( |
const Size & |
Size, |
|
|
const Type & |
Type, |
|
|
const float & |
v |
|
) |
| |
Constructor.
- Parameters
-
Definition at line 45 of file Image.cpp.
◆ ~Image()
| Hydrax::Image::~Image |
( |
| ) |
|
◆ _Initialize()
| void Hydrax::Image::_Initialize |
( |
const float & |
v | ) |
|
|
private |
Initialize array (Reserve dynamic memory)
- Parameters
-
Definition at line 239 of file Image.cpp.
◆ getNumberOfChannels()
| const int & Hydrax::Image::getNumberOfChannels |
( |
| ) |
const |
|
inline |
Get number of channels.
- Returns
- Number of channels
Definition at line 253 of file Image.h.
◆ getPixel()
| Image::Pixel Hydrax::Image::getPixel |
( |
const int & |
x, |
|
|
const int & |
y |
|
) |
| const |
◆ getPixelLI()
| Image::Pixel Hydrax::Image::getPixelLI |
( |
const float & |
x, |
|
|
const float & |
y |
|
) |
| const |
Get a pixel with linear interpolation, like x = 4.56, y = 8.34.
- Parameters
-
- Returns
- Pixel
Definition at line 144 of file Image.cpp.
◆ getSize()
| Size Hydrax::Image::getSize |
( |
| ) |
const |
|
inline |
◆ getType()
| Type Hydrax::Image::getType |
( |
| ) |
const |
|
inline |
◆ getValue() [1/2]
| const float & Hydrax::Image::getValue |
( |
const int & |
x, |
|
|
const int & |
y, |
|
|
const Channel & |
c |
|
) |
| const |
|
inline |
Get a pixel value.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
- Returns
- Pixel channel value
Definition at line 176 of file Image.h.
◆ getValue() [2/2]
| const float & Hydrax::Image::getValue |
( |
const int & |
x, |
|
|
const int & |
y, |
|
|
const int & |
c |
|
) |
| const |
Get a pixel value.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
- Returns
- Pixel channel value
Definition at line 58 of file Image.cpp.
◆ getValueLI() [1/2]
| float Hydrax::Image::getValueLI |
( |
const float & |
x, |
|
|
const float & |
y, |
|
|
const Channel & |
c |
|
) |
| const |
|
inline |
Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
- Returns
- Pixel channel value
Definition at line 188 of file Image.h.
◆ getValueLI() [2/2]
| float Hydrax::Image::getValueLI |
( |
const float & |
x, |
|
|
const float & |
y, |
|
|
const int & |
c |
|
) |
| const |
Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
- Returns
- Pixel channel value
Definition at line 76 of file Image.cpp.
◆ setPixel()
| void Hydrax::Image::setPixel |
( |
const int & |
x, |
|
|
const int & |
y, |
|
|
const Pixel & |
p |
|
) |
| |
Set a pixel.
- Parameters
-
Definition at line 192 of file Image.cpp.
◆ setValue() [1/2]
| void Hydrax::Image::setValue |
( |
const int & |
x, |
|
|
const int & |
y, |
|
|
const Channel & |
c, |
|
|
const float & |
v |
|
) |
| |
|
inline |
Set a pixel value.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
| v | Value |
Definition at line 222 of file Image.h.
◆ setValue() [2/2]
| void Hydrax::Image::setValue |
( |
const int & |
x, |
|
|
const int & |
y, |
|
|
const int & |
c, |
|
|
const float & |
v |
|
) |
| |
Set a pixel value.
- Parameters
-
| x | X value |
| y | Y value |
| c | Channel |
| v | Value |
Definition at line 174 of file Image.cpp.
◆ mChannels
| int Hydrax::Image::mChannels |
|
private |
Number of channels.
Definition at line 267 of file Image.h.
◆ mData
| float* Hydrax::Image::mData |
|
private |
Our image data.
Definition at line 270 of file Image.h.
◆ mSize
| Size Hydrax::Image::mSize |
|
private |
The documentation for this class was generated from the following files: