Memory for typed array similarity computation. More...
#include <cmtkTypedArraySimilarityMemory.h>
Public Member Functions | |
TypedArraySimilarityMemory (const bool repeatCheck=true) | |
Initialize a similarity instance with memory. | |
const Types::DataItemRange | GetRangeX (const TypedArray *array, const size_t numBins) |
Get range of X distribution. | |
const Types::DataItemRange | GetRangeY (const TypedArray *array, const size_t numBins) |
Get range of Y distribution. | |
void | SetMinNumBins (const size_t minNumBins) |
Set minimum number of histogram bins. | |
void | SetMaxNumBins (const size_t maxNumBins) |
Set maximum number of histogram bins. | |
JointHistogram< unsigned int > ::SmartPtr | CreateHistogram (const TypedArray *array0, const TypedArray *array1) |
Create histogram based on memorized settings. | |
Private Attributes | |
bool | RepeatCheck |
Repeat range check with each call to GetRangeX and GetRangeY. | |
bool | ValidX |
Flag whether memory for X distribution is already initialized. | |
Types::DataItemRange | RangeX |
Remembered range of X values. | |
size_t | NumberBinsX |
Remembered number of bins for the X distribution. | |
bool | ValidY |
Flag whether memory for X distribution is already initialized. | |
Types::DataItemRange | RangeY |
Remembered range of Y values. | |
size_t | NumberBinsY |
Remembered number of bins for the Y distribution. | |
size_t | MinNumBins |
Minimum number of histogram bins. | |
size_t | MaxNumBins |
Maximum number of histogram bins. | |
Friends | |
class | TypedArraySimilarity |
Allow similarity computation class access. |
Memory for typed array similarity computation.
This class provides for optional persistent memory between similarity computations. This ensures, for example, identical value ranges in histogram-based similarity measures.
Definition at line 52 of file cmtkTypedArraySimilarityMemory.h.
cmtk::TypedArraySimilarityMemory::TypedArraySimilarityMemory | ( | const bool | repeatCheck = true ) |
[inline] |
Initialize a similarity instance with memory.
By instantiating a class object, the otherwise static member functions can be given a memory that coordinates their behaviour between calls. For example, we can make sure that all evaluations of Mutual Information use the same histogram resolution.
repeatCheck | If this flag is set, the object will repeat the range check for every call to GetRangeX or GetRangeY. If the current data range exceeds the one stored in this object, the latter will be adapted accordingly. |
Definition at line 65 of file cmtkTypedArraySimilarityMemory.h.
void cmtk::TypedArraySimilarityMemory::SetMaxNumBins | ( | const size_t | maxNumBins ) | [inline] |
Set maximum number of histogram bins.
Definition at line 87 of file cmtkTypedArraySimilarityMemory.h.
void cmtk::TypedArraySimilarityMemory::SetMinNumBins | ( | const size_t | minNumBins ) | [inline] |
Set minimum number of histogram bins.
Definition at line 84 of file cmtkTypedArraySimilarityMemory.h.
friend class TypedArraySimilarity [friend] |
Allow similarity computation class access.
Definition at line 121 of file cmtkTypedArraySimilarityMemory.h.
size_t cmtk::TypedArraySimilarityMemory::MaxNumBins [private] |
Maximum number of histogram bins.
Definition at line 118 of file cmtkTypedArraySimilarityMemory.h.
size_t cmtk::TypedArraySimilarityMemory::MinNumBins [private] |
Minimum number of histogram bins.
Definition at line 115 of file cmtkTypedArraySimilarityMemory.h.
size_t cmtk::TypedArraySimilarityMemory::NumberBinsX [private] |
Remembered number of bins for the X distribution.
Definition at line 103 of file cmtkTypedArraySimilarityMemory.h.
size_t cmtk::TypedArraySimilarityMemory::NumberBinsY [private] |
Remembered number of bins for the Y distribution.
Definition at line 112 of file cmtkTypedArraySimilarityMemory.h.
Remembered range of X values.
Definition at line 100 of file cmtkTypedArraySimilarityMemory.h.
Remembered range of Y values.
Definition at line 109 of file cmtkTypedArraySimilarityMemory.h.
bool cmtk::TypedArraySimilarityMemory::RepeatCheck [private] |
Repeat range check with each call to GetRangeX and GetRangeY.
Definition at line 94 of file cmtkTypedArraySimilarityMemory.h.
bool cmtk::TypedArraySimilarityMemory::ValidX [private] |
Flag whether memory for X distribution is already initialized.
Definition at line 97 of file cmtkTypedArraySimilarityMemory.h.
bool cmtk::TypedArraySimilarityMemory::ValidY [private] |
Flag whether memory for X distribution is already initialized.
Definition at line 106 of file cmtkTypedArraySimilarityMemory.h.