36 #ifndef VIGRA_VOXELNEIGHBORHOOD_HXX 37 #define VIGRA_VOXELNEIGHBORHOOD_HXX 39 #include "tinyvector.hxx" 40 #include "pixelneighborhood.hxx" 82 inline AtVolumeBorder
isAtVolumeBorder(
int x,
int y,
int z,
int width,
int height,
int depth)
84 return static_cast<AtVolumeBorder
>((x == 0
101 inline AtVolumeBorder
isAtVolumeBorder(Diff3D
const & p, Diff3D
const & shape)
114 return static_cast<AtVolumeBorder
>((x == 0
136 return static_cast<AtVolumeBorder
>((x == 0
158 namespace Neighborhood3DSix
181 CausalFirst = InFront,
183 AntiCausalFirst = Behind,
184 AntiCausalLast = East,
186 InitialDirection = InFront,
187 OppositeDirPrefix = 1,
194 static unsigned int b[];
195 static unsigned int c[];
199 static Diff3D rd[][6];
202 static unsigned int directionBit(
Direction d)
204 return StaticData<0>::b[d];
212 return StaticData<0>::c[b];
220 return StaticData<0>::bd[b][index];
231 return StaticData<0>::bc[b][index];
239 return StaticData<0>::d[
code];
245 static Diff3D
const &
diff(
int code) {
return diff(static_cast<Direction>(code)); }
256 return StaticData<0>::rd[fromCode][toCode];
264 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
303 return (diff[2] == 0) ?
South : Error;
305 return (diff[2] == 0) ?
North : Error;
311 return ((diff[1] == 0) && (diff[2] == 0)) ?
West : Error;
313 return ((diff[1] == 0) && (diff[2] == 0)) ?
East : Error;
345 static const Direction
East = NeighborCode3D::East;
346 static const Direction
North = NeighborCode3D::North;
347 static const Direction
West = NeighborCode3D::West;
348 static const Direction
South = NeighborCode3D::South;
349 static const Direction
Behind = NeighborCode3D::Behind;
350 static const Direction
InFront = NeighborCode3D::InFront;
354 unsigned int NeighborCode3D::StaticData<DUMMY>::b[] = {
364 unsigned int NeighborCode3D::StaticData<DUMMY>::c[] = {
365 6, 5, 5, 0, 5, 4, 4, 0, 5, 4,
366 4, 0, 0, 0, 0, 0, 5, 4, 4, 0,
367 4, 3, 3, 0, 4, 3, 3, 0, 0, 0,
368 0, 0, 5, 4, 4, 0, 4, 3, 3, 0,
372 Direction NeighborCode3D::StaticData<DUMMY>::bd[43][6] = {
373 { InFront, North, West, Behind, South, East},
374 { InFront, North, West, Behind, South, Error},
375 { InFront, North, Behind, South, East, Error},
376 { Error, Error, Error, Error, Error, Error},
377 { InFront, West, Behind, South, East, Error},
378 { InFront, West, Behind, South, Error, Error},
379 { InFront, Behind, South, East, Error, Error},
380 { Error, Error, Error, Error, Error, Error},
381 { InFront, North, West, Behind, East, Error},
382 { InFront, North, West, Behind, Error, Error},
383 { InFront, North, Behind, East, Error, Error},
384 { Error, Error, Error, Error, Error, Error},
385 { Error, Error, Error, Error, Error, Error},
386 { Error, Error, Error, Error, Error, Error},
387 { Error, Error, Error, Error, Error, Error},
388 { Error, Error, Error, Error, Error, Error},
389 { North, West, Behind, South, East, Error},
390 { North, West, Behind, South, Error, Error},
391 { North, Behind, South, East, Error, Error},
392 { Error, Error, Error, Error, Error, Error},
393 { West, Behind, South, East, Error, Error},
394 { West, Behind, South, Error, Error, Error},
395 { Behind, South, East, Error, Error, Error},
396 { Error, Error, Error, Error, Error, Error},
397 { North, West, Behind, East, Error, Error},
398 { North, West, Behind, Error, Error, Error},
399 { North, Behind, East, Error, Error, Error},
400 { Error, Error, Error, Error, Error, Error},
401 { Error, Error, Error, Error, Error, Error},
402 { Error, Error, Error, Error, Error, Error},
403 { Error, Error, Error, Error, Error, Error},
404 { Error, Error, Error, Error, Error, Error},
405 { InFront, North, West, South, East,Error},
406 { InFront, North, West, South, Error, Error},
407 { InFront, North, South, East, Error, Error},
408 { Error, Error, Error, Error, Error, Error},
409 { InFront, West, South, East, Error, Error},
410 { InFront, West, South, Error, Error, Error},
411 { InFront, South, East, Error, Error, Error},
412 { Error, Error, Error, Error, Error, Error},
413 { InFront, North, West, East, Error, Error},
414 { InFront, North, West, Error, Error, Error},
415 { InFront, North, East, Error, Error, Error}
419 Direction NeighborCode3D::StaticData<DUMMY>::bc[43][4] = {
420 { InFront, North, West, Error},
421 { InFront, North, West, Error},
422 { InFront, North, Error, Error},
423 { Error, Error, Error, Error},
424 { InFront, West, Error, Error},
425 { InFront, West, Error, Error},
426 { InFront, Error,Error, Error},
427 { Error, Error, Error, Error},
428 { InFront, North, West, Error},
429 { InFront, North, West, Error},
430 { InFront, North, Error, Error},
431 { Error, Error, Error, Error},
432 { Error, Error, Error, Error},
433 { Error, Error, Error, Error},
434 { Error, Error, Error, Error},
435 { Error, Error, Error, Error},
436 { North, West, Error, Error},
437 { North, West, Error, Error},
438 { North, Error, Error, Error},
439 { Error, Error, Error, Error},
440 { West, Error, Error, Error},
441 { West, Error, Error, Error},
442 { Error, Error, Error, Error},
443 { Error, Error, Error, Error},
444 { North, West, Error, Error},
445 { North, West, Error, Error},
446 { North, Error, Error, Error},
447 { Error, Error, Error, Error},
448 { Error, Error, Error, Error},
449 { Error, Error, Error, Error},
450 { Error, Error, Error, Error},
451 { Error, Error, Error, Error},
452 { InFront, North, West, Error},
453 { InFront, North, West, Error},
454 { InFront, North, Error, Error},
455 { Error, Error, Error, Error},
456 { InFront, West, Error, Error},
457 { InFront, West, Error, Error},
458 { InFront, Error, Error, Error},
459 { Error, Error, Error, Error},
460 { InFront, North, West, Error},
461 { InFront, North, West, Error},
462 { InFront, North, Error, Error}
466 Diff3D NeighborCode3D::StaticData<DUMMY>::d[] = {
476 Diff3D NeighborCode3D::StaticData<DUMMY>::rd[][6] = {
478 {
Diff3D( 0, 0, 0),
Diff3D(0, -1, 1),
Diff3D(-1, 0, 1),
Diff3D( 0, 0, 2),
Diff3D( 0, 1, 1),
Diff3D( 1, 0, 1)},
479 {
Diff3D( 0, 1,-1),
Diff3D( 0, 0, 0),
Diff3D(-1, 1, 0),
Diff3D( 0, 1, 1),
Diff3D( 0, 2, 0),
Diff3D( 1, 1, 0)},
480 {
Diff3D( 1, 0,-1),
Diff3D( 1,-1, 0),
Diff3D( 0, 0, 0),
Diff3D( 1, 0, 1),
Diff3D( 1, 1, 0),
Diff3D( 2, 0, 0)},
481 {
Diff3D( 0, 0,-2),
Diff3D( 0,-1,-1),
Diff3D(-1, 0,-1),
Diff3D( 0, 0, 0),
Diff3D( 0, 1,-1),
Diff3D( 1, 0,-1)},
482 {
Diff3D( 0,-1,-1),
Diff3D( 0,-2, 0),
Diff3D(-1,-1, 0),
Diff3D( 0,-1, 1),
Diff3D( 0, 0, 0),
Diff3D( 1,-1, 0)},
483 {
Diff3D(-1, 0,-1),
Diff3D(-1,-1, 0),
Diff3D(-2, 0, 0),
Diff3D(-1, 0, 1),
Diff3D(-1, 1, 0),
Diff3D( 0, 0, 0) }
498 namespace Neighborhood3DTwentySix
546 AntiCausalFirst = BehindSouthEast,
547 AntiCausalLast = East,
550 OppositeDirPrefix = -1,
557 static unsigned int b[];
558 static unsigned int c[];
564 static unsigned int directionBit(
Direction d)
566 return StaticData<0>::b[d];
575 return StaticData<0>::c[b];
583 return StaticData<0>::bd[b][index];
594 return StaticData<0>::bc[b][index];
602 return StaticData<0>::d[
code];
608 static Diff3D
const &
diff(
int code) {
return diff(static_cast<Direction>(code)); }
661 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
696 vigra_fail(
"NeighborCode3D::code(): Internal error -- invalid direction code.");
734 case 0:
return North;
739 case -1:
return InFront;
740 case 1:
return Behind;
745 case 0:
return South;
779 Diff3D d =
diff(dir);
797 static Diff3D
const &
top() {
return diff(North); }
799 static Diff3D
const &
left() {
return diff(West); }
809 static Diff3D
const &
rear() {
return diff(Behind); }
830 static Diff3D
const &
west() {
return diff(West); }
831 static Diff3D
const &
east() {
return diff(East); }
856 static const Direction InFront = NeighborCode3D::InFront;
862 static const Direction
NorthWest = NeighborCode3D::NorthWest;
863 static const Direction North = NeighborCode3D::North;
864 static const Direction
NorthEast = NeighborCode3D::NorthEast;
865 static const Direction West = NeighborCode3D::West;
866 static const Direction East = NeighborCode3D::East;
867 static const Direction
SouthWest = NeighborCode3D::SouthWest;
868 static const Direction South = NeighborCode3D::South;
869 static const Direction
SouthEast = NeighborCode3D::SouthEast;
874 static const Direction
BehindWest = NeighborCode3D::BehindWest;
875 static const Direction Behind = NeighborCode3D::Behind;
876 static const Direction
BehindEast = NeighborCode3D::BehindEast;
881 static const Direction DirectionCount = NeighborCode3D::DirectionCount;
884 unsigned int NeighborCode3D::StaticData<DUMMY>::b[] = {
885 1 << InFrontNorthWest,
887 1 << InFrontNorthEast,
891 1 << InFrontSouthWest,
893 1 << InFrontSouthEast,
904 1 << BehindNorthWest,
906 1 << BehindNorthEast,
910 1 << BehindSouthWest,
916 unsigned int NeighborCode3D::StaticData<DUMMY>::c[] = {
917 26, 17, 17, 0, 17, 11, 11, 0, 17, 11,
918 11, 0, 0, 0, 0, 0, 17, 11, 11, 0,
919 11, 7, 7, 0, 11, 7, 7, 0, 0, 0,
920 0, 0, 17, 11, 11, 0, 11, 7, 7, 0,
924 Direction NeighborCode3D::StaticData<DUMMY>::bd[43][26] = {
926 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
927 InFrontWest, InFront, InFrontEast,
928 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
930 NorthWest, North, NorthEast,
932 SouthWest, South, SouthEast,
934 BehindNorthWest, BehindNorth, BehindNorthEast,
935 BehindWest, Behind, BehindEast,
936 BehindSouthWest, BehindSouth, BehindSouthEast},
938 { InFrontNorthWest, InFrontNorth,
939 InFrontWest, InFront,
940 InFrontSouthWest, InFrontSouth,
946 BehindNorthWest, BehindNorth,
948 BehindSouthWest, BehindSouth,
949 Error, Error, Error, Error, Error, Error, Error, Error, Error},
951 { InFrontNorth, InFrontNorthEast,
952 InFront, InFrontEast,
953 InFrontSouth, InFrontSouthEast,
959 BehindNorth, BehindNorthEast,
961 BehindSouth, BehindSouthEast,
962 Error, Error, Error, Error, Error, Error, Error, Error, Error},
964 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
965 Error, Error, Error, Error, Error, Error, Error, Error,
966 Error, Error, Error, Error, Error, Error, Error, Error, Error},
969 InFrontWest, InFront, InFrontEast,
970 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
974 SouthWest, South, SouthEast,
977 BehindWest, Behind, BehindEast,
978 BehindSouthWest, BehindSouth, BehindSouthEast,
979 Error, Error, Error, Error, Error, Error, Error, Error, Error},
982 InFrontWest, InFront,
983 InFrontSouthWest, InFrontSouth,
991 BehindSouthWest, BehindSouth,
992 Error, Error, Error, Error, Error, Error, Error, Error, Error,
993 Error, Error, Error, Error, Error, Error},
996 InFront, InFrontEast,
997 InFrontSouth, InFrontSouthEast,
1005 BehindSouth, BehindSouthEast,
1006 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1007 Error, Error, Error, Error, Error, Error},
1009 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1010 Error, Error, Error, Error, Error, Error, Error, Error,
1011 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1013 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1014 InFrontWest, InFront, InFrontEast,
1017 NorthWest, North, NorthEast,
1021 BehindNorthWest, BehindNorth, BehindNorthEast,
1022 BehindWest, Behind, BehindEast,
1024 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1026 { InFrontNorthWest, InFrontNorth,
1027 InFrontWest, InFront,
1034 BehindNorthWest, BehindNorth,
1037 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1038 Error, Error, Error, Error, Error, Error},
1040 { InFrontNorth, InFrontNorthEast,
1041 InFront, InFrontEast,
1048 BehindNorth, BehindNorthEast,
1051 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1052 Error, Error, Error, Error, Error, Error},
1054 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1055 Error, Error, Error, Error, Error, Error, Error, Error,
1056 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1058 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1059 Error, Error, Error, Error, Error, Error, Error, Error,
1060 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1062 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1063 Error, Error, Error, Error, Error, Error, Error, Error,
1064 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1066 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1067 Error, Error, Error, Error, Error, Error, Error, Error,
1068 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1070 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1071 Error, Error, Error, Error, Error, Error, Error, Error,
1072 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1078 NorthWest, North, NorthEast,
1080 SouthWest, South, SouthEast,
1082 BehindNorthWest, BehindNorth, BehindNorthEast,
1083 BehindWest, Behind, BehindEast,
1084 BehindSouthWest, BehindSouth, BehindSouthEast,
1085 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1095 BehindNorthWest, BehindNorth,
1097 BehindSouthWest, BehindSouth,
1098 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1099 Error, Error, Error, Error, Error, Error},
1109 BehindNorth, BehindNorthEast,
1111 BehindSouth, BehindSouthEast,
1112 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1113 Error, Error, Error, Error, Error, Error},
1115 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1116 Error, Error, Error, Error, Error, Error, Error, Error,
1117 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1125 SouthWest, South, SouthEast,
1128 BehindWest, Behind, BehindEast,
1129 BehindSouthWest, BehindSouth, BehindSouthEast,
1130 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1131 Error, Error, Error, Error, Error, Error},
1143 BehindSouthWest, BehindSouth,
1144 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1145 Error, Error, Error, Error, Error, Error,
1146 Error, Error, Error, Error},
1158 BehindSouth, BehindSouthEast,
1159 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1160 Error, Error, Error, Error, Error, Error,
1161 Error, Error, Error, Error},
1163 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1164 Error, Error, Error, Error, Error, Error, Error, Error,
1165 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1171 NorthWest, North, NorthEast,
1175 BehindNorthWest, BehindNorth, BehindNorthEast,
1176 BehindWest, Behind, BehindEast,
1178 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1179 Error, Error, Error, Error, Error, Error},
1189 BehindNorthWest, BehindNorth,
1192 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1193 Error, Error, Error, Error, Error, Error,
1194 Error, Error, Error, Error},
1204 BehindNorth, BehindNorthEast,
1207 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1208 Error, Error, Error, Error, Error, Error,
1209 Error, Error, Error, Error},
1211 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1212 Error, Error, Error, Error, Error, Error, Error, Error,
1213 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1215 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1216 Error, Error, Error, Error, Error, Error, Error, Error,
1217 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1219 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1220 Error, Error, Error, Error, Error, Error, Error, Error,
1221 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1223 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1224 Error, Error, Error, Error, Error, Error, Error, Error,
1225 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1227 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1228 Error, Error, Error, Error, Error, Error, Error, Error,
1229 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1231 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1232 InFrontWest, InFront, InFrontEast,
1233 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1235 NorthWest, North, NorthEast,
1237 SouthWest, South, SouthEast,
1242 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1244 { InFrontNorthWest, InFrontNorth,
1245 InFrontWest, InFront,
1246 InFrontSouthWest, InFrontSouth,
1255 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1256 Error, Error, Error, Error, Error, Error},
1258 { InFrontNorth, InFrontNorthEast,
1259 InFront, InFrontEast,
1260 InFrontSouth, InFrontSouthEast,
1269 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1270 Error, Error, Error, Error, Error, Error},
1272 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1273 Error, Error, Error, Error, Error, Error, Error, Error,
1274 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1277 InFrontWest, InFront, InFrontEast,
1278 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1282 SouthWest, South, SouthEast,
1287 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1288 Error, Error, Error, Error, Error, Error},
1291 InFrontWest, InFront,
1292 InFrontSouthWest, InFrontSouth,
1301 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1302 Error, Error, Error, Error, Error, Error,
1303 Error, Error, Error, Error},
1306 InFront, InFrontEast,
1307 InFrontSouth, InFrontSouthEast,
1316 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1317 Error, Error, Error, Error, Error, Error,
1318 Error, Error, Error, Error},
1320 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
1321 Error, Error, Error, Error, Error, Error, Error, Error,
1322 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1324 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1325 InFrontWest, InFront, InFrontEast,
1328 NorthWest, North, NorthEast,
1335 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1336 Error, Error, Error, Error, Error, Error},
1338 { InFrontNorthWest, InFrontNorth,
1339 InFrontWest, InFront,
1349 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1350 Error, Error, Error, Error, Error, Error,
1351 Error, Error, Error, Error},
1353 { InFrontNorth, InFrontNorthEast,
1354 InFront, InFrontEast,
1364 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1365 Error, Error, Error, Error, Error, Error,
1366 Error, Error, Error, Error}
1369 template <
int DUMMY>
1370 Direction NeighborCode3D::StaticData<DUMMY>::bc[43][13] = {
1372 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1373 InFrontWest, InFront, InFrontEast,
1374 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1376 NorthWest, North, NorthEast,
1379 { InFrontNorthWest, InFrontNorth,
1380 InFrontWest, InFront,
1381 InFrontSouthWest, InFrontSouth,
1385 Error, Error, Error, Error},
1387 { InFrontNorth,InFrontNorthEast,
1388 InFront, InFrontEast,
1389 InFrontSouth, InFrontSouthEast,
1393 Error, Error, Error, Error, Error},
1395 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1398 InFrontWest, InFront, InFrontEast,
1399 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1403 Error, Error, Error, Error, Error, Error},
1406 InFrontWest, InFront,
1407 InFrontSouthWest, InFrontSouth,
1411 Error, Error, Error, Error, Error, Error, Error, Error},
1414 InFront, InFrontEast,
1415 InFrontSouth, InFrontSouthEast,
1419 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1421 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1423 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1424 InFrontWest, InFront, InFrontEast,
1427 NorthWest, North, NorthEast,
1429 Error, Error, Error},
1431 { InFrontNorthWest, InFrontNorth,
1432 InFrontWest, InFront,
1437 Error, Error, Error,Error, Error, Error},
1439 { InFrontNorth, InFrontNorthEast,
1440 InFront, InFrontEast,
1445 Error, Error, Error, Error, Error, Error, Error},
1447 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1449 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1451 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1453 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1455 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1461 NorthWest, North, NorthEast,
1463 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1471 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1479 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1481 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1489 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1497 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1499 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1501 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1507 NorthWest, North, NorthEast,
1509 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1517 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1525 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1527 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1529 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1531 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1533 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1535 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1537 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1538 InFrontWest, InFront, InFrontEast,
1539 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1541 NorthWest, North, NorthEast,
1544 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1545 InFrontWest, InFront, InFrontEast,
1546 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1548 NorthWest, North, NorthEast,
1551 { InFrontNorth, InFrontNorthEast,
1552 InFront, InFrontEast,
1553 InFrontSouth, InFrontSouthEast,
1557 Error, Error, Error, Error, Error},
1559 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1562 InFrontWest, InFront, InFrontEast,
1563 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1567 Error, Error, Error, Error, Error, Error},
1570 InFrontWest, InFront,
1571 InFrontSouthWest, InFrontSouth,
1575 Error, Error, Error, Error, Error, Error, Error, Error},
1578 InFront, InFrontEast,
1579 InFrontSouth, InFrontSouthEast,
1583 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1585 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1587 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1588 InFrontWest, InFront, InFrontEast,
1589 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1591 NorthWest, North, NorthEast,
1594 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1595 InFrontWest, InFront, InFrontEast,
1596 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1598 NorthWest, North, NorthEast,
1601 { InFrontNorth, InFrontNorthEast,
1602 InFront, InFrontEast,
1607 Error, Error, Error, Error, Error, Error, Error}
1610 template <
int DUMMY>
1611 Diff3D NeighborCode3D::StaticData<DUMMY>::d[] = {
static Diff3D const & frontBottom()
Definition: voxelneighborhood.hxx:793
static int dX(int code)
Definition: voxelneighborhood.hxx:672
static Direction code(Diff3D const &diff)
Definition: voxelneighborhood.hxx:286
static Diff3D const & rearBottomRight()
Definition: voxelneighborhood.hxx:813
static Diff3D const & diff(int code)
Definition: voxelneighborhood.hxx:245
static int dZ(int code)
Definition: voxelneighborhood.hxx:279
vigra::TinyVector< int, 3 > Diff3D
3-dimensional difference vector
Definition: voxelneighborhood.hxx:55
static Diff3D const & infrontNorthEast()
Definition: voxelneighborhood.hxx:819
static int dY(Direction code)
Definition: voxelneighborhood.hxx:270
static Direction code(Diff3D const &diff)
Definition: voxelneighborhood.hxx:705
static Diff3D const & rearRight()
Definition: voxelneighborhood.hxx:810
static Diff3D const & frontTopLeft()
Definition: voxelneighborhood.hxx:786
static Diff3D const & front()
Definition: voxelneighborhood.hxx:329
static Diff3D const & rearTopLeft()
Definition: voxelneighborhood.hxx:805
static Diff3D const & south()
Definition: voxelneighborhood.hxx:334
static Diff3D const & diff(Direction code)
Definition: voxelneighborhood.hxx:237
static Diff3D const & frontBottomLeft()
Definition: voxelneighborhood.hxx:792
static const Direction East
Definition: voxelneighborhood.hxx:345
static Diff3D const & behindWest()
Definition: voxelneighborhood.hxx:841
static Diff3D const & northEast()
Definition: voxelneighborhood.hxx:829
AtImageBorder AtVolumeBorder
Encode whether a voxel is near the volume border.
Definition: voxelneighborhood.hxx:72
static Direction nearBorderDirectionsCausal(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:229
Direction
Definition: voxelneighborhood.hxx:172
static const Direction DirectionCount
Definition: voxelneighborhood.hxx:351
static Diff3D const & rear()
Definition: voxelneighborhood.hxx:809
static bool isDiagonal(Direction dir)
Definition: voxelneighborhood.hxx:778
static const Direction InFrontNorth
Definition: voxelneighborhood.hxx:853
static const Direction InFront
Definition: voxelneighborhood.hxx:350
Neighborhood3DTwentySix::NeighborCode3D NeighborCode3DTwentySix
Definition: voxelneighborhood.hxx:1646
static Diff3D const & behindSouthWest()
Definition: voxelneighborhood.hxx:842
static const Direction InFrontSouthWest
Definition: voxelneighborhood.hxx:858
static Diff3D const & infrontSouthEast()
Definition: voxelneighborhood.hxx:825
AtImageBorder
Encode whether a point is near the image border.
Definition: pixelneighborhood.hxx:68
 
Definition: pixelneighborhood.hxx:75
static Diff3D const & rearTopRight()
Definition: voxelneighborhood.hxx:807
static Diff3D const & frontRight()
Definition: voxelneighborhood.hxx:791
static Diff3D const & north()
Definition: voxelneighborhood.hxx:332
static const Direction InFrontSouth
Definition: voxelneighborhood.hxx:859
static Diff3D const & south()
Definition: voxelneighborhood.hxx:833
AtVolumeBorder isAtVolumeBorderCausal(int x, int y, int z, int width, int height, int)
Find out whether a voxel is at a scan-order relevant volume border. This function checks if x == 0 or...
Definition: voxelneighborhood.hxx:112
static Diff3D const & rearBottomLeft()
Definition: voxelneighborhood.hxx:811
static Diff3D const & left()
Definition: voxelneighborhood.hxx:326
static Diff3D const & east()
Definition: voxelneighborhood.hxx:831
AtVolumeBorder isAtVolumeBorder(int x, int y, int z, int width, int height, int depth)
Find out whether a voxel is at the volume border.
Definition: voxelneighborhood.hxx:82
static Diff3D const relativeDiff(int fromCode, int toCode)
Definition: voxelneighborhood.hxx:659
static const Direction SouthWest
Definition: voxelneighborhood.hxx:867
static const Direction Behind
Definition: voxelneighborhood.hxx:349
static Diff3D const & infrontNorthWest()
Definition: voxelneighborhood.hxx:817
 
Definition: pixelneighborhood.hxx:73
static Diff3D const & west()
Definition: voxelneighborhood.hxx:830
static int diff(Direction code, int dim)
Definition: voxelneighborhood.hxx:611
static Diff3D const & topRight()
Definition: voxelneighborhood.hxx:798
static const Direction InFrontSouthEast
Definition: voxelneighborhood.hxx:860
static Diff3D const & diff(int code)
Definition: voxelneighborhood.hxx:608
static Diff3D const & bottom()
Definition: voxelneighborhood.hxx:802
static Diff3D const & behindNorthEast()
Definition: voxelneighborhood.hxx:838
static Diff3D const & rearLeft()
Definition: voxelneighborhood.hxx:808
static bool isDiagonal(Direction)
Definition: voxelneighborhood.hxx:322
static int dY(int code)
Definition: voxelneighborhood.hxx:277
static Diff3D const & rear()
Definition: voxelneighborhood.hxx:328
static Diff3D const & relativeDiff(Direction fromCode, Direction toCode)
Definition: voxelneighborhood.hxx:254
static Diff3D const & infrontSouthWest()
Definition: voxelneighborhood.hxx:823
static Diff3D const & northWest()
Definition: voxelneighborhood.hxx:827
static Diff3D const & front()
Definition: voxelneighborhood.hxx:790
static Diff3D const & southEast()
Definition: voxelneighborhood.hxx:834
static const Direction BehindNorthEast
Definition: voxelneighborhood.hxx:873
static int dZ(int code)
Definition: voxelneighborhood.hxx:676
static Diff3D const & behindNorth()
Definition: voxelneighborhood.hxx:837
static const Direction NorthEast
Definition: voxelneighborhood.hxx:864
static Diff3D const & left()
Definition: voxelneighborhood.hxx:799
static Diff3D const & behind()
Definition: voxelneighborhood.hxx:840
static Diff3D const & rearBottom()
Definition: voxelneighborhood.hxx:812
static const Direction InFrontNorthWest
Definition: voxelneighborhood.hxx:852
static int dX(Direction code)
Definition: voxelneighborhood.hxx:268
static int dY(Direction code)
Definition: voxelneighborhood.hxx:667
static Diff3D const & infrontEast()
Definition: voxelneighborhood.hxx:822
static Diff3D const & behindSouthEast()
Definition: voxelneighborhood.hxx:844
static Diff3D const & west()
Definition: voxelneighborhood.hxx:333
static Diff3D const & bottomRight()
Definition: voxelneighborhood.hxx:803
static const Direction BehindWest
Definition: voxelneighborhood.hxx:874
static Diff3D const & east()
Definition: voxelneighborhood.hxx:331
static Diff3D const & frontTop()
Definition: voxelneighborhood.hxx:787
static const Direction InFrontEast
Definition: voxelneighborhood.hxx:857
static Diff3D const & north()
Definition: voxelneighborhood.hxx:828
static unsigned int nearBorderDirectionCount(AtVolumeBorder b)
Definition: voxelneighborhood.hxx:573
static unsigned int nearBorderDirectionCount(AtVolumeBorder b)
Definition: voxelneighborhood.hxx:210
Encapsulation of direction management of neighbors for a 3D 26-neighborhood.
Definition: voxelneighborhood.hxx:503
static Diff3D const & top()
Definition: voxelneighborhood.hxx:797
static Diff3D const & top()
Definition: voxelneighborhood.hxx:325
static const Direction InFrontNorthEast
Definition: voxelneighborhood.hxx:854
static Diff3D const & frontLeft()
Definition: voxelneighborhood.hxx:789
static const Direction InFrontWest
Definition: voxelneighborhood.hxx:855
static const Direction BehindNorth
Definition: voxelneighborhood.hxx:872
Class for fixed size vectors.This class contains an array of size SIZE of the specified VALUETYPE...
Definition: accessor.hxx:940
static int dZ(Direction code)
Definition: voxelneighborhood.hxx:669
static const Direction NorthWest
Definition: voxelneighborhood.hxx:862
static const Direction West
Definition: voxelneighborhood.hxx:347
static Diff3D const & topLeft()
Definition: voxelneighborhood.hxx:796
static Diff3D const & rearTop()
Definition: voxelneighborhood.hxx:806
static const Direction BehindSouth
Definition: voxelneighborhood.hxx:878
static Diff3D const & infrontNorth()
Definition: voxelneighborhood.hxx:818
static Diff3D const & behindNorthWest()
Definition: voxelneighborhood.hxx:836
Neighborhood3DSix::NeighborCode3D NeighborCode3DSix
Definition: voxelneighborhood.hxx:490
static int dY(int code)
Definition: voxelneighborhood.hxx:674
static const Direction BehindSouthEast
Definition: voxelneighborhood.hxx:879
 
Definition: pixelneighborhood.hxx:74
static Diff3D const & bottom()
Definition: voxelneighborhood.hxx:327
Direction
Definition: voxelneighborhood.hxx:512
static Diff3D const & infront()
Definition: voxelneighborhood.hxx:821
FFTWComplex< R >::NormType abs(const FFTWComplex< R > &a)
absolute value (= magnitude)
Definition: fftw3.hxx:1002
AtVolumeBorder isAtVolumeBorderAntiCausal(int x, int y, int z, int width, int height, int depth)
Find out whether a voxel is at a scan-order relevant volume border. This function checks if x == 0 or...
Definition: voxelneighborhood.hxx:134
static Diff3D const & frontBottomRight()
Definition: voxelneighborhood.hxx:794
static const Direction BehindSouthWest
Definition: voxelneighborhood.hxx:877
static Diff3D const & behindSouth()
Definition: voxelneighborhood.hxx:843
static Diff3D const & bottomLeft()
Definition: voxelneighborhood.hxx:801
static Diff3D const & infront()
Definition: voxelneighborhood.hxx:336
static const Direction BehindEast
Definition: voxelneighborhood.hxx:876
static const Direction SouthEast
Definition: voxelneighborhood.hxx:869
static int dZ(Direction code)
Definition: voxelneighborhood.hxx:272
Encapsulation of direction management of neighbors for a 3D 6-neighborhood.
Definition: voxelneighborhood.hxx:163
static int dX(int code)
Definition: voxelneighborhood.hxx:275
static Diff3D const & behind()
Definition: voxelneighborhood.hxx:335
static Direction nearBorderDirections(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:581
static Diff3D const & southWest()
Definition: voxelneighborhood.hxx:832
static Diff3D const & diff(Direction code)
Definition: voxelneighborhood.hxx:600
static Diff3D const & right()
Definition: voxelneighborhood.hxx:800
static const Direction North
Definition: voxelneighborhood.hxx:346
 
Definition: pixelneighborhood.hxx:70
static Diff3D const & frontTopRight()
Definition: voxelneighborhood.hxx:788
static Diff3D const & infrontWest()
Definition: voxelneighborhood.hxx:820
static Diff3D const & infrontSouth()
Definition: voxelneighborhood.hxx:824
 
Definition: pixelneighborhood.hxx:71
 
Definition: pixelneighborhood.hxx:72
static Direction nearBorderDirectionsCausal(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:592
static Diff3D const & behindEast()
Definition: voxelneighborhood.hxx:839
static const Direction South
Definition: voxelneighborhood.hxx:348
static const Direction BehindNorthWest
Definition: voxelneighborhood.hxx:871
static int diff(Direction code, int dim)
Definition: voxelneighborhood.hxx:248
static Diff3D const relativeDiff(Direction fromCode, Direction toCode)
Definition: voxelneighborhood.hxx:617
static Diff3D const & right()
Definition: voxelneighborhood.hxx:324
static Direction nearBorderDirections(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:218
static Diff3D const & relativeDiff(int fromCode, int toCode)
Definition: voxelneighborhood.hxx:262
static int dX(Direction code)
Definition: voxelneighborhood.hxx:665
static Direction code(Neighborhood3DSix::Direction d)
Definition: voxelneighborhood.hxx:680