Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SketchData< T > Class Template ReferenceHolds the pixels for an individual sketch. More...
Inheritance diagram for SketchData< T >:
Detailed Descriptiontemplate<class T>
|
Public Member Functions | |
SketchData (SketchSpace *_space) | |
Constructor. Don't call this. SketchData objects should only be created and managed by their SketchSpace. | |
~SketchData () | |
virtual SketchType_t | getType () const |
The type of this sketch. | |
T * | getRawPixels () |
Address of the memory area containing the actual pixel data. | |
const T * | getRawPixels () const |
Address of the memory area containing the actual pixel data. | |
bool | empty () const |
Returns true if all pixels are zero. | |
virtual size_t | savePixels (char buf[], size_t avail) const |
handle copying pixels to buffer | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
SketchType_t | getType () const |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class. | |
template<> | |
size_t | savePixels (char buf[], size_t avail) const |
handle copying pixels to buffer | |
T & | at (size_t x) |
Indexed access, with bounds checking. | |
T & | at (size_t x, size_t y) |
Subscripted (x,y) access, with bounds checking. | |
T & | operator[] (size_t idx) |
Indexed access, with bounds checking. | |
const T & | operator[] (size_t idx) const |
Indexed access, with bounds checking. | |
T & | operator() (size_t x, size_t y) |
Indexed access, with bounds checking. | |
const T & | operator() (size_t x, size_t y) const |
Indexed access, with bounds checking. | |
Sum/Max/Min | |
T | sum () const |
Sum of pixels. | |
T | max () const |
Max of pixel values. | |
int | findMax () const |
Index of first maximum-value pixel. | |
T | min () const |
Min of pixel values. | |
int | findMin () const |
Index of first minimum-value pixel. | |
T | minPlus () const |
Min of non-zero pixel values. | |
int | findMinPlus () const |
Index of first minimum non-zero pixel, or -1 if none. | |
int | findTrue () const |
Index of first non-zero pixel, or -1 if none. | |
T | mode () const |
Mode (most common) pixel value. | |
T | modePlus () const |
Mode (most common) non-zero pixel value. | |
Private Member Functions | |
SketchData (const SketchData &other) | |
never call this | |
Private Attributes | |
std::valarray< T > | pixels |
the valarray which actually stores the image | |
Friends | |
class | Sketch< T > |
class | SketchPool< T > |
SketchData | ( | SketchSpace * | _space | ) |
Constructor. Don't call this. SketchData objects should only be created and managed by their SketchSpace.
Definition at line 113 of file SketchData.h.
~SketchData | ( | ) |
Definition at line 121 of file SketchData.h.
SketchData | ( | const SketchData< T > & | other | ) | [private] |
never call this
T & at | ( | size_t | x, | |
size_t | y | |||
) |
Subscripted (x,y) access, with bounds checking.
Definition at line 149 of file SketchData.h.
T & at | ( | size_t | x | ) |
Indexed access, with bounds checking.
Definition at line 141 of file SketchData.h.
bool empty | ( | ) | const |
Returns true if all pixels are zero.
Definition at line 157 of file SketchData.h.
int findMax | ( | ) | const |
Index of first maximum-value pixel.
Definition at line 175 of file SketchData.h.
int findMin | ( | ) | const |
Index of first minimum-value pixel.
Definition at line 193 of file SketchData.h.
int findMinPlus | ( | ) | const |
Index of first minimum non-zero pixel, or -1 if none.
Definition at line 225 of file SketchData.h.
int findTrue | ( | ) | const |
Index of first non-zero pixel, or -1 if none.
Definition at line 241 of file SketchData.h.
const T* getRawPixels | ( | ) | const |
Address of the memory area containing the actual pixel data.
Definition at line 51 of file SketchData.h.
T* getRawPixels | ( | ) |
Address of the memory area containing the actual pixel data.
Definition at line 48 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 138 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 136 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 134 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 132 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 130 of file SketchData.h.
SketchType_t getType | ( | ) | const [virtual] |
Return the type of data stored in this sketch. Virtual function overridden by each SketchData<T> class.
Implements SketchDataRoot.
Definition at line 128 of file SketchData.h.
virtual SketchType_t getType | ( | ) | const [virtual] |
T max | ( | ) | const |
Max of pixel values.
Definition at line 170 of file SketchData.h.
Referenced by SketchData< T >::findMinPlus().
T min | ( | ) | const |
Min of pixel values.
Definition at line 188 of file SketchData.h.
T minPlus | ( | ) | const |
Min of non-zero pixel values.
Definition at line 206 of file SketchData.h.
T mode | ( | ) | const |
Mode (most common) pixel value.
Definition at line 250 of file SketchData.h.
T modePlus | ( | ) | const |
Mode (most common) non-zero pixel value.
Definition at line 267 of file SketchData.h.
const T& operator() | ( | size_t | x, | |
size_t | y | |||
) | const |
Indexed access, with bounds checking.
Definition at line 64 of file SketchData.h.
T& operator() | ( | size_t | x, | |
size_t | y | |||
) |
Indexed access, with bounds checking.
Definition at line 63 of file SketchData.h.
const T& operator[] | ( | size_t | idx | ) | const |
Indexed access, with bounds checking.
Definition at line 61 of file SketchData.h.
T& operator[] | ( | size_t | idx | ) |
Indexed access, with bounds checking.
Definition at line 60 of file SketchData.h.
size_t savePixels | ( | char | buf[], | |
size_t | avail | |||
) | const [virtual] |
handle copying pixels to buffer
Implements SketchDataRoot.
Definition at line 296 of file SketchData.h.
size_t savePixels | ( | char | buf[], | |
size_t | avail | |||
) | const [virtual] |
handle copying pixels to buffer
Implements SketchDataRoot.
Definition at line 287 of file SketchData.h.
T sum | ( | ) | const |
Sum of pixels.
Definition at line 165 of file SketchData.h.
Definition at line 36 of file SketchData.h.
friend class SketchPool< T > [friend] |
Definition at line 37 of file SketchData.h.
the valarray which actually stores the image
Definition at line 34 of file SketchData.h.
Referenced by SketchData< T >::at(), SketchData< T >::empty(), SketchData< T >::findMax(), SketchData< T >::findMin(), SketchData< T >::findMinPlus(), SketchData< T >::findTrue(), SketchData< skindex >::getRawPixels(), SketchData< T >::max(), SketchData< T >::min(), SketchData< T >::minPlus(), SketchData< T >::mode(), SketchData< T >::modePlus(), SketchData< skindex >::operator()(), SketchData< skindex >::operator[](), SketchData< T >::savePixels(), and SketchData< T >::sum().
DualCoding 5.1CVS |
Generated Mon May 9 04:56:31 2016 by Doxygen 1.6.3 |