class CImageChannel

CImageChannel manages data of a single image channel with origin in the lower left corner. The datatype of the pixels is float (32bit) , short (16bit) or unsigned char (8bit). More...

Definition#include <./CImageChannel.h>
Template formCImageChannel<class Type>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

This object supports data sharing.

int iDepth

iDepth

[protected]

int iWidth

iWidth

[protected]

int iHeight

iHeight

[protected]

Type* ptData

ptData

[protected]

Type** pptRow

pptRow

[protected]

char acChannelInfo[65]

acChannelInfo[65]

[protected]

int iRefCounter

iRefCounter

[protected]

unsigned char* _ptData

_ptData

[protected]

 CImageChannel (int iWidth=0, int iHeight=0)

CImageChannel

Allocates memory for an image channel of the specified width and height.

Parameters:
iWidthImage channel width
iHeightImage channel height

 CImageChannel (const CImageChannel& tSource)

CImageChannel

Copy constructor - generates a copy of the source channel

Parameters:
tSourceSource image channel

CImageChannel&  operator= (const CImageChannel& tSource)

operator=

Assignment operator

Parameters:
tSourceInstance of CImageChannel

 ~CImageChannel ()

~CImageChannel

Destructor

void  setPixel (int iX, int iY, Type tValue)

setPixel

Assigns a new value to the pixel at the specified position.

Parameters:
iXx-coordinate of the pixel
iYy-coordinate of the pixel
tValueNew value

void  setRowData (Type* pSrc,int iRow)

setRowData

Copies data from pSource to row iRow.

Parameters:
iRowIndex of row

void  resize (int iWidth, int iHeight)

resize

Resizes the channel.

Parameters:
iWidthNew width
iHeightNew height

void  clear ()

clear

clear fills each channel with zeros.

void  setChannelInfo (const char* acText)

setChannelInfo

Sets the channel info text (max. 64 chars).

const char*  getChannelInfo ()

getChannelInfo

[const]

Returns pointer to the channel info text.

int  width ()

width

[const]

Returns the width of the image channel

Returns: Width of channel

int  height ()

height

[const]

Returns the height of the image channel

Returns: height of image channel

int  depth ()

depth

[const]

Returns the depth in bit of the image channel

Returns: Depth of image channel in bit

Type  getPixel (int iX, int iY)

getPixel

[const]

Returns the value of the pixel at the specified position.

Parameters:
iXx-coordinate of the pixel
iYy-coordinate of the pixel

Returns: Value of specified pixel

Type  operator() (int iX, int iY)

operator()

[const]

Operator version of getPixel.

Parameters:
iXx-coordinate of the pixel
iYy-coordinate of the pixel

Returns: Value of specified pixel

Type  min ()

min

[const]

Returns minimal pixel value

Returns: Minimal pixel value

Type  max ()

max

[const]

Returns maximal pixel value

Returns: Maximal pixel value

void  scaleRange (Type tNewMin, Type tNewMax, Type tMin, Type tMax)

scaleRange

Scales pixel values from given min/max values to new min/max values. Values exceeding the given range are set to the new min/max values. In the SAVE mode, a warning is given for each of these pixels. For an automatic scaling use the results of min(),max() as as arguments. (Defining a range allows to compare different images.) Note: Scaling involves an internal cast to float!

Parameters:
tNewMin, tNewMax, New min/max values
tMin, tMax, Assumed min/max values

vector  histogram (float fMin, float fMax, int iNbBins)

histogram

[const]

Calculates a histogram given min, max, #bins

Parameters:
fMinMinimum bin value
fMaxMaximum bin value
iNbBinsNumber of bins

int  refs ()

refs

[const]

Returns number of references to this object

Returns: Number of references

void  incRefCounter ()

incRefCounter

Increments the references counter by one

void  decRefCounter ()

decRefCounter

Decrements the references counter by one

Type*  getRowPtr (int iRow)

getRowPtr

Returns pointer on the selected row.

Parameters:
iRowIndex of row

Type*  getDataPtr ()

getDataPtr

[const]


Generated by: clange on memnon on Tue Feb 4 16:52:35 2003, using kdoc 2.0a53.