![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Set of ranges. More...
#include <TRanges.h>
Public Types | |
typedef QList< TRange< ValueType > > | RangeList |
typedef std::set< ValueType > | SwitchPoints |
Public Member Functions | |
TRanges () | |
Default constructor initializing this set to be empty. | |
TRanges (const istd::TRange< ValueType > &range) | |
Convert from simple range. | |
void | Reset () |
Set this set to be empty. | |
bool | IsEmpty () const |
Check if this set is empty. | |
const SwitchPoints & | GetSwitchPoints () const |
Get stored switch points. | |
SwitchPoints & | GetSwitchPointsRef () |
Allows access to stored switch points. | |
void | InsertSwitchPoint (ValueType point) |
Insert new switch point. | |
bool | GetBeginState () const |
Get begin state. | |
void | SetBeginState (bool state) |
Set begin state. | |
bool | IsInside (ValueType point) const |
Check if some point belongs to set. | |
bool | IsInside (const TRange< ValueType > &range) const |
Check if some range belongs to set. | |
bool | IsInside (const TRanges< ValueType > &rangesList) const |
Check if some other set belongs to this set. | |
void | GetInverted (TRanges< ValueType > &result, const TRange< ValueType > *clipRangePtr) const |
Get inverted range. | |
void | Invert (const TRange< ValueType > *clipRangePtr) |
Invert this range in place. | |
TRanges< ValueType > | GetUnion (const TRanges< ValueType > &rangesList) const |
Get union of two range list. | |
void | GetUnion (const TRanges< ValueType > &rangesList, TRanges< ValueType > &result) const |
Get union of two range lists. | |
void | Union (const TRanges< ValueType > &rangesList) |
Calculate union of this range list and the other one. | |
void | Union (const TRange< ValueType > &range, bool isInverted=false) |
Calculate union of this range list and some range. | |
TRanges< ValueType > | GetIntersection (const TRanges< ValueType > &rangesList) const |
Get intersection of two range list. | |
void | GetIntersection (const TRanges< ValueType > &rangesList, TRanges< ValueType > &result) const |
Get intersection of two range lists. | |
void | Intersection (const TRanges< ValueType > &rangesList) |
Calculate intersection of this range list and the other one. | |
void | Intersection (const TRange< ValueType > &range, bool isInverted=false) |
Calculate intersection of this range list and some range. | |
void | Erode (ValueType leftValue, ValueType rightValue) |
Calculate erosion of this range list. | |
void | Dilate (ValueType leftValue, ValueType rightValue) |
Calculate dilatation of this range list. | |
void | RemoveGaps (ValueType value, bool gapState=false) |
Remove gaps with some length. | |
void | ShiftRanges (ValueType offset) |
ShiftRanges all points in this set using specified offset. | |
void | GetAsList (const TRange< ValueType > &range, RangeList &result) const |
Get this set as list of istd::TRange objects. | |
bool | operator== (const TRanges< ValueType > &ranges) const |
bool | operator!= (const TRanges< ValueType > &ranges) const |
Set of ranges.
This set is defined by initial begin state (state of minuns infinity) and list of state switch points. Example given, set [10, 20) is represented as begin state false
, and two switch points: at 10 and 20.
QList< TRange<ValueType> > istd::TRanges< ValueType >::RangeList |
std::set<ValueType> istd::TRanges< ValueType >::SwitchPoints |
istd::TRanges< ValueType >::TRanges | ( | ) |
|
explicit |
Convert from simple range.
Definition at line 207 of file TRanges.h.
References istd::TRange< ValueType >::IsEmpty().
void istd::TRanges< ValueType >::Dilate | ( | ValueType | leftValue, |
ValueType | rightValue ) |
Calculate dilatation of this range list.
Dilatation prolongs the ends of each range with some value for left and right side. Result is stored in this object.
Definition at line 776 of file TRanges.h.
Referenced by istd::TRanges< ValueType >::Erode().
void istd::TRanges< ValueType >::Erode | ( | ValueType | leftValue, |
ValueType | rightValue ) |
Calculate erosion of this range list.
Erosion shortens the ends of each range with some value. Result is stored in this object.
Definition at line 769 of file TRanges.h.
References istd::TRanges< ValueType >::Dilate().
void istd::TRanges< ValueType >::GetAsList | ( | const TRange< ValueType > & | range, |
RangeList & | result ) const |
Get this set as list of istd::TRange
objects.
range | enclosing range. Must be provided becouse this set can represent values inclusive infinities. |
result | result object. |
Definition at line 879 of file TRanges.h.
References istd::TRange< ValueType >::GetMaxValue(), and istd::TRange< ValueType >::GetMinValue().
bool istd::TRanges< ValueType >::GetBeginState | ( | ) | const |
Get begin state.
It is true, if values before first switch point belongs to set or not.
Definition at line 257 of file TRanges.h.
Referenced by istd::qHash().
TRanges< ValueType > istd::TRanges< ValueType >::GetIntersection | ( | const TRanges< ValueType > & | rangesList | ) | const |
void istd::TRanges< ValueType >::GetIntersection | ( | const TRanges< ValueType > & | rangesList, |
TRanges< ValueType > & | result ) const |
void istd::TRanges< ValueType >::GetInverted | ( | TRanges< ValueType > & | result, |
const TRange< ValueType > * | clipRangePtr ) const |
Get inverted range.
Definition at line 358 of file TRanges.h.
References istd::TRange< ValueType >::GetMaxValue(), istd::TRange< ValueType >::GetMinValue(), and istd::TRanges< ValueType >::Reset().
const TRanges< ValueType >::SwitchPoints & istd::TRanges< ValueType >::GetSwitchPoints | ( | ) | const |
TRanges< ValueType >::SwitchPoints & istd::TRanges< ValueType >::GetSwitchPointsRef | ( | ) |
TRanges< ValueType > istd::TRanges< ValueType >::GetUnion | ( | const TRanges< ValueType > & | rangesList | ) | const |
void istd::TRanges< ValueType >::GetUnion | ( | const TRanges< ValueType > & | rangesList, |
TRanges< ValueType > & | result ) const |
void istd::TRanges< ValueType >::InsertSwitchPoint | ( | ValueType | point | ) |
Insert new switch point.
It add the new switch point or remove it, if such switch point exist. Considering interpretation of switch points, it inverts the sets in range (point, infinity).
Definition at line 247 of file TRanges.h.
Referenced by iimg::CScanlineMask::CalculateMaskFromBitmap().
void istd::TRanges< ValueType >::Intersection | ( | const TRange< ValueType > & | range, |
bool | isInverted = false ) |
void istd::TRanges< ValueType >::Intersection | ( | const TRanges< ValueType > & | rangesList | ) |
void istd::TRanges< ValueType >::Invert | ( | const TRange< ValueType > * | clipRangePtr | ) |
Invert this range in place.
Definition at line 401 of file TRanges.h.
References istd::TRange< ValueType >::GetMaxValue(), and istd::TRange< ValueType >::GetMinValue().
bool istd::TRanges< ValueType >::IsEmpty | ( | ) | const |
Check if this set is empty.
This set is empty if no point belongs him.
Definition at line 226 of file TRanges.h.
Referenced by iimg::CScanlineMask::CalculateMaskFromBitmap().
bool istd::TRanges< ValueType >::IsInside | ( | const TRange< ValueType > & | range | ) | const |
Check if some range belongs to set.
Definition at line 289 of file TRanges.h.
References istd::TRange< ValueType >::GetMaxValue(), and istd::TRange< ValueType >::GetMinValue().
bool istd::TRanges< ValueType >::IsInside | ( | const TRanges< ValueType > & | rangesList | ) | const |
bool istd::TRanges< ValueType >::IsInside | ( | ValueType | point | ) | const |
bool istd::TRanges< ValueType >::operator!= | ( | const TRanges< ValueType > & | ranges | ) | const |
bool istd::TRanges< ValueType >::operator== | ( | const TRanges< ValueType > & | ranges | ) | const |
void istd::TRanges< ValueType >::RemoveGaps | ( | ValueType | value, |
bool | gapState = false ) |
void istd::TRanges< ValueType >::Reset | ( | ) |
Set this set to be empty.
Definition at line 218 of file TRanges.h.
Referenced by istd::TRanges< ValueType >::GetInverted().
void istd::TRanges< ValueType >::SetBeginState | ( | bool | state | ) |
void istd::TRanges< ValueType >::ShiftRanges | ( | ValueType | offset | ) |
void istd::TRanges< ValueType >::Union | ( | const TRange< ValueType > & | range, |
bool | isInverted = false ) |
Calculate union of this range list and some range.
Result is stored in this object.
Definition at line 575 of file TRanges.h.
References istd::TRange< ValueType >::GetMaxValue(), istd::TRange< ValueType >::GetMinValue(), and istd::TRange< ValueType >::IsEmpty().
void istd::TRanges< ValueType >::Union | ( | const TRanges< ValueType > & | rangesList | ) |
© Witold Gantzke and Kirill Lepskiy