last update 20 Sep 2009 |
#include <cvrViewer2DPainter.h>
Public Member Functions | |
cacheManager (histogramEqualization *&histoEq) | |
bool | update (const void *data, const eChannelType chnlType, const matrix< float > &chnl, const eMappingType mapping) |
bool | update (const ubyte *data, const eChannelType chnlType, const matrix< ubyte > &chnl, const eMappingType mapping) |
bool | update (const int32 *data, const eChannelType chnlType, const matrix< int32 > &chnl, const eMappingType mapping) |
bool | updateSignature (const matrix< ubyte > &data) |
bool | updateSignature (const matrix< int32 > &data) |
bool | checkCacheMiss (const void *data, const eChannelType chnlType, const ipoint &size, const eMappingType mapping) const |
bool | checkCacheMiss (const ubyte *data, const ipoint &size, const int cacheIdx) const |
bool | checkCacheMiss (const int *data, const ipoint &size, const int cacheIdx) const |
void | invalidate () |
Public Attributes | |
cacheBlock | blocks_ [NumCacheBlocks] |
std::pair< ivector, bool > | clut_ [ClutSize] |
bool | tooManyLabels_ |
Protected Attributes | |
histogramEqualization *& | histoEq_ |
Signature data | |
const void * | dataPtr_ |
ipoint | dataSize_ |
cvr::viewer2DPainter::viewer2DPainter::cacheManager::cacheManager | ( | histogramEqualization *& | histoEq | ) |
Constructor.
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::checkCacheMiss | ( | const int * | data, | |
const ipoint & | size, | |||
const int | cacheIdx | |||
) | const |
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::checkCacheMiss | ( | const void * | data, | |
const eChannelType | chnlType, | |||
const ipoint & | size, | |||
const eMappingType | mapping | |||
) | const |
Verify if there will be a cache miss with the given data.
Mapping is used to determine if the statistics have to be recomputed or are not necessary at all.
void cvr::viewer2DPainter::viewer2DPainter::cacheManager::invalidate | ( | ) |
Invalidate the cache.
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::update | ( | const int32 * | data, | |
const eChannelType | chnlType, | |||
const matrix< int32 > & | chnl, | |||
const eMappingType | mapping | |||
) |
Update the internal cache blocks if necessary.
data | pointer to the data block from which chnl32 was extracted. | |
chnlType | type of color channel being analyzed (red, hue, etc). | |
chnl | the channel for which the statistics are required. It has to be exactly of the same size than the original data, or the statistics will be wrong! | |
mapping | the transformation desired is used to detect which statistics have to be computed. |
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::update | ( | const ubyte * | data, | |
const eChannelType | chnlType, | |||
const matrix< ubyte > & | chnl, | |||
const eMappingType | mapping | |||
) |
Update the internal cache blocks if necessary.
data | pointer to the data block from which chnl was extracted. | |
chnlType | type of color channel being analyzed (red, hue, etc). | |
chnl | the channel for which the statistics are required. It has to be exactly of the same size than the original data, or the statistics will be wrong! | |
mapping | the transformation desired is used to detect which statistics have to be computed. |
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::update | ( | const void * | data, | |
const eChannelType | chnlType, | |||
const matrix< float > & | chnl, | |||
const eMappingType | mapping | |||
) |
Update the internal cache blocks if necessary.
data | pointer to the data block from which chnl was extracted. | |
chnlType | type of color channel being analyzed (red, hue, etc). | |
chnl | the channel for which the statistics are required. It has to be exactly of the same size than the original data, or the statistics will be wrong! | |
mapping | the transformation desired is used to detect which statistics have to be computed. |
cacheBlock cvr::viewer2DPainter::viewer2DPainter::cacheManager::blocks_[NumCacheBlocks] |
All cached blocks.
std::pair<ivector,bool> cvr::viewer2DPainter::viewer2DPainter::cacheManager::clut_[ClutSize] |
const void* cvr::viewer2DPainter::viewer2DPainter::cacheManager::dataPtr_ [protected] |
ipoint cvr::viewer2DPainter::viewer2DPainter::cacheManager::dataSize_ [protected] |
Size of the matrix.
Even if dataPtr_ is almost perfect for the task, a second check cannot hurt!
histogramEqualization*& cvr::viewer2DPainter::viewer2DPainter::cacheManager::histoEq_ [protected] |
histogram equalizer
bool cvr::viewer2DPainter::viewer2DPainter::cacheManager::tooManyLabels_ |
Flag that indicates if a labeled channel32 has too many labels.