fw4spl
fwDataTools::ImageDiff Class Reference

Class memorizing pixel changes in an image. More...

#include <ImageDiff.hpp>

Classes

struct  ElementType
 

Public Member Functions

FWDATATOOLS_API ImageDiff (const size_t imageElementSize=0, const size_t reservedElements=0)
 Constructor.
 
FWDATATOOLS_API ~ImageDiff ()
 Destructor.
 
FWDATATOOLS_API ImageDiff (const ImageDiff &other)
 Copy constructor.
 
FWDATATOOLS_API ImageDiff (ImageDiff &&other)
 Move constructor.
 
FWDATATOOLS_API ImageDiffoperator= (const ImageDiff &other)
 Copy assignement.
 
FWDATATOOLS_API ImageDiffoperator= (ImageDiff &&other)
 Move assignement.
 
FWDATATOOLS_API void addDiff (const ImageDiff &diff)
 Concatenate two diffs.
 
FWDATATOOLS_API void addDiff (const ::fwData::Image::IndexType index, const ::fwData::Image::BufferType *oldValue, const ::fwData::Image::BufferType *newValue)
 Append a new pixel diff.
 
FWDATATOOLS_API void applyDiff (const ::fwData::Image::sptr &img) const
 Write the new values in the image.
 
FWDATATOOLS_API void revertDiff (const ::fwData::Image::sptr &img) const
 Write the old value back in the image.
 
FWDATATOOLS_API size_t getSize () const
 Return the amount of memory actually used by the elements.
 
FWDATATOOLS_API size_t getNumberOfElements () const
 Returns the number of stored pixel diffs.
 
FWDATATOOLS_API void clear ()
 Set the number of elements to 0.
 
FWDATATOOLS_API void shrink ()
 Reallocate the buffer to fit the actual size of the container.
 
FWDATATOOLS_API ElementType getElement (size_t index) const
 Returns the element at the given index.
 
inline::fwData::Image::IndexType getElementDiffIndex (size_t eltIndex) const
 Returns the image index from the element at the given index.
 

Detailed Description

Class memorizing pixel changes in an image.

Definition at line 21 of file ImageDiff.hpp.


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