
#include <Image/Range.H>
Collaboration diagram for Range< T >:

This class is primarily intended to work with algorithms that manipulate the dynamic range of Image<T>'s. For example, it can help to specify how an image should have its current dynamic range remapped to a new range (see remapRange() in Image_MathOps.H). In addition, the Range<T> class provides an operator() that allows it to be used as a functor in generic algorithms for accumulating the min/max over a sequence of elements (as in rangeOf() in Image_MathOps.H).
Definition at line 53 of file Range.H.
Public Member Functions | |
| Range () | |
| Default constructor. | |
| Range (const T &mi, const T &ma) | |
| Construct with given min and max values. | |
| const T & | min () const |
| Get the current min value. | |
| const T & | max () const |
| Get the current max value. | |
| T | range () const |
| Get the range (i.e. the difference of max minus min). | |
| void | setMin (const T &mi) |
| Set the range's min value. | |
| void | setMax (const T &ma) |
| Set the range's max value. | |
| void | mergeMin (const T &v) |
| Update our min value if val is less than the current max. | |
| void | mergeMax (const T &val) |
| Update our max value if val is greater than the current max. | |
| void | merge (const T &val) |
| Update our min or max value if val falls outside of the current range. | |
| void | operator() (const T &v) |
| This operator() allows straightforward use in generic algorithms. | |
| void | merge (const Range< T > &other) |
| Merge other's min and max values into ours. | |
|
|||||||||
|
Default constructor. We initialize the object's min element with type T's max value, and we initialize the object's max element with type T's min value. This seeming paradoxical situation is in fact "The Right Thing" if we want to accumulate the min/max over a range of elements. The starting condition of the Range object should make the weakest possible assumption about the values that will be observed; and this weakest assumption is precisely to start with the min being as large as possible, and the max being as small as possible. |
|
||||||||||||||||
|
Construct with given min and max values.
|
|
|||||||||
|
Get the current max value.
Definition at line 77 of file Range.H. Referenced by buildPyrRetinexLog(), buildTitle(), FfmpegEncoder::close(), doOneNormalize(), StructurePlot::drawStructure(), FourierFeatureExtractor::illustrate(), Image_xx_rangeOf_xx_1(), Image_xx_rangeOf_xx_2(), inspect(), main(), ClassicSearchItemFactory::make(), makeSumoDisplay(), Range< T >::merge(), normalizeFloat(), StatsOutputSeries::Impl::printStatsRGB(), StatsOutputSeries::Impl::printStatsSummary(), showStats(), stainImg(), and FfmpegEncoder::writeRawFrame(). |
|
||||||||||
|
Merge other's min and max values into ours.
Definition at line 156 of file Range.H. References Range< T >::max(), Range< T >::mergeMax(), Range< T >::mergeMin(), and Range< T >::min(). |
|
||||||||||
|
Update our min or max value if val falls outside of the current range.
Definition at line 141 of file Range.H. References Range< T >::mergeMax(), and Range< T >::mergeMin(). Referenced by FfmpegEncoder::close(), StructurePlot::drawStructure(), getRange(), LogPolarTransform::LogPolarTransform(), main(), makeSumoDisplay(), Range< T >::operator()(), StatsOutputSeries::Impl::printStatsRGB(), rangeOf(), showStats(), and FfmpegEncoder::writeRawFrame(). |
|
||||||||||
|
Update our max value if val is greater than the current max.
Definition at line 137 of file Range.H. Referenced by Range< T >::merge(). |
|
||||||||||
|
Update our min value if val is less than the current max.
Definition at line 133 of file Range.H. Referenced by Range< T >::merge(). |
|
|||||||||
|
Get the current min value.
Definition at line 74 of file Range.H. Referenced by buildTitle(), FfmpegEncoder::close(), StructurePlot::drawStructure(), FourierFeatureExtractor::illustrate(), Image_xx_rangeOf_xx_1(), Image_xx_rangeOf_xx_2(), inspect(), LogPolarTransform::LogPolarTransform(), main(), ClassicSearchItemFactory::make(), makeSumoDisplay(), Range< T >::merge(), normalizeFloat(), StatsOutputSeries::Impl::printStatsRGB(), StatsOutputSeries::Impl::printStatsSummary(), remapRange(), showStats(), stainImg(), and FfmpegEncoder::writeRawFrame(). |
|
||||||||||
|
This operator() allows straightforward use in generic algorithms. In particular, this is useful for accumulating the min/max over a range of elements. For example, rangeOf() could be implemented like this:
We construct a default Range<T> object, which is copied and passed to for_each(), which in turn calls operator() on that range object for each element in the iterator sequence that is visited. Definition at line 149 of file Range.H. References Range< T >::merge(). |
|
|||||||||
|
Get the range (i.e. the difference of max minus min).
Definition at line 80 of file Range.H. Referenced by LogPolarTransform::LogPolarTransform(), and remapRange(). |
|
||||||||||
|
Set the range's max value.
|
|
||||||||||
|
Set the range's min value.
|
1.4.4