A labelling that usually belongs to a RGBImage.
More...
#include <image.h>
Public Member Functions |
| | LabelImage (int width, int height) |
| | Creates a label image of the given width and height.
|
| | LabelImage (const std::string &filename) |
| | Loads a label image from an image file from disk.
|
| const std::string & | getFilename () const |
| bool | isInImage (int x, int y) const |
|
void | save (const std::string &filename) const |
| | store (export) this label image to the given filename
|
| size_t | getSizeInMemory () const |
| int | getWidth () const |
| int | getHeight () const |
|
void | setLabel (int x, int y, const LabelType label) |
| | sets the label of a pixel
|
| LabelType | getLabel (int x, int y) const |
|
void | resizeImage (int newWidth, int newHeight, LabelType paddingLabel) |
| | resize the image to new depth and height and uses the provided label for padding
|
Detailed Description
A labelling that usually belongs to a RGBImage.
- See Also
- LabeledRGBDImage
Definition at line 427 of file image.h.
Constructor & Destructor Documentation
| curfil::LabelImage::LabelImage |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inline |
Creates a label image of the given width and height.
Initial label values are set to zero.
Definition at line 442 of file image.h.
| curfil::LabelImage::LabelImage |
( |
const std::string & |
filename | ) |
|
Loads a label image from an image file from disk.
Each color in the image is assigned to a unique color id.
Member Function Documentation
| static LabelType curfil::LabelImage::encodeColor |
( |
RGBColor |
color | ) |
|
|
static |
- Returns
- the id associated with the color
| const std::string& curfil::LabelImage::getFilename |
( |
| ) |
const |
|
inline |
- Returns
- the filename this label image was loaded from. Empty if it was created manually.
Definition at line 461 of file image.h.
| int curfil::LabelImage::getHeight |
( |
| ) |
const |
|
inline |
- Returns
- the height of the image
Definition at line 504 of file image.h.
| LabelType curfil::LabelImage::getLabel |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
- Returns
- the label of a pixel
Definition at line 519 of file image.h.
| size_t curfil::LabelImage::getSizeInMemory |
( |
| ) |
const |
|
inline |
- Returns
- the total memory usage of this image in bytes
Definition at line 490 of file image.h.
| int curfil::LabelImage::getWidth |
( |
| ) |
const |
|
inline |
- Returns
- the width of the image
Definition at line 497 of file image.h.
| bool curfil::LabelImage::isInImage |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
- Returns
- true if and only if the position lies in the image
Definition at line 468 of file image.h.
The documentation for this class was generated from the following file: