steghide 0.5.1
Public Member Functions | Private Attributes | List of all members
Vertex Class Reference

a vertex in a graph More...

#include <Vertex.h>

Public Member Functions

 Vertex (VertexLabel l, SamplePos *sposs, SampleValue **svalues, EmbValue t)
 
 ~Vertex (void)
 
SamplePos getSamplePos (unsigned short i) const
 
SampleValuegetSampleValue (unsigned short i) const
 
UWORD32 getDegree (void) const
 
EdgegetShortestEdge (void) const
 
void updateShortestEdge (void)
 
void markDeleted (void)
 
void unmarkDeleted (void)
 
VertexLabel getLabel (void) const
 
void setLabel (VertexLabel l)
 
void setSampleOccurenceIt (unsigned short i, std::list< SampleOccurence >::iterator it)
 
EmbValue getEmbeddedValue (void) const
 
EmbValue getTargetValue (unsigned short i) const
 
void print (unsigned short spc=0) const
 
void printEdges (void) const
 

Private Attributes

VertexLabel Label
 the vertex label of this vertex
 
SamplePosSamplePositions
 the sample positions of the samples described by this vertex in the CvrStgFile
 
SampleValue ** SampleValues
 the sample values at the SamplePositions
 
EmbValueTargetValues
 the target values for the sample values (exactly one of them has to be reached (and the other left unchanged) to embed this vertex)
 
std::list< SampleOccurence >::iterator * SampleOccurenceIts
 point to entries in std::lists of sample occurences in the graph
 
EdgeShortestEdge
 the shortest edge of this vertex (as calculated by updateShortestEdge)
 
bool valid
 true iff this vertex is not deleted
 
unsigned short SelfDegree
 the number of loop edges (loop edges are not valid edges)
 

Detailed Description

A vertex represents a bit that will cause a change to the cover-stego-file to be embedded. A vertex consists of k samples (that is k sample values at k (different) positions in the cover-stego-file), where k is TheCvrStgFile->getNumSamplesPerVertex(). One of these k samples must be changed to an opposite sample to embed the bit that corresponds to this vertex.

NOTE: Vertex relies on the Globals object pointed to by the Globs pointer. This means that it must be set correctly before using any method of a Vertex object.

Constructor & Destructor Documentation

◆ Vertex()

Vertex::Vertex ( VertexLabel  l,
SamplePos sposs,
SampleValue **  svalues,
EmbValue  t 
)

construct a new vertex object

Parameters
lthe vertex label for this vertex
spossthe array (with length g->getSamplesPerVertex()) of the positions of the samples
svaluesthe array (with length g->getSamplesPerVertex()) of (unique (!)) pointers to the sample values
tthe target value for the whole vertex - the value that should be returned by getEmbeddedValue() after the embedding

◆ ~Vertex()

Vertex::~Vertex ( void  )

Member Function Documentation

◆ getDegree()

UWORD32 Vertex::getDegree ( void  ) const

get the degree of this vertex

◆ getEmbeddedValue()

EmbValue Vertex::getEmbeddedValue ( void  ) const

◆ getLabel()

VertexLabel Vertex::getLabel ( void  ) const
inline

◆ getSamplePos()

SamplePos Vertex::getSamplePos ( unsigned short  i) const
inline

get the i-th sample position

Parameters
ian index of a sample in this vertex (must be < TheCvrStgFile->getNumSamplesPerVertex())
Returns
the position of the sample in the associated cvrstgfile

◆ getSampleValue()

SampleValue * Vertex::getSampleValue ( unsigned short  i) const
inline

get the i-th sample value

Parameters
ian index of a sample in this vertex (must be < TheCvrStgFile->getNumSamplesPerVertex())
Returns
the value of the sample in the associated cvrstgfile

◆ getShortestEdge()

Edge * Vertex::getShortestEdge ( void  ) const
inline

get the shortest edge of this vertex

◆ getTargetValue()

EmbValue Vertex::getTargetValue ( unsigned short  i) const
inline

◆ markDeleted()

void Vertex::markDeleted ( void  )

if this vertex is valid, mark it as deleted

◆ print()

void Vertex::print ( unsigned short  spc = 0) const

◆ printEdges()

void Vertex::printEdges ( void  ) const

◆ setLabel()

void Vertex::setLabel ( VertexLabel  l)
inline

◆ setSampleOccurenceIt()

void Vertex::setSampleOccurenceIt ( unsigned short  i,
std::list< SampleOccurence >::iterator  it 
)
inline

◆ unmarkDeleted()

void Vertex::unmarkDeleted ( void  )

if this vertex is marked as deleted, undo this

◆ updateShortestEdge()

void Vertex::updateShortestEdge ( void  )

find shortest edge of this vertex and save result to ShortestEdge

Member Data Documentation

◆ Label

VertexLabel Vertex::Label
private

◆ SampleOccurenceIts

std::list<SampleOccurence>::iterator* Vertex::SampleOccurenceIts
private

◆ SamplePositions

SamplePos* Vertex::SamplePositions
private

◆ SampleValues

SampleValue** Vertex::SampleValues
private

◆ SelfDegree

unsigned short Vertex::SelfDegree
private

◆ ShortestEdge

Edge* Vertex::ShortestEdge
private

◆ TargetValues

EmbValue* Vertex::TargetValues
private

◆ valid

bool Vertex::valid
private

The documentation for this class was generated from the following files: