Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

BmpRGBSampleValue Class Reference

a sample in a bmp rgb (i.e. 24-bit) file

#include <BmpRGBSampleValue.h>

Inheritance diagram for BmpRGBSampleValue:

BmpSampleValue SampleValue List of all members.

Public Member Functions

 BmpRGBSampleValue (BYTE r, BYTE g, BYTE b)
 BmpRGBSampleValue (RGBTriple t)
UWORD32 calcDistance (const SampleValue *s) const
SampleValuegetNearestTargetSampleValue (EmbValue t) const
std::string getName (void) const
BYTE getRed (void) const
BYTE getGreen (void) const
BYTE getBlue (void) const

Private Types

enum  COLOR { RED, GREEN, BLUE }
enum  DIRECTION { UP, DOWN }

Private Member Functions

UWORD32 calcKey (const RGBTriple &rgb) const
EmbValue calcEValue (const RGBTriple &rgb) const
BYTE plus (BYTE a, BYTE b) const
BYTE minus (BYTE a, BYTE b) const
void addNTSVCandidates (std::vector< RGBTriple > &cands, const BYTE cube[3][2], COLOR fc, DIRECTION fd, COLOR i1, COLOR i2, EmbValue t) const

Private Attributes

RGBTriple Color

Member Enumeration Documentation

enum BmpRGBSampleValue::COLOR [private]
 

Enumeration values:
RED 
GREEN 
BLUE 

enum BmpRGBSampleValue::DIRECTION [private]
 

Enumeration values:
UP 
DOWN 


Constructor & Destructor Documentation

BmpRGBSampleValue::BmpRGBSampleValue BYTE  r,
BYTE  g,
BYTE  b
 

BmpRGBSampleValue::BmpRGBSampleValue RGBTriple  t  ) 
 


Member Function Documentation

void BmpRGBSampleValue::addNTSVCandidates std::vector< RGBTriple > &  cands,
const BYTE  cube[3][2],
COLOR  fc,
DIRECTION  fd,
COLOR  i1,
COLOR  i2,
EmbValue  t
const [private]
 

add candidates for the nearest target sample value

Parameters:
cands the candidates vector
cube the color values describing the current search cube
fc the fixed color
fd the fixed side of the fixed color

UWORD32 BmpRGBSampleValue::calcDistance const SampleValue s  )  const [virtual]
 

calculate the distance between the sample value s and this sample value

Parameters:
s a sample value of the same type as this
Returns:
the distance

Reimplemented from BmpSampleValue.

EmbValue BmpRGBSampleValue::calcEValue const RGBTriple rgb  )  const [inline, private]
 

UWORD32 BmpRGBSampleValue::calcKey const RGBTriple rgb  )  const [inline, private]
 

BYTE BmpRGBSampleValue::getBlue void   )  const [inline, virtual]
 

get the blue color component

Implements BmpSampleValue.

BYTE BmpRGBSampleValue::getGreen void   )  const [inline, virtual]
 

get the green color component

Implements BmpSampleValue.

std::string BmpRGBSampleValue::getName void   )  const [virtual]
 

return a short name uniquely identifying this sample value

Implements SampleValue.

SampleValue * BmpRGBSampleValue::getNearestTargetSampleValue EmbValue  t  )  const [virtual]
 

get the nearest (with the least distance to this sample value) sample value whose embedded value equals the specified target

Parameters:
t the target embedded value
If two or more target sample values have equal distance each of them should be returned with equal probability.

The returned SampleValue object should be deleted by the callser.

Implements SampleValue.

BYTE BmpRGBSampleValue::getRed void   )  const [inline, virtual]
 

get the red color component

Implements BmpSampleValue.

BYTE BmpRGBSampleValue::minus BYTE  a,
BYTE  b
const [private]
 

substract the BYTE b from the BYTE a

Returns:
max(0, a - b)

BYTE BmpRGBSampleValue::plus BYTE  a,
BYTE  b
const [private]
 

add the BYTEs a and b

Returns:
min(255, a + b)


Member Data Documentation

RGBTriple BmpRGBSampleValue::Color [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Jul 16 19:41:21 2004 for steghide by doxygen 1.3.7