ITK  5.2.0
Insight Toolkit
itkPixelTraits.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef itkPixelTraits_h
29 #define itkPixelTraits_h
30 
31 #include "itkMacro.h"
32 
33 namespace itk
34 {
44 template <typename TPixelType>
46 {
47 public:
49  static constexpr unsigned int Dimension = TPixelType::Length;
50 
52  using ValueType = typename TPixelType::ValueType;
53 };
54 
56 
61 template <>
62 class PixelTraits<bool>
63 {
64 public:
65  static constexpr unsigned int Dimension = 1;
66  using ValueType = bool;
67 };
68 
69 template <>
70 class PixelTraits<char>
71 {
72 public:
73  static constexpr unsigned int Dimension = 1;
74  using ValueType = char;
75 };
76 
77 template <>
78 class PixelTraits<signed char>
79 {
80 public:
81  static constexpr unsigned int Dimension = 1;
82  using ValueType = char;
83 };
84 
85 template <>
86 class PixelTraits<unsigned char>
87 {
88 public:
89  static constexpr unsigned int Dimension = 1;
90  using ValueType = unsigned char;
91 };
92 
93 template <>
94 class PixelTraits<short>
95 {
96 public:
97  static constexpr unsigned int Dimension = 1;
98  using ValueType = short;
99 };
100 
101 template <>
102 class PixelTraits<unsigned short>
103 {
104 public:
105  static constexpr unsigned int Dimension = 1;
106  using ValueType = unsigned short;
107 };
108 
109 template <>
110 class PixelTraits<int>
111 {
112 public:
113  static constexpr unsigned int Dimension = 1;
114  using ValueType = int;
115 };
116 
117 template <>
118 class PixelTraits<unsigned int>
119 {
120 public:
121  static constexpr unsigned int Dimension = 1;
122  using ValueType = unsigned int;
123 };
124 
125 template <>
126 class PixelTraits<long>
127 {
128 public:
129  static constexpr unsigned int Dimension = 1;
130  using ValueType = long;
131 };
132 
133 template <>
134 class PixelTraits<unsigned long>
135 {
136 public:
137  static constexpr unsigned int Dimension = 1;
138  using ValueType = unsigned long;
139 };
140 
141 
142 template <>
143 class PixelTraits<long long>
144 {
145 public:
146  static constexpr unsigned int Dimension = 1;
147  using ValueType = long long;
148 };
149 
150 template <>
151 class PixelTraits<unsigned long long>
152 {
153 public:
154  static constexpr unsigned int Dimension = 1;
155  using ValueType = unsigned long long;
156 };
157 
158 template <>
159 class PixelTraits<float>
160 {
161 public:
162  static constexpr unsigned int Dimension = 1;
163  using ValueType = float;
164 };
165 
166 template <>
167 class PixelTraits<double>
168 {
169 public:
170  static constexpr unsigned int Dimension = 1;
171  using ValueType = double;
172 };
173 
175 
194 template <typename TValue1, typename TValue2>
196 {
197 public:
198  using ValueType = TValue1;
199 };
200 
202 
207 template <>
208 class JoinTraits<bool, bool>
209 {
210 public:
211  using ValueType = bool;
212 };
213 
214 template <>
215 class JoinTraits<bool, char>
216 {
217 public:
218  using ValueType = char;
219 };
220 
221 template <>
222 class JoinTraits<bool, unsigned char>
223 {
224 public:
225  using ValueType = unsigned char;
226 };
227 
228 template <>
229 class JoinTraits<bool, short>
230 {
231 public:
232  using ValueType = short;
233 };
234 
235 template <>
236 class JoinTraits<bool, unsigned short>
237 {
238 public:
239  using ValueType = unsigned short;
240 };
241 
242 template <>
243 class JoinTraits<bool, int>
244 {
245 public:
246  using ValueType = int;
247 };
248 
249 template <>
250 class JoinTraits<bool, unsigned int>
251 {
252 public:
253  using ValueType = unsigned int;
254 };
255 
256 template <>
257 class JoinTraits<bool, long>
258 {
259 public:
260  using ValueType = long;
261 };
262 
263 template <>
264 class JoinTraits<bool, unsigned long>
265 {
266 public:
267  using ValueType = unsigned long;
268 };
269 
270 
271 template <>
272 class JoinTraits<bool, long long>
273 {
274 public:
275  using ValueType = long long;
276 };
277 
278 template <>
279 class JoinTraits<bool, unsigned long long>
280 {
281 public:
282  using ValueType = unsigned long long;
283 };
284 
285 template <>
286 class JoinTraits<bool, float>
287 {
288 public:
289  using ValueType = float;
290 };
291 
292 template <>
293 class JoinTraits<bool, double>
294 {
295 public:
296  using ValueType = double;
297 };
298 
303 template <>
304 class JoinTraits<char, bool>
305 {
306 public:
307  using ValueType = char;
308 };
309 
310 template <>
311 class JoinTraits<char, char>
312 {
313 public:
314  using ValueType = char;
315 };
316 
317 template <>
318 class JoinTraits<char, unsigned char>
319 {
320 public:
321  using ValueType = short;
322 };
323 
324 template <>
325 class JoinTraits<char, short>
326 {
327 public:
328  using ValueType = short;
329 };
330 
331 template <>
332 class JoinTraits<char, unsigned short>
333 {
334 public:
335  using ValueType = int;
336 };
337 
338 template <>
339 class JoinTraits<char, int>
340 {
341 public:
342  using ValueType = int;
343 };
344 
345 template <>
346 class JoinTraits<char, unsigned int>
347 {
348 public:
349  // unsigned int & unsigned long may be the same size, so promote to float
350  using ValueType = float;
351 };
352 
353 template <>
354 class JoinTraits<char, long>
355 {
356 public:
357  using ValueType = long;
358 };
359 
360 template <>
361 class JoinTraits<char, unsigned long>
362 {
363 public:
364  using ValueType = float;
365 };
366 
367 template <>
368 class JoinTraits<char, long long>
369 {
370 public:
371  using ValueType = long long;
372 };
373 
374 template <>
375 class JoinTraits<char, unsigned long long>
376 {
377 public:
378  using ValueType = double;
379 };
380 
381 template <>
382 class JoinTraits<char, float>
383 {
384 public:
385  using ValueType = float;
386 };
387 
388 template <>
389 class JoinTraits<char, double>
390 {
391 public:
392  using ValueType = double;
393 };
394 
399 template <>
400 class JoinTraits<unsigned char, bool>
401 {
402 public:
403  using ValueType = unsigned char;
404 };
405 
406 template <>
407 class JoinTraits<unsigned char, char>
408 {
409 public:
410  using ValueType = short;
411 };
412 
413 template <>
414 class JoinTraits<unsigned char, unsigned char>
415 {
416 public:
417  using ValueType = unsigned char;
418 };
419 
420 template <>
421 class JoinTraits<unsigned char, short>
422 {
423 public:
424  using ValueType = short;
425 };
426 
427 template <>
428 class JoinTraits<unsigned char, unsigned short>
429 {
430 public:
431  using ValueType = unsigned short;
432 };
433 
434 template <>
435 class JoinTraits<unsigned char, int>
436 {
437 public:
438  using ValueType = int;
439 };
440 
441 template <>
442 class JoinTraits<unsigned char, unsigned int>
443 {
444 public:
445  using ValueType = unsigned int;
446 };
447 
448 template <>
449 class JoinTraits<unsigned char, long>
450 {
451 public:
452  using ValueType = long;
453 };
454 
455 template <>
456 class JoinTraits<unsigned char, unsigned long>
457 {
458 public:
459  using ValueType = unsigned long;
460 };
461 
462 template <>
463 class JoinTraits<unsigned char, long long>
464 {
465 public:
466  using ValueType = long long;
467 };
468 
469 template <>
470 class JoinTraits<unsigned char, unsigned long long>
471 {
472 public:
473  using ValueType = unsigned long long;
474 };
475 
476 template <>
477 class JoinTraits<unsigned char, float>
478 {
479 public:
480  using ValueType = float;
481 };
482 
483 template <>
484 class JoinTraits<unsigned char, double>
485 {
486 public:
487  using ValueType = double;
488 };
489 
494 template <>
495 class JoinTraits<short, bool>
496 {
497 public:
498  using ValueType = short;
499 };
500 
501 template <>
502 class JoinTraits<short, char>
503 {
504 public:
505  using ValueType = short;
506 };
507 
508 template <>
509 class JoinTraits<short, unsigned char>
510 {
511 public:
512  using ValueType = short;
513 };
514 
515 template <>
516 class JoinTraits<short, short>
517 {
518 public:
519  using ValueType = short;
520 };
521 
522 template <>
523 class JoinTraits<short, unsigned short>
524 {
525 public:
526  using ValueType = int;
527 };
528 
529 template <>
530 class JoinTraits<short, int>
531 {
532 public:
533  using ValueType = int;
534 };
535 
536 template <>
537 class JoinTraits<short, unsigned int>
538 {
539 public:
540  // unsigned int & unsigned long may be the same size, so promote to float
541  using ValueType = float;
542 };
543 
544 template <>
545 class JoinTraits<short, long>
546 {
547 public:
548  using ValueType = long;
549 };
550 
551 template <>
552 class JoinTraits<short, unsigned long>
553 {
554 public:
555  using ValueType = float;
556 };
557 
558 template <>
559 class JoinTraits<short, long long>
560 {
561 public:
562  using ValueType = long long;
563 };
564 
565 template <>
566 class JoinTraits<short, unsigned long long>
567 {
568 public:
569  using ValueType = double;
570 };
571 
572 template <>
573 class JoinTraits<short, float>
574 {
575 public:
576  using ValueType = float;
577 };
578 
579 template <>
580 class JoinTraits<short, double>
581 {
582 public:
583  using ValueType = double;
584 };
585 
590 template <>
591 class JoinTraits<unsigned short, bool>
592 {
593 public:
594  using ValueType = unsigned short;
595 };
596 
597 template <>
598 class JoinTraits<unsigned short, char>
599 {
600 public:
601  using ValueType = int;
602 };
603 
604 template <>
605 class JoinTraits<unsigned short, unsigned char>
606 {
607 public:
608  using ValueType = unsigned short;
609 };
610 
611 template <>
612 class JoinTraits<unsigned short, short>
613 {
614 public:
615  using ValueType = int;
616 };
617 
618 template <>
619 class JoinTraits<unsigned short, unsigned short>
620 {
621 public:
622  using ValueType = unsigned short;
623 };
624 
625 template <>
626 class JoinTraits<unsigned short, int>
627 {
628 public:
629  using ValueType = int;
630 };
631 
632 template <>
633 class JoinTraits<unsigned short, unsigned int>
634 {
635 public:
636  using ValueType = unsigned int;
637 };
638 
639 template <>
640 class JoinTraits<unsigned short, long>
641 {
642 public:
643  using ValueType = long;
644 };
645 
646 template <>
647 class JoinTraits<unsigned short, unsigned long>
648 {
649 public:
650  using ValueType = unsigned long;
651 };
652 
653 template <>
654 class JoinTraits<unsigned short, long long>
655 {
656 public:
657  using ValueType = long long;
658 };
659 
660 template <>
661 class JoinTraits<unsigned short, unsigned long long>
662 {
663 public:
664  using ValueType = unsigned long long;
665 };
666 
667 template <>
668 class JoinTraits<unsigned short, float>
669 {
670 public:
671  using ValueType = float;
672 };
673 
674 template <>
675 class JoinTraits<unsigned short, double>
676 {
677 public:
678  using ValueType = double;
679 };
680 
685 template <>
686 class JoinTraits<int, bool>
687 {
688 public:
689  using ValueType = int;
690 };
691 
692 template <>
693 class JoinTraits<int, char>
694 {
695 public:
696  using ValueType = int;
697 };
698 
699 template <>
700 class JoinTraits<int, unsigned char>
701 {
702 public:
703  using ValueType = int;
704 };
705 
706 template <>
707 class JoinTraits<int, short>
708 {
709 public:
710  using ValueType = int;
711 };
712 
713 template <>
714 class JoinTraits<int, unsigned short>
715 {
716 public:
717  using ValueType = int;
718 };
719 
720 template <>
721 class JoinTraits<int, int>
722 {
723 public:
724  using ValueType = int;
725 };
726 
727 template <>
728 class JoinTraits<int, unsigned int>
729 {
730 public:
731  // unsigned int & unsigned long may be the same size, so promote to float
732  using ValueType = float;
733 };
734 
735 template <>
736 class JoinTraits<int, long>
737 {
738 public:
739  using ValueType = long;
740 };
741 
742 template <>
743 class JoinTraits<int, unsigned long>
744 {
745 public:
746  using ValueType = float;
747 };
748 
749 template <>
750 class JoinTraits<int, long long>
751 {
752 public:
753  using ValueType = long long;
754 };
755 
756 template <>
757 class JoinTraits<int, unsigned long long>
758 {
759 public:
760  using ValueType = double;
761 };
762 
763 template <>
764 class JoinTraits<int, float>
765 {
766 public:
767  using ValueType = float;
768 };
769 
770 template <>
771 class JoinTraits<int, double>
772 {
773 public:
774  using ValueType = double;
775 };
776 
781 template <>
782 class JoinTraits<unsigned int, bool>
783 {
784 public:
785  using ValueType = unsigned int;
786 };
787 
788 template <>
789 class JoinTraits<unsigned int, char>
790 {
791 public:
792  // unsigned int & unsigned long may be the same size, so promote to float
793  using ValueType = float;
794 };
795 
796 template <>
797 class JoinTraits<unsigned int, unsigned char>
798 {
799 public:
800  using ValueType = unsigned int;
801 };
802 
803 template <>
804 class JoinTraits<unsigned int, short>
805 {
806 public:
807  // unsigned int & unsigned long may be the same size, so promote to float
808  using ValueType = float;
809 };
810 
811 template <>
812 class JoinTraits<unsigned int, unsigned short>
813 {
814 public:
815  using ValueType = unsigned int;
816 };
817 
818 template <>
819 class JoinTraits<unsigned int, int>
820 {
821 public:
822  // unsigned int & unsigned long may be the same size, so promote to float
823  using ValueType = float;
824 };
825 
826 template <>
827 class JoinTraits<unsigned int, unsigned int>
828 {
829 public:
830  using ValueType = unsigned int;
831 };
832 
833 template <>
834 class JoinTraits<unsigned int, long>
835 {
836 public:
837  using ValueType = float;
838 };
839 
840 template <>
841 class JoinTraits<unsigned int, unsigned long>
842 {
843 public:
844  using ValueType = unsigned long;
845 };
846 
847 template <>
848 class JoinTraits<unsigned int, long long>
849 {
850 public:
851  using ValueType = long long;
852 };
853 
854 template <>
855 class JoinTraits<unsigned int, unsigned long long>
856 {
857 public:
858  using ValueType = unsigned long long;
859 };
860 
861 template <>
862 class JoinTraits<unsigned int, float>
863 {
864 public:
865  using ValueType = float;
866 };
867 
868 template <>
869 class JoinTraits<unsigned int, double>
870 {
871 public:
872  using ValueType = double;
873 };
874 
879 template <>
880 class JoinTraits<long, bool>
881 {
882 public:
883  using ValueType = long;
884 };
885 
886 template <>
887 class JoinTraits<long, char>
888 {
889 public:
890  using ValueType = long;
891 };
892 
893 template <>
894 class JoinTraits<long, unsigned char>
895 {
896 public:
897  using ValueType = long;
898 };
899 
900 template <>
901 class JoinTraits<long, short>
902 {
903 public:
904  using ValueType = long;
905 };
906 
907 template <>
908 class JoinTraits<long, unsigned short>
909 {
910 public:
911  using ValueType = long;
912 };
913 
914 template <>
915 class JoinTraits<long, int>
916 {
917 public:
918  using ValueType = long;
919 };
920 
921 template <>
922 class JoinTraits<long, unsigned int>
923 {
924 public:
925  using ValueType = float;
926 };
927 
928 template <>
929 class JoinTraits<long, long>
930 {
931 public:
932  using ValueType = long;
933 };
934 
935 template <>
936 class JoinTraits<long, unsigned long>
937 {
938 public:
939  using ValueType = float;
940 };
941 
942 
943 template <>
944 class JoinTraits<long, long long>
945 {
946 public:
947  using ValueType = long long;
948 };
949 
950 template <>
951 class JoinTraits<long, unsigned long long>
952 {
953 public:
954  using ValueType = double;
955 };
956 
957 template <>
958 class JoinTraits<long, float>
959 {
960 public:
961  using ValueType = float;
962 };
963 
964 template <>
965 class JoinTraits<long, double>
966 {
967 public:
968  using ValueType = double;
969 };
970 
975 template <>
976 class JoinTraits<unsigned long, bool>
977 {
978 public:
979  using ValueType = unsigned long;
980 };
981 
982 template <>
983 class JoinTraits<unsigned long, char>
984 {
985 public:
986  using ValueType = float;
987 };
988 
989 template <>
990 class JoinTraits<unsigned long, unsigned char>
991 {
992 public:
993  using ValueType = unsigned long;
994 };
995 
996 template <>
997 class JoinTraits<unsigned long, short>
998 {
999 public:
1000  using ValueType = float;
1001 };
1002 
1003 template <>
1004 class JoinTraits<unsigned long, unsigned short>
1005 {
1006 public:
1007  using ValueType = unsigned long;
1008 };
1009 
1010 template <>
1011 class JoinTraits<unsigned long, int>
1012 {
1013 public:
1014  using ValueType = float;
1015 };
1016 
1017 template <>
1018 class JoinTraits<unsigned long, unsigned int>
1019 {
1020 public:
1021  using ValueType = unsigned long;
1022 };
1023 
1024 template <>
1025 class JoinTraits<unsigned long, long>
1026 {
1027 public:
1028  using ValueType = float;
1029 };
1030 
1031 template <>
1032 class JoinTraits<unsigned long, unsigned long>
1033 {
1034 public:
1035  using ValueType = unsigned long;
1036 };
1037 
1038 template <>
1039 class JoinTraits<unsigned long, long long>
1040 {
1041 public:
1042  using ValueType = double;
1043 };
1044 
1045 template <>
1046 class JoinTraits<unsigned long, unsigned long long>
1047 {
1048 public:
1049  using ValueType = unsigned long long;
1050 };
1051 
1052 template <>
1053 class JoinTraits<unsigned long, float>
1054 {
1055 public:
1056  using ValueType = float;
1057 };
1058 
1059 template <>
1060 class JoinTraits<unsigned long, double>
1061 {
1062 public:
1063  using ValueType = double;
1064 };
1065 
1066 
1071 template <>
1072 class JoinTraits<long long, bool>
1073 {
1074 public:
1075  using ValueType = long long;
1076 };
1077 
1078 template <>
1079 class JoinTraits<long long, char>
1080 {
1081 public:
1082  using ValueType = long long;
1083 };
1084 
1085 template <>
1086 class JoinTraits<long long, unsigned char>
1087 {
1088 public:
1089  using ValueType = long long;
1090 };
1091 
1092 template <>
1093 class JoinTraits<long long, short>
1094 {
1095 public:
1096  using ValueType = long long;
1097 };
1098 
1099 template <>
1100 class JoinTraits<long long, unsigned short>
1101 {
1102 public:
1103  using ValueType = long long;
1104 };
1105 
1106 template <>
1107 class JoinTraits<long long, int>
1108 {
1109 public:
1110  using ValueType = long long;
1111 };
1112 
1113 template <>
1114 class JoinTraits<long long, unsigned int>
1115 {
1116 public:
1117  using ValueType = long long;
1118 };
1119 
1120 template <>
1121 class JoinTraits<long long, long>
1122 {
1123 public:
1124  using ValueType = long long;
1125 };
1126 
1127 template <>
1128 class JoinTraits<long long, unsigned long>
1129 {
1130 public:
1131  using ValueType = double;
1132 };
1133 
1134 template <>
1135 class JoinTraits<long long, long long>
1136 {
1137 public:
1138  using ValueType = long long;
1139 };
1140 
1141 template <>
1142 class JoinTraits<long long, unsigned long long>
1143 {
1144 public:
1145  using ValueType = double;
1146 };
1147 
1148 template <>
1149 class JoinTraits<long long, float>
1150 {
1151 public:
1152  using ValueType = double;
1153 };
1154 
1155 template <>
1156 class JoinTraits<long long, double>
1157 {
1158 public:
1159  using ValueType = double;
1160 };
1161 
1166 template <>
1167 class JoinTraits<unsigned long long, bool>
1168 {
1169 public:
1170  using ValueType = unsigned long long;
1171 };
1172 
1173 template <>
1174 class JoinTraits<unsigned long long, char>
1175 {
1176 public:
1177  using ValueType = double;
1178 };
1179 
1180 template <>
1181 class JoinTraits<unsigned long long, unsigned char>
1182 {
1183 public:
1184  using ValueType = unsigned long long;
1185 };
1186 
1187 template <>
1188 class JoinTraits<unsigned long long, short>
1189 {
1190 public:
1191  using ValueType = double;
1192 };
1193 
1194 template <>
1195 class JoinTraits<unsigned long long, unsigned short>
1196 {
1197 public:
1198  using ValueType = unsigned long long;
1199 };
1200 
1201 template <>
1202 class JoinTraits<unsigned long long, int>
1203 {
1204 public:
1205  using ValueType = double;
1206 };
1207 
1208 template <>
1209 class JoinTraits<unsigned long long, unsigned int>
1210 {
1211 public:
1212  using ValueType = unsigned long long;
1213 };
1214 
1215 template <>
1216 class JoinTraits<unsigned long long, long>
1217 {
1218 public:
1219  using ValueType = double;
1220 };
1221 
1222 template <>
1223 class JoinTraits<unsigned long long, unsigned long>
1224 {
1225 public:
1226  using ValueType = unsigned long long;
1227 };
1228 
1229 template <>
1230 class JoinTraits<unsigned long long, long long>
1231 {
1232 public:
1233  using ValueType = double;
1234 };
1235 
1236 template <>
1237 class JoinTraits<unsigned long long, unsigned long long>
1238 {
1239 public:
1240  using ValueType = unsigned long long;
1241 };
1242 
1243 template <>
1244 class JoinTraits<unsigned long long, float>
1245 {
1246 public:
1247  using ValueType = double;
1248 };
1249 
1250 template <>
1251 class JoinTraits<unsigned long long, double>
1252 {
1253 public:
1254  using ValueType = double;
1255 };
1256 
1257 
1262 template <>
1263 class JoinTraits<float, bool>
1264 {
1265 public:
1266  using ValueType = float;
1267 };
1268 
1269 template <>
1270 class JoinTraits<float, char>
1271 {
1272 public:
1273  using ValueType = float;
1274 };
1275 
1276 template <>
1277 class JoinTraits<float, unsigned char>
1278 {
1279 public:
1280  using ValueType = float;
1281 };
1282 
1283 template <>
1284 class JoinTraits<float, short>
1285 {
1286 public:
1287  using ValueType = float;
1288 };
1289 
1290 template <>
1291 class JoinTraits<float, unsigned short>
1292 {
1293 public:
1294  using ValueType = float;
1295 };
1296 
1297 template <>
1298 class JoinTraits<float, int>
1299 {
1300 public:
1301  using ValueType = float;
1302 };
1303 
1304 template <>
1305 class JoinTraits<float, unsigned int>
1306 {
1307 public:
1308  using ValueType = float;
1309 };
1310 
1311 template <>
1312 class JoinTraits<float, long>
1313 {
1314 public:
1315  using ValueType = float;
1316 };
1317 
1318 template <>
1319 class JoinTraits<float, unsigned long>
1320 {
1321 public:
1322  using ValueType = float;
1323 };
1324 
1325 template <>
1326 class JoinTraits<float, long long>
1327 {
1328 public:
1329  using ValueType = double;
1330 };
1331 
1332 template <>
1333 class JoinTraits<float, unsigned long long>
1334 {
1335 public:
1336  using ValueType = double;
1337 };
1338 
1339 template <>
1340 class JoinTraits<float, float>
1341 {
1342 public:
1343  using ValueType = float;
1344 };
1345 
1346 template <>
1347 class JoinTraits<float, double>
1348 {
1349 public:
1350  using ValueType = double;
1351 };
1352 
1357 template <>
1358 class JoinTraits<double, bool>
1359 {
1360 public:
1361  using ValueType = double;
1362 };
1363 
1364 template <>
1365 class JoinTraits<double, char>
1366 {
1367 public:
1368  using ValueType = double;
1369 };
1370 
1371 template <>
1372 class JoinTraits<double, unsigned char>
1373 {
1374 public:
1375  using ValueType = double;
1376 };
1377 
1378 template <>
1379 class JoinTraits<double, short>
1380 {
1381 public:
1382  using ValueType = double;
1383 };
1384 
1385 template <>
1386 class JoinTraits<double, unsigned short>
1387 {
1388 public:
1389  using ValueType = double;
1390 };
1391 
1392 template <>
1393 class JoinTraits<double, int>
1394 {
1395 public:
1396  using ValueType = double;
1397 };
1398 
1399 template <>
1400 class JoinTraits<double, unsigned int>
1401 {
1402 public:
1403  using ValueType = double;
1404 };
1405 
1406 template <>
1407 class JoinTraits<double, long>
1408 {
1409 public:
1410  using ValueType = double;
1411 };
1412 
1413 template <>
1414 class JoinTraits<double, unsigned long>
1415 {
1416 public:
1417  using ValueType = double;
1418 };
1419 
1420 template <>
1421 class JoinTraits<double, long long>
1422 {
1423 public:
1424  using ValueType = double;
1425 };
1426 
1427 template <>
1428 class JoinTraits<double, unsigned long long>
1429 {
1430 public:
1431  using ValueType = double;
1432 };
1433 
1434 template <>
1435 class JoinTraits<double, float>
1436 {
1437 public:
1438  using ValueType = double;
1439 };
1440 
1441 template <>
1442 class JoinTraits<double, double>
1443 {
1444 public:
1445  using ValueType = double;
1446 };
1447 
1449 
1450 } // end namespace itk
1451 
1452 #endif // itkPixelTraits_h
itk::PixelTraits::Dimension
static constexpr unsigned int Dimension
Definition: itkPixelTraits.h:49
itk::PixelTraits
Traits for a pixel that define the dimension and component type.
Definition: itkPixelTraits.h:45
itk::JoinTraits
Trait to determine what datatype is needed if the specified pixel types are "joined" into a single ve...
Definition: itkPixelTraits.h:195
itkMacro.h
itk::JoinTraits::ValueType
TValue1 ValueType
Definition: itkPixelTraits.h:198
itk::PixelTraits::ValueType
typename TPixelType::ValueType ValueType
Definition: itkPixelTraits.h:52
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24