36 #ifndef VIGRA_VOXELNEIGHBORHOOD_HXX
37 #define VIGRA_VOXELNEIGHBORHOOD_HXX
39 #include "tinyvector.hxx"
40 #include "pixelneighborhood.hxx"
158 namespace Neighborhood3DSix
181 CausalFirst = InFront,
183 AntiCausalFirst = Behind,
184 AntiCausalLast = East,
186 InitialDirection = InFront,
187 OppositeDirPrefix = 1,
191 static unsigned int directionBit(
Direction d)
193 static unsigned int b[] = { 1 << InFront,
208 static unsigned int c[] = { 6, 5, 5, 0, 5, 4, 4, 0, 5, 4,
209 4, 0, 0, 0, 0, 0, 5, 4, 4, 0,
210 4, 3, 3, 0, 4, 3, 3, 0, 0, 0,
211 0, 0, 5, 4, 4, 0, 4, 3, 3, 0,
222 { InFront, North, West, Behind, South, East},
223 { InFront, North, West, Behind, South, Error},
224 { InFront, North, Behind, South, East, Error},
225 { Error, Error, Error, Error, Error, Error},
226 { InFront, West, Behind, South, East, Error},
227 { InFront, West, Behind, South, Error, Error},
228 { InFront, Behind, South, East, Error, Error},
229 { Error, Error, Error, Error, Error, Error},
230 { InFront, North, West, Behind, East, Error},
231 { InFront, North, West, Behind, Error, Error},
232 { InFront, North, Behind, East, Error, Error},
233 { Error, Error, Error, Error, Error, Error},
234 { Error, Error, Error, Error, Error, Error},
235 { Error, Error, Error, Error, Error, Error},
236 { Error, Error, Error, Error, Error, Error},
237 { Error, Error, Error, Error, Error, Error},
238 { North, West, Behind, South, East, Error},
239 { North, West, Behind, South, Error, Error},
240 { North, Behind, South, East, Error, Error},
241 { Error, Error, Error, Error, Error, Error},
242 { West, Behind, South, East, Error, Error},
243 { West, Behind, South, Error, Error, Error},
244 { Behind, South, East, Error, Error, Error},
245 { Error, Error, Error, Error, Error, Error},
246 { North, West, Behind, East, Error, Error},
247 { North, West, Behind, Error, Error, Error},
248 { North, Behind, East, Error, Error, Error},
249 { Error, Error, Error, Error, Error, Error},
250 { Error, Error, Error, Error, Error, Error},
251 { Error, Error, Error, Error, Error, Error},
252 { Error, Error, Error, Error, Error, Error},
253 { Error, Error, Error, Error, Error, Error},
254 { InFront, North, West, South, East,Error},
255 { InFront, North, West, South, Error, Error},
256 { InFront, North, South, East, Error, Error},
257 { Error, Error, Error, Error, Error, Error},
258 { InFront, West, South, East, Error, Error},
259 { InFront, West, South, Error, Error, Error},
260 { InFront, South, East, Error, Error, Error},
261 { Error, Error, Error, Error, Error, Error},
262 { InFront, North, West, East, Error, Error},
263 { InFront, North, West, Error, Error, Error},
264 { InFront, North, East, Error, Error, Error}
278 { InFront, North, West},
279 { InFront, North, West},
280 { InFront, North, Error},
281 { Error, Error, Error},
282 { InFront, West, Error},
283 { InFront, West, Error},
284 { InFront, Error,Error},
285 { Error, Error, Error},
286 { InFront, North, West},
287 { InFront, North, West},
288 { InFront, North, Error},
289 { Error, Error, Error},
290 { Error, Error, Error},
291 { Error, Error, Error},
292 { Error, Error, Error},
293 { Error, Error, Error},
294 { North, West, Error},
295 { North, West, Error},
296 { North, Error, Error},
297 { Error, Error, Error},
298 { West, Error, Error},
299 { West, Error, Error},
300 { Error, Error, Error},
301 { Error, Error, Error},
302 { North, West, Error},
303 { North, West, Error},
304 { North, Error, Error},
305 { Error, Error, Error},
306 { Error, Error, Error},
307 { Error, Error, Error},
308 { Error, Error, Error},
309 { Error, Error, Error},
310 { InFront, North, West},
311 { InFront, North, West},
312 { InFront, North, Error},
313 { Error, Error, Error},
314 { InFront, West, Error},
315 { InFront, West, Error},
316 { InFront, Error, Error},
317 { Error, Error, Error},
318 { InFront, North, West},
319 { InFront, North, West},
320 { InFront, North, Error}
358 {
Diff3D( 0, 0, 0),
Diff3D(0, -1, 1),
Diff3D(-1, 0, 1),
Diff3D( 0, 0, 2),
Diff3D( 0, 1, 1),
Diff3D( 1, 0, 1)},
359 {
Diff3D( 0, 1,-1),
Diff3D( 0, 0, 0),
Diff3D(-1, 1, 0),
Diff3D( 0, 1, 1),
Diff3D( 0, 2, 0),
Diff3D( 1, 1, 0)},
360 {
Diff3D( 1, 0,-1),
Diff3D( 1,-1, 0),
Diff3D( 0, 0, 0),
Diff3D( 1, 0, 1),
Diff3D( 1, 1, 0),
Diff3D( 2, 0, 0)},
361 {
Diff3D( 0, 0,-2),
Diff3D( 0,-1,-1),
Diff3D(-1, 0,-1),
Diff3D( 0, 0, 0),
Diff3D( 0, 1,-1),
Diff3D( 1, 0,-1)},
362 {
Diff3D( 0,-1,-1),
Diff3D( 0,-2, 0),
Diff3D(-1,-1, 0),
Diff3D( 0,-1, 1),
Diff3D( 0, 0, 0),
Diff3D( 1,-1, 0)},
363 {
Diff3D(-1, 0,-1),
Diff3D(-1,-1, 0),
Diff3D(-2, 0, 0),
Diff3D(-1, 0, 1),
Diff3D(-1, 1, 0),
Diff3D( 0, 0, 0) }
366 return d[fromCode][toCode];
374 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
413 return (diff[2] == 0) ? South : Error;
415 return (diff[2] == 0) ? North : Error;
421 return ((diff[1] == 0) && (diff[2] == 0)) ? West : Error;
423 return ((diff[1] == 0) && (diff[2] == 0)) ? East : Error;
476 namespace Neighborhood3DTwentySix
492 InFrontNorthWest = 0,
522 CausalFirst = InFrontNorthWest,
524 AntiCausalFirst = BehindSouthEast,
525 AntiCausalLast = East,
527 InitialDirection = InFrontNorthWest,
528 OppositeDirPrefix = -1,
532 static unsigned int directionBit(
Direction d)
534 static unsigned int b[] = {
535 1 << InFrontNorthWest,
537 1 << InFrontNorthEast,
541 1 << InFrontSouthWest,
543 1 << InFrontSouthEast,
554 1 << BehindNorthWest,
556 1 << BehindNorthEast,
560 1 << BehindSouthWest,
573 static unsigned int c[] = { 26, 17, 17, 0, 17, 11, 11, 0, 17, 11,
574 11, 0, 0, 0, 0, 0, 17, 11, 11, 0,
575 11, 7, 7, 0, 11, 7, 7, 0, 0, 0,
576 0, 0, 17, 11, 11, 0, 11, 7, 7, 0,
588 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
589 InFrontWest, InFront, InFrontEast,
590 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
592 NorthWest, North, NorthEast,
594 SouthWest, South, SouthEast,
596 BehindNorthWest, BehindNorth, BehindNorthEast,
597 BehindWest, Behind, BehindEast,
598 BehindSouthWest, BehindSouth, BehindSouthEast},
600 { InFrontNorthWest, InFrontNorth,
601 InFrontWest, InFront,
602 InFrontSouthWest, InFrontSouth,
608 BehindNorthWest, BehindNorth,
610 BehindSouthWest, BehindSouth,
611 Error, Error, Error, Error, Error, Error, Error, Error, Error},
613 { InFrontNorth, InFrontNorthEast,
614 InFront, InFrontEast,
615 InFrontSouth, InFrontSouthEast,
621 BehindNorth, BehindNorthEast,
623 BehindSouth, BehindSouthEast,
624 Error, Error, Error, Error, Error, Error, Error, Error, Error},
626 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
627 Error, Error, Error, Error, Error, Error, Error, Error,
628 Error, Error, Error, Error, Error, Error, Error, Error, Error},
631 InFrontWest, InFront, InFrontEast,
632 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
636 SouthWest, South, SouthEast,
639 BehindWest, Behind, BehindEast,
640 BehindSouthWest, BehindSouth, BehindSouthEast,
641 Error, Error, Error, Error, Error, Error, Error, Error, Error},
644 InFrontWest, InFront,
645 InFrontSouthWest, InFrontSouth,
653 BehindSouthWest, BehindSouth,
654 Error, Error, Error, Error, Error, Error, Error, Error, Error,
655 Error, Error, Error, Error, Error, Error},
658 InFront, InFrontEast,
659 InFrontSouth, InFrontSouthEast,
667 BehindSouth, BehindSouthEast,
668 Error, Error, Error, Error, Error, Error, Error, Error, Error,
669 Error, Error, Error, Error, Error, Error},
671 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
672 Error, Error, Error, Error, Error, Error, Error, Error,
673 Error, Error, Error, Error, Error, Error, Error, Error, Error},
675 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
676 InFrontWest, InFront, InFrontEast,
679 NorthWest, North, NorthEast,
683 BehindNorthWest, BehindNorth, BehindNorthEast,
684 BehindWest, Behind, BehindEast,
686 Error, Error, Error, Error, Error, Error, Error, Error, Error},
688 { InFrontNorthWest, InFrontNorth,
689 InFrontWest, InFront,
696 BehindNorthWest, BehindNorth,
699 Error, Error, Error, Error, Error, Error, Error, Error, Error,
700 Error, Error, Error, Error, Error, Error},
702 { InFrontNorth, InFrontNorthEast,
703 InFront, InFrontEast,
710 BehindNorth, BehindNorthEast,
713 Error, Error, Error, Error, Error, Error, Error, Error, Error,
714 Error, Error, Error, Error, Error, Error},
716 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
717 Error, Error, Error, Error, Error, Error, Error, Error,
718 Error, Error, Error, Error, Error, Error, Error, Error, Error},
720 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
721 Error, Error, Error, Error, Error, Error, Error, Error,
722 Error, Error, Error, Error, Error, Error, Error, Error, Error},
724 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
725 Error, Error, Error, Error, Error, Error, Error, Error,
726 Error, Error, Error, Error, Error, Error, Error, Error, Error},
728 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
729 Error, Error, Error, Error, Error, Error, Error, Error,
730 Error, Error, Error, Error, Error, Error, Error, Error, Error},
732 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
733 Error, Error, Error, Error, Error, Error, Error, Error,
734 Error, Error, Error, Error, Error, Error, Error, Error, Error},
740 NorthWest, North, NorthEast,
742 SouthWest, South, SouthEast,
744 BehindNorthWest, BehindNorth, BehindNorthEast,
745 BehindWest, Behind, BehindEast,
746 BehindSouthWest, BehindSouth, BehindSouthEast,
747 Error, Error, Error, Error, Error, Error, Error, Error, Error},
757 BehindNorthWest, BehindNorth,
759 BehindSouthWest, BehindSouth,
760 Error, Error, Error, Error, Error, Error, Error, Error, Error,
761 Error, Error, Error, Error, Error, Error},
771 BehindNorth, BehindNorthEast,
773 BehindSouth, BehindSouthEast,
774 Error, Error, Error, Error, Error, Error, Error, Error, Error,
775 Error, Error, Error, Error, Error, Error},
777 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
778 Error, Error, Error, Error, Error, Error, Error, Error,
779 Error, Error, Error, Error, Error, Error, Error, Error, Error},
787 SouthWest, South, SouthEast,
790 BehindWest, Behind, BehindEast,
791 BehindSouthWest, BehindSouth, BehindSouthEast,
792 Error, Error, Error, Error, Error, Error, Error, Error, Error,
793 Error, Error, Error, Error, Error, Error},
805 BehindSouthWest, BehindSouth,
806 Error, Error, Error, Error, Error, Error, Error, Error, Error,
807 Error, Error, Error, Error, Error, Error,
808 Error, Error, Error, Error},
820 BehindSouth, BehindSouthEast,
821 Error, Error, Error, Error, Error, Error, Error, Error, Error,
822 Error, Error, Error, Error, Error, Error,
823 Error, Error, Error, Error},
825 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
826 Error, Error, Error, Error, Error, Error, Error, Error,
827 Error, Error, Error, Error, Error, Error, Error, Error, Error},
833 NorthWest, North, NorthEast,
837 BehindNorthWest, BehindNorth, BehindNorthEast,
838 BehindWest, Behind, BehindEast,
840 Error, Error, Error, Error, Error, Error, Error, Error, Error,
841 Error, Error, Error, Error, Error, Error},
851 BehindNorthWest, BehindNorth,
854 Error, Error, Error, Error, Error, Error, Error, Error, Error,
855 Error, Error, Error, Error, Error, Error,
856 Error, Error, Error, Error},
866 BehindNorth, BehindNorthEast,
869 Error, Error, Error, Error, Error, Error, Error, Error, Error,
870 Error, Error, Error, Error, Error, Error,
871 Error, Error, Error, Error},
873 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
874 Error, Error, Error, Error, Error, Error, Error, Error,
875 Error, Error, Error, Error, Error, Error, Error, Error, Error},
877 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
878 Error, Error, Error, Error, Error, Error, Error, Error,
879 Error, Error, Error, Error, Error, Error, Error, Error, Error},
881 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
882 Error, Error, Error, Error, Error, Error, Error, Error,
883 Error, Error, Error, Error, Error, Error, Error, Error, Error},
885 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
886 Error, Error, Error, Error, Error, Error, Error, Error,
887 Error, Error, Error, Error, Error, Error, Error, Error, Error},
889 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
890 Error, Error, Error, Error, Error, Error, Error, Error,
891 Error, Error, Error, Error, Error, Error, Error, Error, Error},
893 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
894 InFrontWest, InFront, InFrontEast,
895 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
897 NorthWest, North, NorthEast,
899 SouthWest, South, SouthEast,
904 Error, Error, Error, Error, Error, Error, Error, Error, Error},
906 { InFrontNorthWest, InFrontNorth,
907 InFrontWest, InFront,
908 InFrontSouthWest, InFrontSouth,
917 Error, Error, Error, Error, Error, Error, Error, Error, Error,
918 Error, Error, Error, Error, Error, Error},
920 { InFrontNorth, InFrontNorthEast,
921 InFront, InFrontEast,
922 InFrontSouth, InFrontSouthEast,
931 Error, Error, Error, Error, Error, Error, Error, Error, Error,
932 Error, Error, Error, Error, Error, Error},
934 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
935 Error, Error, Error, Error, Error, Error, Error, Error,
936 Error, Error, Error, Error, Error, Error, Error, Error, Error},
939 InFrontWest, InFront, InFrontEast,
940 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
944 SouthWest, South, SouthEast,
949 Error, Error, Error, Error, Error, Error, Error, Error, Error,
950 Error, Error, Error, Error, Error, Error},
953 InFrontWest, InFront,
954 InFrontSouthWest, InFrontSouth,
963 Error, Error, Error, Error, Error, Error, Error, Error, Error,
964 Error, Error, Error, Error, Error, Error,
965 Error, Error, Error, Error},
968 InFront, InFrontEast,
969 InFrontSouth, InFrontSouthEast,
978 Error, Error, Error, Error, Error, Error, Error, Error, Error,
979 Error, Error, Error, Error, Error, Error,
980 Error, Error, Error, Error},
982 { Error, Error, Error, Error, Error, Error, Error, Error, Error,
983 Error, Error, Error, Error, Error, Error, Error, Error,
984 Error, Error, Error, Error, Error, Error, Error, Error, Error},
986 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
987 InFrontWest, InFront, InFrontEast,
990 NorthWest, North, NorthEast,
997 Error, Error, Error, Error, Error, Error, Error, Error, Error,
998 Error, Error, Error, Error, Error, Error},
1000 { InFrontNorthWest, InFrontNorth,
1001 InFrontWest, InFront,
1011 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1012 Error, Error, Error, Error, Error, Error,
1013 Error, Error, Error, Error},
1015 { InFrontNorth, InFrontNorthEast,
1016 InFront, InFrontEast,
1026 Error, Error, Error, Error, Error, Error, Error, Error, Error,
1027 Error, Error, Error, Error, Error, Error,
1028 Error, Error, Error, Error}
1043 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1044 InFrontWest, InFront, InFrontEast,
1045 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1047 NorthWest, North, NorthEast,
1050 { InFrontNorthWest, InFrontNorth,
1051 InFrontWest, InFront,
1052 InFrontSouthWest, InFrontSouth,
1056 Error, Error, Error, Error},
1058 { InFrontNorth,InFrontNorthEast,
1059 InFront, InFrontEast,
1060 InFrontSouth, InFrontSouthEast,
1064 Error, Error, Error, Error, Error},
1066 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1069 InFrontWest, InFront, InFrontEast,
1070 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1074 Error, Error, Error, Error, Error, Error},
1077 InFrontWest, InFront,
1078 InFrontSouthWest, InFrontSouth,
1082 Error, Error, Error, Error, Error, Error, Error, Error},
1085 InFront, InFrontEast,
1086 InFrontSouth, InFrontSouthEast,
1090 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1092 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1094 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1095 InFrontWest, InFront, InFrontEast,
1098 NorthWest, North, NorthEast,
1100 Error, Error, Error},
1102 { InFrontNorthWest, InFrontNorth,
1103 InFrontWest, InFront,
1108 Error, Error, Error,Error, Error, Error},
1110 { InFrontNorth, InFrontNorthEast,
1111 InFront, InFrontEast,
1116 Error, Error, Error, Error, Error, Error, Error},
1118 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1120 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1122 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1124 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1126 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1132 NorthWest, North, NorthEast,
1134 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1142 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1150 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1152 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1160 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1168 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1170 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1172 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1178 NorthWest, North, NorthEast,
1180 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1188 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1196 Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1198 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1200 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1202 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1204 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1206 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1208 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1209 InFrontWest, InFront, InFrontEast,
1210 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1212 NorthWest, North, NorthEast,
1215 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1216 InFrontWest, InFront, InFrontEast,
1217 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1219 NorthWest, North, NorthEast,
1222 { InFrontNorth, InFrontNorthEast,
1223 InFront, InFrontEast,
1224 InFrontSouth, InFrontSouthEast,
1228 Error, Error, Error, Error, Error},
1230 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1233 InFrontWest, InFront, InFrontEast,
1234 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1238 Error, Error, Error, Error, Error, Error},
1241 InFrontWest, InFront,
1242 InFrontSouthWest, InFrontSouth,
1246 Error, Error, Error, Error, Error, Error, Error, Error},
1249 InFront, InFrontEast,
1250 InFrontSouth, InFrontSouthEast,
1254 Error, Error, Error, Error, Error, Error, Error, Error, Error},
1256 { Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error},
1258 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1259 InFrontWest, InFront, InFrontEast,
1260 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1262 NorthWest, North, NorthEast,
1265 { InFrontNorthWest, InFrontNorth, InFrontNorthEast,
1266 InFrontWest, InFront, InFrontEast,
1267 InFrontSouthWest, InFrontSouth, InFrontSouthEast,
1269 NorthWest, North, NorthEast,
1272 { InFrontNorth, InFrontNorthEast,
1273 InFront, InFrontEast,
1278 Error, Error, Error, Error, Error, Error, Error}
1368 return diff(toCode)-
diff(fromCode);
1376 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
1411 vigra_fail(
"NeighborCode3D::code(): Internal error -- invalid direction code.");
1427 case -1:
return InFrontNorthWest;
1428 case 0:
return NorthWest;
1429 case 1:
return BehindNorthWest;
1433 case -1:
return InFrontWest;
1434 case 0:
return West;
1435 case 1:
return BehindWest;
1439 case -1:
return InFrontSouthWest;
1440 case 0:
return SouthWest;
1441 case 1:
return BehindSouthWest;
1448 case -1:
return InFrontNorth;
1449 case 0:
return North;
1450 case 1:
return BehindNorth;
1454 case -1:
return InFront;
1455 case 1:
return Behind;
1459 case -1:
return InFrontSouth;
1460 case 0:
return South;
1461 case 1:
return BehindSouth;
1468 case -1:
return InFrontNorthEast;
1469 case 0:
return NorthEast;
1470 case 1:
return BehindNorthEast;
1474 case -1:
return InFrontEast;
1475 case 0:
return East;
1476 case 1:
return BehindEast;
1480 case -1:
return InFrontSouthEast;
1481 case 0:
return SouthEast;
1482 case 1:
return BehindSouthEast;
static Diff3D const & frontBottom()
Definition: voxelneighborhood.hxx:1508
static int dX(int code)
Definition: voxelneighborhood.hxx:1387
static Direction code(Diff3D const &diff)
Definition: voxelneighborhood.hxx:396
static Diff3D const & rearBottomRight()
Definition: voxelneighborhood.hxx:1528
static Diff3D const & diff(int code)
Definition: voxelneighborhood.hxx:344
static int dZ(int code)
Definition: voxelneighborhood.hxx:389
vigra::TinyVector< int, 3 > Diff3D
3-dimensional difference vector
Definition: voxelneighborhood.hxx:55
static Diff3D const & infrontNorthEast()
Definition: voxelneighborhood.hxx:1534
static int dY(Direction code)
Definition: voxelneighborhood.hxx:380
static Direction code(Diff3D const &diff)
Definition: voxelneighborhood.hxx:1420
static Diff3D const & rearRight()
Definition: voxelneighborhood.hxx:1525
static Diff3D const & frontTopLeft()
Definition: voxelneighborhood.hxx:1501
static Diff3D const & front()
Definition: voxelneighborhood.hxx:439
static Diff3D const & rearTopLeft()
Definition: voxelneighborhood.hxx:1520
static Diff3D const & south()
Definition: voxelneighborhood.hxx:444
static Diff3D const & diff(Direction code)
Definition: voxelneighborhood.hxx:328
static Diff3D const & frontBottomLeft()
Definition: voxelneighborhood.hxx:1507
static const Direction East
Definition: voxelneighborhood.hxx:455
static Diff3D const & behindWest()
Definition: voxelneighborhood.hxx:1556
static const Direction West
Definition: voxelneighborhood.hxx:1580
static Diff3D const & northEast()
Definition: voxelneighborhood.hxx:1544
AtImageBorder AtVolumeBorder
Encode whether a voxel is near the volume border.
Definition: voxelneighborhood.hxx:72
static const Direction East
Definition: voxelneighborhood.hxx:1581
static Direction nearBorderDirectionsCausal(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:275
Direction
Definition: voxelneighborhood.hxx:172
static const Direction DirectionCount
Definition: voxelneighborhood.hxx:461
static Diff3D const & rear()
Definition: voxelneighborhood.hxx:1524
static bool isDiagonal(Direction dir)
Definition: voxelneighborhood.hxx:1493
static const Direction InFrontNorth
Definition: voxelneighborhood.hxx:1568
static const Direction InFront
Definition: voxelneighborhood.hxx:460
Neighborhood3DTwentySix::NeighborCode3D NeighborCode3DTwentySix
Definition: voxelneighborhood.hxx:1602
static Diff3D const & behindSouthWest()
Definition: voxelneighborhood.hxx:1557
static const Direction InFrontSouthWest
Definition: voxelneighborhood.hxx:1573
static Diff3D const & infrontSouthEast()
Definition: voxelneighborhood.hxx:1540
static const Direction South
Definition: voxelneighborhood.hxx:1583
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:1522
static const Direction InFront
Definition: voxelneighborhood.hxx:1571
static Diff3D const & frontRight()
Definition: voxelneighborhood.hxx:1506
static Diff3D const & north()
Definition: voxelneighborhood.hxx:442
static const Direction InFrontSouth
Definition: voxelneighborhood.hxx:1574
static const Direction North
Definition: voxelneighborhood.hxx:1578
static Diff3D const & south()
Definition: voxelneighborhood.hxx:1548
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:1526
static Diff3D const & left()
Definition: voxelneighborhood.hxx:436
static Diff3D const & east()
Definition: voxelneighborhood.hxx:1546
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:1374
static const Direction SouthWest
Definition: voxelneighborhood.hxx:1582
static const Direction Behind
Definition: voxelneighborhood.hxx:459
static Diff3D const & infrontNorthWest()
Definition: voxelneighborhood.hxx:1532
Definition: pixelneighborhood.hxx:73
static Diff3D const & west()
Definition: voxelneighborhood.hxx:1545
static int diff(Direction code, int dim)
Definition: voxelneighborhood.hxx:1326
static Diff3D const & topRight()
Definition: voxelneighborhood.hxx:1513
NeighborCode3D::Direction Direction
Definition: voxelneighborhood.hxx:453
static const Direction InFrontSouthEast
Definition: voxelneighborhood.hxx:1575
static Diff3D const & diff(int code)
Definition: voxelneighborhood.hxx:1323
static Diff3D const & bottom()
Definition: voxelneighborhood.hxx:1517
static Diff3D const & behindNorthEast()
Definition: voxelneighborhood.hxx:1553
static Diff3D const & rearLeft()
Definition: voxelneighborhood.hxx:1523
static bool isDiagonal(Direction)
Definition: voxelneighborhood.hxx:432
static int dY(int code)
Definition: voxelneighborhood.hxx:387
static Diff3D const & rear()
Definition: voxelneighborhood.hxx:438
static Diff3D const & relativeDiff(Direction fromCode, Direction toCode)
Definition: voxelneighborhood.hxx:353
static Diff3D const & infrontSouthWest()
Definition: voxelneighborhood.hxx:1538
static Diff3D const & northWest()
Definition: voxelneighborhood.hxx:1542
static Diff3D const & front()
Definition: voxelneighborhood.hxx:1505
static Diff3D const & southEast()
Definition: voxelneighborhood.hxx:1549
static const Direction BehindNorthEast
Definition: voxelneighborhood.hxx:1588
static int dZ(int code)
Definition: voxelneighborhood.hxx:1391
static Diff3D const & behindNorth()
Definition: voxelneighborhood.hxx:1552
static const Direction NorthEast
Definition: voxelneighborhood.hxx:1579
static Diff3D const & left()
Definition: voxelneighborhood.hxx:1514
static Diff3D const & behind()
Definition: voxelneighborhood.hxx:1555
static Diff3D const & rearBottom()
Definition: voxelneighborhood.hxx:1527
static const Direction InFrontNorthWest
Definition: voxelneighborhood.hxx:1567
static int dX(Direction code)
Definition: voxelneighborhood.hxx:378
static int dY(Direction code)
Definition: voxelneighborhood.hxx:1382
static Diff3D const & infrontEast()
Definition: voxelneighborhood.hxx:1537
static Diff3D const & behindSouthEast()
Definition: voxelneighborhood.hxx:1559
static Diff3D const & west()
Definition: voxelneighborhood.hxx:443
static Diff3D const & bottomRight()
Definition: voxelneighborhood.hxx:1518
static const Direction BehindWest
Definition: voxelneighborhood.hxx:1589
static Diff3D const & east()
Definition: voxelneighborhood.hxx:441
static Diff3D const & frontTop()
Definition: voxelneighborhood.hxx:1502
static const Direction InFrontEast
Definition: voxelneighborhood.hxx:1572
static Diff3D const & north()
Definition: voxelneighborhood.hxx:1543
static unsigned int nearBorderDirectionCount(AtVolumeBorder b)
Definition: voxelneighborhood.hxx:571
static unsigned int nearBorderDirectionCount(AtVolumeBorder b)
Definition: voxelneighborhood.hxx:206
Encapsulation of direction management of neighbors for a 3D 26-neighborhood.
Definition: voxelneighborhood.hxx:481
static Diff3D const & top()
Definition: voxelneighborhood.hxx:1512
static Diff3D const & top()
Definition: voxelneighborhood.hxx:435
static const Direction InFrontNorthEast
Definition: voxelneighborhood.hxx:1569
static Diff3D const & frontLeft()
Definition: voxelneighborhood.hxx:1504
static const Direction InFrontWest
Definition: voxelneighborhood.hxx:1570
static const Direction BehindNorth
Definition: voxelneighborhood.hxx:1587
Class for fixed size vectors.This class contains an array of size SIZE of the specified VALUETYPE...
Definition: accessor.hxx:939
static int dZ(Direction code)
Definition: voxelneighborhood.hxx:1384
static const Direction Behind
Definition: voxelneighborhood.hxx:1590
static const Direction NorthWest
Definition: voxelneighborhood.hxx:1577
static const Direction West
Definition: voxelneighborhood.hxx:457
static Diff3D const & topLeft()
Definition: voxelneighborhood.hxx:1511
static Diff3D const & rearTop()
Definition: voxelneighborhood.hxx:1521
static const Direction BehindSouth
Definition: voxelneighborhood.hxx:1593
static Diff3D const & infrontNorth()
Definition: voxelneighborhood.hxx:1533
static Diff3D const & behindNorthWest()
Definition: voxelneighborhood.hxx:1551
Neighborhood3DSix::NeighborCode3D NeighborCode3DSix
Definition: voxelneighborhood.hxx:468
static int dY(int code)
Definition: voxelneighborhood.hxx:1389
static const Direction BehindSouthEast
Definition: voxelneighborhood.hxx:1594
Definition: pixelneighborhood.hxx:74
static Diff3D const & bottom()
Definition: voxelneighborhood.hxx:437
Direction
Definition: voxelneighborhood.hxx:490
static Diff3D const & infront()
Definition: voxelneighborhood.hxx:1536
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:1509
static const Direction BehindSouthWest
Definition: voxelneighborhood.hxx:1592
NeighborCode3D::Direction Direction
Definition: voxelneighborhood.hxx:1565
static Diff3D const & behindSouth()
Definition: voxelneighborhood.hxx:1558
static Diff3D const & bottomLeft()
Definition: voxelneighborhood.hxx:1516
static const Direction DirectionCount
Definition: voxelneighborhood.hxx:1596
static Diff3D const & infront()
Definition: voxelneighborhood.hxx:446
static const Direction BehindEast
Definition: voxelneighborhood.hxx:1591
static const Direction SouthEast
Definition: voxelneighborhood.hxx:1584
static int dZ(Direction code)
Definition: voxelneighborhood.hxx:382
Encapsulation of direction management of neighbors for a 3D 6-neighborhood.
Definition: voxelneighborhood.hxx:163
static int dX(int code)
Definition: voxelneighborhood.hxx:385
static Diff3D const & behind()
Definition: voxelneighborhood.hxx:445
static Direction nearBorderDirections(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:584
static Diff3D const & southWest()
Definition: voxelneighborhood.hxx:1547
static Diff3D const & diff(Direction code)
Definition: voxelneighborhood.hxx:1286
static Diff3D const & right()
Definition: voxelneighborhood.hxx:1515
static const Direction North
Definition: voxelneighborhood.hxx:456
Definition: pixelneighborhood.hxx:70
static Diff3D const & frontTopRight()
Definition: voxelneighborhood.hxx:1503
static Diff3D const & infrontWest()
Definition: voxelneighborhood.hxx:1535
static Diff3D const & infrontSouth()
Definition: voxelneighborhood.hxx:1539
Definition: pixelneighborhood.hxx:71
Definition: pixelneighborhood.hxx:72
static Direction nearBorderDirectionsCausal(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:1039
static Diff3D const & behindEast()
Definition: voxelneighborhood.hxx:1554
static const Direction South
Definition: voxelneighborhood.hxx:458
static const Direction BehindNorthWest
Definition: voxelneighborhood.hxx:1586
static int diff(Direction code, int dim)
Definition: voxelneighborhood.hxx:347
static Diff3D const relativeDiff(Direction fromCode, Direction toCode)
Definition: voxelneighborhood.hxx:1332
static Diff3D const & right()
Definition: voxelneighborhood.hxx:434
static Direction nearBorderDirections(AtVolumeBorder b, int index)
Definition: voxelneighborhood.hxx:219
static Diff3D const & relativeDiff(int fromCode, int toCode)
Definition: voxelneighborhood.hxx:372
static int dX(Direction code)
Definition: voxelneighborhood.hxx:1380
static Direction code(Neighborhood3DSix::Direction d)
Definition: voxelneighborhood.hxx:1395