#include <vlhistogram.h>
Public Member Functions | |
| vlHistogram (const vlVolume *vol, bool compute=false) | |
| Default constructor - Takes a pointer to a vlVolume whose histogram is to be computed. | |
| virtual | ~vlHistogram () |
| Default destructor. | |
| bool | update (bool force=true) |
| Update the histogram. | |
| uint16 | width () const |
| Returns the width of the histogram. | |
| uint32 | maxHeight () const |
| Returns the maximum height of the histogram. | |
| uint32 | minHeight () const |
| Returns the minimum height of the histogram. | |
| bool | normalize (bool force=false) |
| Normalize the histogram. | |
| bool | CreateLogHistogram (bool force=false) |
| Create log of the histogram. | |
| void | SetLogPower (uint16 power=7) |
| Set teh power for indicating peak heights of log histogram. | |
| const std::vector< float > * | getNormHistArray () |
| Returns pointer to the normalized version of histogram. | |
| const std::vector< uint32 > * | getHistArray () |
| Returns pointer to the histogram array. | |
| const std::vector< float > * | getLogHistArray () |
| Returns pointer to the log version of histogram. | |
| template<> bool | recomputeT (uint8 &dummy) |
Protected Member Functions | |
| bool | recompute () |
| Recompute the histogram. | |
| template<typename DataType> bool | recomputeT (DataType &dummy) |
| The real function that recomputes the histogram. | |
Protected Attributes | |
| const vlVolume * | m_vol |
| Volume on which the histogram is connected. | |
| std::vector< uint32 > | m_histogram |
| Stores the histogram internally. | |
| uint32 | m_maxHeight |
| Max and min height of histogram. | |
| uint32 | m_minHeight |
| Max and min height of histogram. | |
| std::vector< float > | m_normalizedHist |
| Normalized version of histogram. | |
| std::vector< float > | m_logHist |
| Log version of histogram. | |
| bool | m_dirty |
| Dirty bit - if set to true, update() is needed. | |
| uint16 | m_power |
| Base bit for log version of histogram. | |
| bool | m_dirtyLog |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, vlHistogram &hist) |
Definition at line 39 of file vlhistogram.h.
|
||||||||||||
|
Definition at line 32 of file vlhistogram.cpp. References recompute(). |
|
|
Definition at line 43 of file vlhistogram.cpp. |
|
|
Definition at line 133 of file vlhistogram.cpp. References m_dirtyLog, m_histogram, m_logHist, m_normalizedHist, m_power, and normalize(). Referenced by getLogHistArray(). |
|
|
Definition at line 191 of file vlhistogram.cpp. References m_histogram. |
|
|
Definition at line 197 of file vlhistogram.cpp. References CreateLogHistogram(), and m_logHist. |
|
|
Definition at line 183 of file vlhistogram.cpp. References m_normalizedHist, and normalize(). |
|
|
Definition at line 69 of file vlhistogram.cpp. References m_maxHeight, and uint32. |
|
|
Definition at line 76 of file vlhistogram.cpp. References m_minHeight, and uint32. |
|
|
Definition at line 83 of file vlhistogram.cpp. References m_dirty, m_histogram, m_maxHeight, m_normalizedHist, and max. Referenced by CreateLogHistogram(), and getNormHistArray(). |
|
|
Definition at line 242 of file vlhistogram.cpp. References callFunctionOnDataTypeNoArgs, vlVolume::dataType(), m_vol, and recomputeT(). Referenced by update(), and vlHistogram(). |
|
||||||||||
|
|
|
||||||||||
|
Definition at line 265 of file vlhistogram.cpp. Referenced by recompute(). |
|
|
Definition at line 123 of file vlhistogram.cpp. References m_dirtyLog, and m_power. |
|
|
If force is false, the histogram will be updated only if the volume's dirty bit is set. By default, force is set to true meaning the histogram will be recomputed every time update is called. NOTE : volume's dirty bit setting is not set properly as of writing this. This note will be removed once the dirty bit setting work is done. Till then, let force be true.
Definition at line 49 of file vlhistogram.cpp. References vlVolume::isDirty(), m_vol, and recompute(). |
|
|
Definition at line 63 of file vlhistogram.cpp. References m_histogram, and uint16. |
|
||||||||||||
|
Definition at line 250 of file vlhistogram.cpp. |
|
|
Definition at line 111 of file vlhistogram.h. Referenced by normalize(). |
|
|
Definition at line 116 of file vlhistogram.h. Referenced by CreateLogHistogram(), and SetLogPower(). |
|
|
Definition at line 99 of file vlhistogram.h. Referenced by CreateLogHistogram(), getHistArray(), normalize(), operator<<(), and width(). |
|
|
Definition at line 108 of file vlhistogram.h. Referenced by CreateLogHistogram(), and getLogHistArray(). |
|
|
Definition at line 102 of file vlhistogram.h. Referenced by maxHeight(), and normalize(). |
|
|
Definition at line 102 of file vlhistogram.h. Referenced by minHeight(). |
|
|
Definition at line 105 of file vlhistogram.h. Referenced by CreateLogHistogram(), getNormHistArray(), and normalize(). |
|
|
Definition at line 114 of file vlhistogram.h. Referenced by CreateLogHistogram(), and SetLogPower(). |
|
|
Definition at line 96 of file vlhistogram.h. Referenced by recompute(), and update(). |
1.3.3