RasterImage Class Reference

Generic raster image. More...

#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)

Detailed Description

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.


Member Enumeration Documentation

enum Mode

coloring mode

Enumerator:
GREY 
PHASECOLOR 
SIGNCOLOR 

Definition at line 64 of file raster_image.hh.


Constructor & Destructor Documentation

RasterImage ( unsigned int  width,
unsigned int  height 
)

Initialization must specify size.

RasterImage ( unsigned int  width,
unsigned int  height,
uchar *  dptr 
)
~RasterImage (  ) 

Member Function Documentation

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 
)
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

uchar* GetDataPtr (  )  const [inline]

Get raw data pointer (consecutive unsigned char triplets).

Definition at line 96 of file raster_image.hh.

unsigned int GetHeight (  )  const [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!).

unsigned int GetWidth (  )  const [inline]

Definition at line 87 of file raster_image.hh.

uchar* ReleaseDataPtr (  )  [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!).


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 1 Mar 2018 for OpenStructure by  doxygen 1.6.1