|
OpenStructure
|
#include <raster_image.hh>
Data Structures | |
| struct | Pixel |
| Single pixel spec. More... | |
Public Types | |
| enum | Mode { GREY = 1, PHASECOLOR, SIGNCOLOR } |
Public Member Functions | |
| RasterImage (unsigned int width, unsigned int height) | |
| RasterImage (unsigned int width, unsigned int height, uchar *dptr) | |
| ~RasterImage () | |
| unsigned int | GetWidth () const |
| unsigned int | GetHeight () const |
| void | SetPixel (unsigned int x, unsigned int y, const Pixel &p) |
| Pixel | GetPixel (unsigned int x, unsigned int y) const |
| uchar * | GetDataPtr () const |
| uchar * | ReleaseDataPtr () |
| void | Fill (const Data &d, int logscale, const Vec3 &offset, int z, const NormalizerPtr &norm, Mode mode=GREY, bool fast_low_mag_flag=true, bool fast_high_mag_flag=true) |
| void | Fill (const Data &d, int logscale, const Vec3 &offset, int z, const NormalizerPtr &norm, Mode mode, bool fast_low_mag_flag, bool fast_high_mag_flag, int x1, int y1, int x2, int y2) |
Generic raster image.
RasterImage serves as a conversion class between img and external libs, such as wxWidgets. The underlying representation is always RGB mode, saved consecutively in 3-byte triplets.
Definition at line 60 of file raster_image.hh.
| enum Mode |
| RasterImage | ( | unsigned int | width, |
| unsigned int | height | ||
| ) |
Initialization must specify size.
| RasterImage | ( | unsigned int | width, |
| unsigned int | height, | ||
| uchar * | dptr | ||
| ) |
| ~RasterImage | ( | ) |
| void Fill | ( | const Data & | d, |
| int | logscale, | ||
| const Vec3 & | offset, | ||
| int | z, | ||
| const NormalizerPtr & | norm, | ||
| Mode | mode = GREY, |
||
| bool | fast_low_mag_flag = true, |
||
| bool | fast_high_mag_flag = true |
||
| ) |
fill with image data
| void Fill | ( | const Data & | d, |
| int | logscale, | ||
| const Vec3 & | offset, | ||
| int | z, | ||
| const NormalizerPtr & | norm, | ||
| Mode | mode, | ||
| bool | fast_low_mag_flag, | ||
| bool | fast_high_mag_flag, | ||
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
|
inline |
Get raw data pointer (consecutive unsigned char triplets)
Definition at line 96 of file raster_image.hh.
|
inline |
Definition at line 88 of file raster_image.hh.
| Pixel GetPixel | ( | unsigned int | x, |
| unsigned int | y | ||
| ) | const |
Get pixel at specified point (no boundary check is performed!)
|
inline |
Definition at line 87 of file raster_image.hh.
|
inline |
Release data pointer.
Internally allocated storage will no longer be freed upon RasterImage deletion
Definition at line 103 of file raster_image.hh.
| void SetPixel | ( | unsigned int | x, |
| unsigned int | y, | ||
| const Pixel & | p | ||
| ) |
Set pixel at specified point (no boundary check is performed!)
1.8.1.1