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