36#ifndef VIGRA_PIXELNEIGHBORHOOD_HXX
37#define VIGRA_PIXELNEIGHBORHOOD_HXX
132namespace FourNeighborhood
191 InitialDirection =
East,
192 OppositeDirPrefix = 1,
193 OppositeOffset =
West
199 static unsigned int b[];
200 static unsigned int c[];
206 static unsigned int directionBit(
Direction d)
208 return StaticData<0>::b[d];
215 return StaticData<0>::c[b];
223 return StaticData<0>::bd[b][index];
231 return StaticData<0>::d[
code];
245 return StaticData<0>::rd[fromCode][toCode];
287 return (
diff.
y == 0) ?
293 return (
diff.
y == 0) ?
337unsigned int NeighborCode::StaticData<DUMMY>::b[] = {1 <<
East,
343unsigned int NeighborCode::StaticData<DUMMY>::c[] = { 4, 3, 3, 0, 3, 2, 2, 0, 3, 2, 2};
346Direction NeighborCode::StaticData<DUMMY>::bd[11][4] = {
361Diff2D NeighborCode::StaticData<DUMMY>::d[] = {
362 Diff2D(1, 0), Diff2D(0, -1), Diff2D(-1, 0), Diff2D(0, 1)
366Diff2D NeighborCode::StaticData<DUMMY>::rd[][4] = {
367 { Diff2D(0, 0), Diff2D(-1, -1), Diff2D(-2, 0), Diff2D(-1, 1) },
368 { Diff2D(1, 1), Diff2D(0, 0), Diff2D(-1, 1), Diff2D(0, 2) },
369 { Diff2D(2, 0), Diff2D(1, -1), Diff2D(0, 0), Diff2D(1, 1) },
370 { Diff2D(1, -1), Diff2D(0, -2), Diff2D(-1, -1), Diff2D(0, 0) }
388namespace EightNeighborhood
450 InitialDirection =
East,
451 OppositeDirPrefix = 1,
452 OppositeOffset =
West
458 static unsigned int b[];
459 static unsigned int c[];
465 static unsigned int directionBit(
Direction d)
467 return StaticData<0>::b[d];
474 return StaticData<0>::c[b];
482 return StaticData<0>::bd[b][index];
490 return StaticData<0>::d[
code];
504 return StaticData<0>::rd[fromCode][toCode];
629unsigned int NeighborCode::StaticData<DUMMY>::b[] = {
640unsigned int NeighborCode::StaticData<DUMMY>::c[] = { 8, 5, 5, 0, 5, 3, 3, 0, 5, 3, 3};
643Direction NeighborCode::StaticData<DUMMY>::bd[11][8] = {
658Diff2D NeighborCode::StaticData<DUMMY>::d[] = {
659 Diff2D(1, 0), Diff2D(1, -1), Diff2D(0, -1), Diff2D(-1, -1),
660 Diff2D(-1, 0), Diff2D(-1, 1), Diff2D(0, 1), Diff2D(1, 1)
664Diff2D NeighborCode::StaticData<DUMMY>::rd[][8] = {
665 { Diff2D(0, 0), Diff2D(0, -1), Diff2D(-1, -1), Diff2D(-2, -1),
666 Diff2D(-2, 0), Diff2D(-2, 1), Diff2D(-1, 1), Diff2D(0, 1) },
667 { Diff2D(0, 1), Diff2D(0, 0), Diff2D(-1, 0), Diff2D(-2, 0),
668 Diff2D(-2, 1), Diff2D(-2, 2), Diff2D(-1, 2), Diff2D(0, 2) },
669 { Diff2D(1, 1), Diff2D(1, 0), Diff2D(0, 0), Diff2D(-1, 0),
670 Diff2D(-1, 1), Diff2D(-1, 2), Diff2D(0, 2), Diff2D(1, 2) },
671 { Diff2D(2, 1), Diff2D(2, 0), Diff2D(1, 0), Diff2D(0, 0),
672 Diff2D(0, 1), Diff2D(0, 2), Diff2D(1, 2), Diff2D(2, 2) },
673 { Diff2D(2, 0), Diff2D(2, -1), Diff2D(1, -1), Diff2D(0, -1),
674 Diff2D(0, 0), Diff2D(0, 1), Diff2D(1, 1), Diff2D(2, 1) },
675 { Diff2D(2, -1), Diff2D(2, -2), Diff2D(1, -2), Diff2D(0, -2),
676 Diff2D(0, -1), Diff2D(0, 0), Diff2D(1, 0), Diff2D(2, 0) },
677 { Diff2D(1, -1), Diff2D(1, -2), Diff2D(0, -2), Diff2D(-1, -2),
678 Diff2D(-1, -1), Diff2D(-1, 0), Diff2D(0, 0), Diff2D(1, 0) },
679 { Diff2D(0, -1), Diff2D(0, -2), Diff2D(-1, -2), Diff2D(-2, -2),
680 Diff2D(-2, -1), Diff2D(-2, 0), Diff2D(-1, 0), Diff2D(0, 0) }
711template<
class NEIGHBORCODE>
716 typedef NEIGHBORCODE NeighborCode;
760 direction_ =
static_cast<Direction>((direction_+1) % NEIGHBORCODE::DirectionCount);
767 direction_ =
static_cast<Direction>((direction_ + NEIGHBORCODE::DirectionCount-1) % NEIGHBORCODE::DirectionCount);
790 direction_ =
static_cast<Direction>((direction_ + d) % NEIGHBORCODE::DirectionCount);
792 direction_ =
static_cast<Direction>(direction_ + NEIGHBORCODE::DirectionCount);
799 direction_ =
static_cast<Direction>((direction_ - d) % NEIGHBORCODE::DirectionCount);
801 direction_ =
static_cast<Direction>(direction_ + NEIGHBORCODE::DirectionCount);
823 direction_ =
static_cast<Direction>((direction_ + NEIGHBORCODE::South) % NEIGHBORCODE::DirectionCount);
833 direction_ =
static_cast<Direction>((direction_ + NEIGHBORCODE::North) % NEIGHBORCODE::DirectionCount);
858 return direction_ == o.direction_;
864 return direction_ != o.direction_;
870 return direction_ - o.direction_;
895 return NEIGHBORCODE::diff(direction_);
902 return NEIGHBORCODE::diff(dir);
910 Direction toDir =
static_cast<Direction>((direction_ + offset) % NEIGHBORCODE::DirectionCount);
912 toDir =
static_cast<Direction>(toDir + NEIGHBORCODE::DirectionCount);
913 return NEIGHBORCODE::relativeDiff(direction_, toDir);
919 return NEIGHBORCODE::dX(direction_);
925 return NEIGHBORCODE::dY(direction_);
932 return NEIGHBORCODE::isDiagonal(direction_);
946 return NEIGHBORCODE::directionBit(direction_);
953 return static_cast<Direction>((NEIGHBORCODE::OppositeDirPrefix*direction_ + NEIGHBORCODE::OppositeOffset) % NEIGHBORCODE::DirectionCount);
960 return NEIGHBORCODE::directionBit(
opposite());
967 int result = (direction_ + offset) % NEIGHBORCODE::DirectionCount;
969 result += NEIGHBORCODE::DirectionCount;
1036template <
class IMAGEITERATOR,
class NEIGHBORCODE>
1084 Direction d = NEIGHBOROFFSETCIRCULATOR::InitialDirection)
1085 : IMAGEITERATOR(aCenter), neighborCode_(d)
1087 IMAGEITERATOR::operator+=(neighborCode_.
diff());
1121 IMAGEITERATOR::operator+=(neighborCode_.
relativeDiff(d));
1156 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
1157 (oldDirection, neighborCode_.
direction()));
1169 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
1170 (oldDirection, neighborCode_.
direction()));
1182 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
1183 (oldDirection, neighborCode_.
direction()));
1193 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
1194 (oldDirection, neighborCode_.
direction()));
1203 IMAGEITERATOR::operator+=(neighborCode_.
diff());
1214 IMAGEITERATOR::operator+=(neighborCode_.
diff());
1221 return neighborCode_ == rhs.neighborCode_ &&
1222 IMAGEITERATOR::operator==(rhs);
1228 return neighborCode_ != rhs.neighborCode_ ||
1229 IMAGEITERATOR::operator!=(rhs);
1235 return neighborCode_ - rhs.neighborCode_;
1241 return IMAGEITERATOR::operator*();
1247 return IMAGEITERATOR::operator[](neighborCode_.
relativeDiff(d));
1253 return IMAGEITERATOR::operator->();
1283 return neighborCode_.
diff();
1293 NEIGHBOROFFSETCIRCULATOR neighborCode_;
1344template <
class IMAGEITERATOR,
class NEIGHBORCODE>
1392 :
BaseType(
center, NEIGHBORCODE::nearBorderDirections(atBorder, 0)),
1393 whichBorder_(atBorder),
1394 count_(NEIGHBORCODE::nearBorderDirectionCount(atBorder)),
1429 current_ =
static_cast<Direction>((current_ + count_ + d) % count_);
1430 BaseType::turnTo(NEIGHBORCODE::nearBorderDirections(whichBorder_, current_));
1459 return current_ == rhs.current_;
1465 return current_ != rhs.current_;
1471 return (current_ - rhs.current_) % count_;
1511 typename NeighborCode::difference_type
const &
diff()
const
1524 signed char count_, current_;
Two dimensional difference vector.
Definition diff2d.hxx:186
int y
Definition diff2d.hxx:392
int x
Definition diff2d.hxx:385
Encapsulation of direction management for the 8-neighborhood.
Definition pixelneighborhood.hxx:421
static int dX(Direction code)
Definition pixelneighborhood.hxx:516
static Diff2D const & northEast()
Definition pixelneighborhood.hxx:596
static int dX(int code)
Definition pixelneighborhood.hxx:520
static Diff2D const & west()
Definition pixelneighborhood.hxx:599
Direction
Definition pixelneighborhood.hxx:434
@ SouthWest
 
Definition pixelneighborhood.hxx:441
@ NorthEast
 
Definition pixelneighborhood.hxx:437
@ CausalLast
 
Definition pixelneighborhood.hxx:446
@ AntiCausalFirst
 
Definition pixelneighborhood.hxx:447
@ DirectionCount
 
Definition pixelneighborhood.hxx:444
@ Error
 
Definition pixelneighborhood.hxx:435
@ SouthEast
 
Definition pixelneighborhood.hxx:443
@ East
 
Definition pixelneighborhood.hxx:436
@ AntiCausalLast
 
Definition pixelneighborhood.hxx:448
@ North
 
Definition pixelneighborhood.hxx:438
@ South
 
Definition pixelneighborhood.hxx:442
@ NorthWest
 
Definition pixelneighborhood.hxx:439
@ West
 
Definition pixelneighborhood.hxx:440
@ CausalFirst
 
Definition pixelneighborhood.hxx:445
static Diff2D const & bottomRight()
Definition pixelneighborhood.hxx:593
static Diff2D const & right()
Definition pixelneighborhood.hxx:586
static Diff2D const & bottom()
Definition pixelneighborhood.hxx:592
static Diff2D const & bottomLeft()
Definition pixelneighborhood.hxx:591
static Diff2D const & southWest()
Definition pixelneighborhood.hxx:600
static Diff2D const & topLeft()
Definition pixelneighborhood.hxx:589
static unsigned int nearBorderDirectionCount(AtImageBorder b)
Definition pixelneighborhood.hxx:472
static Diff2D const & south()
Definition pixelneighborhood.hxx:601
static Diff2D const & relativeDiff(int fromCode, int toCode)
Definition pixelneighborhood.hxx:510
static Diff2D const & southEast()
Definition pixelneighborhood.hxx:602
static int dY(Direction code)
Definition pixelneighborhood.hxx:518
static Direction code(FourNeighborhood::Direction d)
Definition pixelneighborhood.hxx:526
static Diff2D const & diff(int code)
Definition pixelneighborhood.hxx:496
static bool isDiagonal(Direction code)
Definition pixelneighborhood.hxx:584
static Diff2D const & top()
Definition pixelneighborhood.hxx:588
static Direction code(Diff2D const &diff)
Definition pixelneighborhood.hxx:533
static Direction nearBorderDirections(AtImageBorder b, int index)
Definition pixelneighborhood.hxx:480
static Diff2D const & relativeDiff(Direction fromCode, Direction toCode)
Definition pixelneighborhood.hxx:502
static int dY(int code)
Definition pixelneighborhood.hxx:522
static Diff2D const & topRight()
Definition pixelneighborhood.hxx:587
static Diff2D const & east()
Definition pixelneighborhood.hxx:595
static Diff2D const & diff(Direction code)
Definition pixelneighborhood.hxx:488
static Diff2D const & northWest()
Definition pixelneighborhood.hxx:598
static Diff2D const & north()
Definition pixelneighborhood.hxx:597
static Diff2D const & left()
Definition pixelneighborhood.hxx:590
Encapsulation of direction management for 4-neighborhood.
Definition pixelneighborhood.hxx:166
static int dX(Direction code)
Definition pixelneighborhood.hxx:257
static int dX(int code)
Definition pixelneighborhood.hxx:261
static Diff2D const & west()
Definition pixelneighborhood.hxx:314
Direction
Definition pixelneighborhood.hxx:179
@ CausalLast
 
Definition pixelneighborhood.hxx:187
@ AntiCausalFirst
 
Definition pixelneighborhood.hxx:188
@ DirectionCount
 
Definition pixelneighborhood.hxx:185
@ Error
 
Definition pixelneighborhood.hxx:180
@ East
 
Definition pixelneighborhood.hxx:181
@ AntiCausalLast
 
Definition pixelneighborhood.hxx:189
@ North
 
Definition pixelneighborhood.hxx:182
@ South
 
Definition pixelneighborhood.hxx:184
@ West
 
Definition pixelneighborhood.hxx:183
@ CausalFirst
 
Definition pixelneighborhood.hxx:186
static Diff2D const & right()
Definition pixelneighborhood.hxx:307
static Diff2D const & bottom()
Definition pixelneighborhood.hxx:310
static unsigned int nearBorderDirectionCount(AtImageBorder b)
Definition pixelneighborhood.hxx:213
static Diff2D const & south()
Definition pixelneighborhood.hxx:315
static Diff2D const & relativeDiff(int fromCode, int toCode)
Definition pixelneighborhood.hxx:251
static int dY(Direction code)
Definition pixelneighborhood.hxx:259
static Diff2D const & diff(int code)
Definition pixelneighborhood.hxx:237
static Diff2D const & top()
Definition pixelneighborhood.hxx:308
static Direction code(Diff2D const &diff)
Definition pixelneighborhood.hxx:269
static bool isDiagonal(Direction)
Definition pixelneighborhood.hxx:305
static Direction nearBorderDirections(AtImageBorder b, int index)
Definition pixelneighborhood.hxx:221
static Diff2D const & relativeDiff(Direction fromCode, Direction toCode)
Definition pixelneighborhood.hxx:243
static int dY(int code)
Definition pixelneighborhood.hxx:263
static Diff2D const & east()
Definition pixelneighborhood.hxx:312
static Diff2D const & diff(Direction code)
Definition pixelneighborhood.hxx:229
static Diff2D const & north()
Definition pixelneighborhood.hxx:313
static Diff2D const & left()
Definition pixelneighborhood.hxx:309
Circulator that walks around a given location.
Definition pixelneighborhood.hxx:714
NeighborOffsetCirculator & operator--()
Definition pixelneighborhood.hxx:765
NeighborOffsetCirculator operator++(int)
Definition pixelneighborhood.hxx:772
index_reference operator[](difference_type d) const
Definition pixelneighborhood.hxx:880
value_type const * pointer
Definition pixelneighborhood.hxx:736
NeighborOffsetCirculator & turnRight()
Definition pixelneighborhood.hxx:821
int dX() const
Definition pixelneighborhood.hxx:917
int difference_type
Definition pixelneighborhood.hxx:740
bool isDiagonal() const
Definition pixelneighborhood.hxx:930
NEIGHBORCODE::Direction Direction
Definition pixelneighborhood.hxx:720
reference diff() const
Definition pixelneighborhood.hxx:893
unsigned int directionBit() const
Definition pixelneighborhood.hxx:944
NeighborOffsetCirculator operator--(int)
Definition pixelneighborhood.hxx:780
unsigned int oppositeDirectionBit() const
Definition pixelneighborhood.hxx:958
NeighborOffsetCirculator & operator-=(difference_type d)
Definition pixelneighborhood.hxx:797
NeighborOffsetCirculator(Direction dir=NEIGHBORCODE::InitialDirection)
Definition pixelneighborhood.hxx:752
NeighborOffsetCirculator & turnRound()
Definition pixelneighborhood.hxx:841
NeighborOffsetCirculator operator+(difference_type d) const
Definition pixelneighborhood.hxx:806
value_type const & index_reference
Definition pixelneighborhood.hxx:732
bool operator!=(NeighborOffsetCirculator const &o) const
Definition pixelneighborhood.hxx:862
Direction direction(difference_type offset) const
Definition pixelneighborhood.hxx:965
int dY() const
Definition pixelneighborhood.hxx:923
NeighborOffsetCirculator & turnTo(Direction d)
Definition pixelneighborhood.hxx:849
bool operator==(NeighborOffsetCirculator const &o) const
Definition pixelneighborhood.hxx:856
reference operator*() const
Definition pixelneighborhood.hxx:874
NeighborOffsetCirculator & operator++()
Definition pixelneighborhood.hxx:758
Direction opposite() const
Definition pixelneighborhood.hxx:951
NeighborOffsetCirculator & operator+=(difference_type d)
Definition pixelneighborhood.hxx:788
random_access_circulator_tag iterator_category
Definition pixelneighborhood.hxx:744
static reference diff(Direction dir)
Definition pixelneighborhood.hxx:900
NeighborOffsetCirculator & turnLeft()
Definition pixelneighborhood.hxx:831
value_type const & reference
Definition pixelneighborhood.hxx:728
value_type relativeDiff(difference_type offset) const
Definition pixelneighborhood.hxx:908
difference_type operator-(NeighborOffsetCirculator const &o) const
Definition pixelneighborhood.hxx:868
NEIGHBORCODE::difference_type value_type
Definition pixelneighborhood.hxx:724
pointer operator->() const
Definition pixelneighborhood.hxx:886
Direction direction() const
Definition pixelneighborhood.hxx:937
NeighborOffsetCirculator operator-(difference_type d) const
Definition pixelneighborhood.hxx:812
Circulator that walks around a given location in a given image.
Definition pixelneighborhood.hxx:1038
index_reference operator[](difference_type d) const
Definition pixelneighborhood.hxx:1245
NeighborhoodCirculator & operator++()
Definition pixelneighborhood.hxx:1091
bool operator==(NeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1219
NEIGHBOROFFSETCIRCULATOR::value_type const & diff() const
Definition pixelneighborhood.hxx:1281
bool isDiagonal() const
Definition pixelneighborhood.hxx:1287
NEIGHBOROFFSETCIRCULATOR::difference_type difference_type
Definition pixelneighborhood.hxx:1074
NEIGHBORCODE::Direction Direction
Definition pixelneighborhood.hxx:1057
reference index_reference
Definition pixelneighborhood.hxx:1066
unsigned int directionBit() const
Definition pixelneighborhood.hxx:1275
NeighborhoodCirculator & moveCenterToNeighbor()
Definition pixelneighborhood.hxx:1201
NeighborhoodCirculator & turnTo(Direction d)
Definition pixelneighborhood.hxx:1189
NeighborhoodCirculator & operator--()
Definition pixelneighborhood.hxx:1105
NeighborhoodCirculator operator++(int)
Definition pixelneighborhood.hxx:1097
NeighborhoodCirculator & turnRight()
Definition pixelneighborhood.hxx:1152
IMAGEITERATOR::reference reference
Definition pixelneighborhood.hxx:1061
NeighborhoodCirculator & swapCenterNeighbor()
Definition pixelneighborhood.hxx:1211
NeighborhoodCirculator & operator-=(difference_type d)
Definition pixelneighborhood.hxx:1127
IMAGEITERATOR::value_type value_type
Definition pixelneighborhood.hxx:1053
NeighborhoodCirculator operator-(difference_type d) const
Definition pixelneighborhood.hxx:1141
bool operator!=(NeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1226
reference operator*() const
Definition pixelneighborhood.hxx:1239
NeighborhoodCirculator operator+(difference_type d) const
Definition pixelneighborhood.hxx:1133
NEIGHBOROFFSETCIRCULATOR::iterator_category iterator_category
Definition pixelneighborhood.hxx:1078
NeighborhoodCirculator & turnLeft()
Definition pixelneighborhood.hxx:1165
IMAGEITERATOR base_type
Definition pixelneighborhood.hxx:1045
NeighborhoodCirculator operator--(int)
Definition pixelneighborhood.hxx:1111
difference_type operator-(NeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1233
NeighborhoodCirculator(IMAGEITERATOR const &aCenter=IMAGEITERATOR(), Direction d=NEIGHBOROFFSETCIRCULATOR::InitialDirection)
Definition pixelneighborhood.hxx:1083
IMAGEITERATOR::pointer pointer
Definition pixelneighborhood.hxx:1070
base_type center() const
Definition pixelneighborhood.hxx:1263
NeighborhoodCirculator & operator+=(difference_type d)
Definition pixelneighborhood.hxx:1119
base_type const & base() const
Definition pixelneighborhood.hxx:1257
NeighborhoodCirculator & turnRound()
Definition pixelneighborhood.hxx:1178
pointer operator->() const
Definition pixelneighborhood.hxx:1251
Direction direction() const
Definition pixelneighborhood.hxx:1269
NEIGHBORCODE NeighborCode
Definition pixelneighborhood.hxx:1049
Circulator that walks around a given location in a given image, using a restricted neighborhood.
Definition pixelneighborhood.hxx:1347
RestrictedNeighborhoodCirculator operator--(int)
Definition pixelneighborhood.hxx:1419
RestrictedNeighborhoodCirculator operator-(difference_type d) const
Definition pixelneighborhood.hxx:1449
bool isDiagonal() const
Definition pixelneighborhood.hxx:1517
bool operator==(RestrictedNeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1457
NeighborCode::difference_type const & diff() const
Definition pixelneighborhood.hxx:1511
unsigned int directionBit() const
Definition pixelneighborhood.hxx:1505
RestrictedNeighborhoodCirculator operator+(difference_type d) const
Definition pixelneighborhood.hxx:1441
RestrictedNeighborhoodCirculator & operator+=(difference_type d)
Definition pixelneighborhood.hxx:1427
RestrictedNeighborhoodCirculator & operator--()
Definition pixelneighborhood.hxx:1413
bool operator!=(RestrictedNeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1463
BaseType::reference reference
Definition pixelneighborhood.hxx:1369
RestrictedNeighborhoodCirculator(IMAGEITERATOR const ¢er=IMAGEITERATOR(), AtImageBorder atBorder=NotAtBorder)
Definition pixelneighborhood.hxx:1390
BaseType::difference_type difference_type
Definition pixelneighborhood.hxx:1381
RestrictedNeighborhoodCirculator operator++(int)
Definition pixelneighborhood.hxx:1405
reference operator*() const
Definition pixelneighborhood.hxx:1475
RestrictedNeighborhoodCirculator & operator-=(difference_type d)
Definition pixelneighborhood.hxx:1435
BaseType::Direction Direction
Definition pixelneighborhood.hxx:1365
BaseType::value_type value_type
Definition pixelneighborhood.hxx:1361
IMAGEITERATOR base_type
Definition pixelneighborhood.hxx:1353
RestrictedNeighborhoodCirculator & operator++()
Definition pixelneighborhood.hxx:1399
BaseType::pointer pointer
Definition pixelneighborhood.hxx:1377
BaseType::iterator_category iterator_category
Definition pixelneighborhood.hxx:1385
BaseType::index_reference index_reference
Definition pixelneighborhood.hxx:1373
base_type center() const
Definition pixelneighborhood.hxx:1493
difference_type operator-(RestrictedNeighborhoodCirculator const &rhs) const
Definition pixelneighborhood.hxx:1469
base_type const & base() const
Definition pixelneighborhood.hxx:1487
pointer operator->() const
Definition pixelneighborhood.hxx:1481
Direction direction() const
Definition pixelneighborhood.hxx:1499
NEIGHBORCODE NeighborCode
Definition pixelneighborhood.hxx:1357
static const Direction NorthEast
Definition pixelneighborhood.hxx:610
static const Direction West
Definition pixelneighborhood.hxx:613
static const Direction East
Definition pixelneighborhood.hxx:609
Diff2D const & west()
Definition pixelneighborhood.hxx:623
Diff2D const & north()
Definition pixelneighborhood.hxx:621
static const Direction South
Definition pixelneighborhood.hxx:615
Diff2D const & east()
Definition pixelneighborhood.hxx:619
static const Direction DirectionCount
Definition pixelneighborhood.hxx:617
static const Direction SouthWest
Definition pixelneighborhood.hxx:614
Diff2D const & northEast()
Definition pixelneighborhood.hxx:620
static const Direction North
Definition pixelneighborhood.hxx:611
static const Direction SouthEast
Definition pixelneighborhood.hxx:616
Diff2D const & southEast()
Definition pixelneighborhood.hxx:626
static const Direction NorthWest
Definition pixelneighborhood.hxx:612
Diff2D const & northWest()
Definition pixelneighborhood.hxx:622
Diff2D const & southWest()
Definition pixelneighborhood.hxx:624
Diff2D const & south()
Definition pixelneighborhood.hxx:625
static const Direction West
Definition pixelneighborhood.hxx:326
static const Direction East
Definition pixelneighborhood.hxx:324
Diff2D const & west()
Definition pixelneighborhood.hxx:332
Diff2D const & north()
Definition pixelneighborhood.hxx:331
static const Direction South
Definition pixelneighborhood.hxx:327
Diff2D const & east()
Definition pixelneighborhood.hxx:330
static const Direction Error
Definition pixelneighborhood.hxx:323
NeighborCode::Direction Direction
Definition pixelneighborhood.hxx:321
static const Direction DirectionCount
Definition pixelneighborhood.hxx:328
static const Direction North
Definition pixelneighborhood.hxx:325
Diff2D const & south()
Definition pixelneighborhood.hxx:333
EightNeighborhood::NeighborCode EightNeighborCode
Definition pixelneighborhood.hxx:687
NeighborOffsetCirculator< FourNeighborCode > FourNeighborOffsetCirculator
Definition pixelneighborhood.hxx:980
FourNeighborhood::NeighborCode FourNeighborCode
Definition pixelneighborhood.hxx:379
AtImageBorder
Encode whether a point is near the image border.
Definition pixelneighborhood.hxx:69
@ RightBorder
 
Definition pixelneighborhood.hxx:71
@ LeftBorder
 
Definition pixelneighborhood.hxx:72
@ TopBorder
 
Definition pixelneighborhood.hxx:73
@ NotAtBorder
 
Definition pixelneighborhood.hxx:70
@ FrontBorder
 
Definition pixelneighborhood.hxx:75
@ BottomBorder
 
Definition pixelneighborhood.hxx:74
AtImageBorder isAtImageBorder(int x, int y, int width, int height)
Find out whether a point is at the image border.
Definition pixelneighborhood.hxx:111
NeighborOffsetCirculator< EightNeighborCode > EightNeighborOffsetCirculator
Definition pixelneighborhood.hxx:976