A gray scale image.
Can be loaded from png files
#include <RGBAImage.h>
Classes | |
struct | pixel_t |
struct | RGBAColor |
Public Types | |
enum | Channel { R = 0, G = 1, B = 2, A = 3 } |
Public Member Functions | |
RGBAImage (uint_t _width, uint_t _height) | |
RGBAImage (const std::string &pngFilename) | |
void | save (const std::string &pngFilename) |
RGBAImage | getResizedImage (uint_t newWidth, uint_t newHeight, bool bilinear=true) const |
uint_t | width () const |
uint_t | height () const |
uint_t | size (uint_t coord) const |
void | setToWhite () |
real_t | operator() (cell_idx_t x, cell_idx_t y, Channel c) const |
void | setElement (cell_idx_t x, cell_idx_t y, Channel c, real_t val) |
unsigned char & | getElement (cell_idx_t x, cell_idx_t y, RGBAImage::Channel c) |
const unsigned char & | getElement (cell_idx_t x, cell_idx_t y, RGBAImage::Channel c) const |
pixel_t & | getElement (cell_idx_t x, cell_idx_t y) |
const pixel_t & | getElement (cell_idx_t x, cell_idx_t y) const |
Static Public Member Functions | |
static pixel_t | pixelValueFromString (const std::string &str) |
Protected Member Functions | |
RGBAImage ()=default | |
Protected Attributes | |
uint_t | size_ [2] |
std::vector< unsigned char > | image_ |
walberla::geometry::RGBAImage::RGBAImage | ( | const std::string & | pngFilename | ) |
|
protecteddefault |
|
inline |
|
inline |
|
inline |
|
inline |
RGBAImage walberla::geometry::RGBAImage::getResizedImage | ( | uint_t | newWidth, |
uint_t | newHeight, | ||
bool | bilinear = true |
||
) | const |
|
inline |
real_t walberla::geometry::RGBAImage::operator() | ( | cell_idx_t | x, |
cell_idx_t | y, | ||
RGBAImage::Channel | c | ||
) | const |
|
static |
void walberla::geometry::RGBAImage::save | ( | const std::string & | pngFilename | ) |
void walberla::geometry::RGBAImage::setElement | ( | cell_idx_t | x, |
cell_idx_t | y, | ||
RGBAImage::Channel | c, | ||
real_t | val | ||
) |
|
inline |
|
inline |
|
protected |
|
protected |