steghide
0.5.1
|
the value of a sample in a CvrStgFile More...
#include <SampleValue.h>
Public Member Functions | |
SampleValue (void) | |
virtual | ~SampleValue (void) |
virtual SampleValue * | getNearestTargetSampleValue (EmbValue t) const =0 |
virtual UWORD32 | calcDistance (const SampleValue *s) const =0 |
virtual std::string | getName (void) const =0 |
virtual bool | isNeighbour (const SampleValue *s) const |
EmbValue | getEmbeddedValue (void) const |
UWORD32 | getKey (void) const |
bool | operator== (const SampleValue &sv) const |
bool | operator!= (const SampleValue &sv) const |
bool | operator< (const SampleValue &sv) const |
UWORD32 | getNumEdges (EmbValue t) const |
void | setNumEdges (EmbValue t, UWORD32 ne) |
void | incNumEdges (EmbValue t) |
void | decNumEdges (EmbValue t) |
void | setLabel (unsigned long l) |
unsigned long | getLabel (void) const |
void | print (unsigned short spc=0) const |
Protected Attributes | |
EmbValue | EValue |
the bit that is embedded in this sample value - must be set in constructor of derived class | |
UWORD32 | Key |
the key of this sample value - must be different for two different sample values - must be set in constructor of derived class | |
Private Attributes | |
unsigned long | Label |
UWORD32 * | NumEdges |
This is the abstract base class for all AuSampleValue, BmpSampleValue, etc. classes
For two sample values s1 and s2:
s1->calcDistance(s2) == s2->calcDistance(s1) is always true.
s1->isNeighbour(s2) == s2->isNeighbour(s1) is always true.
s1 and s2 are called opposite if s1->getBit() != s2->getBit()
s1 and s2 are called neighbours if s1->isNeighbour(s2) is true
s1->getKey() == s2->getKey() iff s1 == s2
s1 == s2 implies s1->getDistance(s2) == 0 BUT: s1->getDistance(s2) == 0 does not imply s1 == s2 example: 8-bit bmp palette image - same color value for two different indices
s1 == s2 implies s1->getBit() == s2->getBit()
s1->getDistance(s2) == 0 implies s1->getBit() == s2->getBit()
NOTE: SampleValue and all derived classes rely on the Globals object pointed to by the Globs pointer. This means that it must be set correctly before using any method of a SampleValue (or derived) object.
SampleValue::SampleValue | ( | void | ) |
|
virtual |
|
pure virtual |
calculate the distance between the sample value s and this sample value
s | a sample value of the same type as this |
Implemented in AudioSampleValue< Type, ValueType >, DummySampleValue, BmpRGBSampleValue, BmpSampleValue, WavPCMSampleValue, and JpegSampleValue.
void SampleValue::decNumEdges | ( | EmbValue | t | ) |
|
inline |
get the value that is embedded in this sample value (must be >=0 and <EmbValueModulus)
|
inline |
get the key for this sample
|
inline |
|
pure virtual |
return a short name uniquely identifying this sample value
Implemented in AudioSampleValue< Type, ValueType >, DummySampleValue, BmpRGBSampleValue, BmpPaletteSampleValue, WavPCMSampleValue, and JpegSampleValue.
|
pure virtual |
get the nearest (with the least distance to this sample value) sample value whose embedded value equals the specified target
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.
Implemented in AudioSampleValue< Type, ValueType >, DummySampleValue, BmpRGBSampleValue, BmpPaletteSampleValue, WavPCMSampleValue, and JpegSampleValue.
void SampleValue::incNumEdges | ( | EmbValue | t | ) |
|
virtual |
is the sample value s a neighbour of this sample value ?
This is implemented as (calcDistance() <= Radius) but may be overridden by derived classes.
Reimplemented in DummySampleValue.
|
inline |
|
inline |
|
inline |
two sample values are equal iff their keys are equal
void SampleValue::print | ( | unsigned short | spc = 0 | ) | const |
|
inline |
|
protected |
|
protected |
|
private |
|
private |
NumEdges[t] contains the number of edges that are added to a vertex if this sample value with corresponding target value t is added to the vertex