#include <HxNgbPercentile2d.h>
Public Types | |
| typedef HxTagLoop | IteratorCategory |
| Loop version. More... | |
| typedef HxTag1Phase | PhaseCategory |
| 1 phase. More... | |
Public Methods | |
| HxNgbPercentile2d (HxTagList &tags) | |
| Constructor. More... | |
| ~HxNgbPercentile2d () | |
| Destructor. More... | |
| HxSizes | size () |
| Size of the neighbourhood. More... | |
| void | init (int, int, ArithT) |
| Initialization. More... | |
| void | next (int x, int y, ArithT value) |
| Processing one pixel. More... | |
| ArithT | result () const |
| Produce the result value. More... | |
Static Public Methods | |
| HxString | className () |
| The name : "percentile". More... | |
|
|||||
|
Loop version.
|
|
|||||
|
1 phase.
|
|
||||||||||
|
Constructor. Taglist should contain: int "size", double "percentile"
|
|
|||||||||
|
Destructor.
00032 {
00033 if (_values)
00034 delete [] _values;
00035 }
|
|
|||||||||
|
Size of the neighbourhood.
00097 {
00098 return HxSizes(_size, _size, 1);
00099 }
|
|
||||||||||||||||||||
|
Initialization.
00083 {
00084 _i = 0;
00085 }
|
|
||||||||||||||||||||
|
Processing one pixel.
00090 {
00091 _values[_i++] = value;
00092 }
|
|
|||||||||
|
Produce the result value.
00104 {
00105 std::sort(&_values[0], &_values[_size*_size]);
00106 return _values[_pctIdx];
00107 }
|
|
|||||||||
|
The name : "percentile".
00075 {
00076 static HxString s("percentile");
00077 return s;
00078 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001