File: itkNumericTraits.wrap

package info (click to toggle)
insighttoolkit5 5.4.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 704,384 kB
  • sloc: cpp: 783,592; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,874; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 464; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (126 lines) | stat: -rw-r--r-- 3,375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
itk_wrap_include("itkNumericTraits.h")
itk_wrap_include("itkNumericTraitsRGBPixel.h")
itk_wrap_include("itkNumericTraitsRGBAPixel.h")
itk_wrap_include("itkNumericTraitsTensorPixel.h")
itk_wrap_include("itkNumericTraitsVariableLengthVectorPixel.h")
itk_wrap_include("itkNumericTraitsFixedArrayPixel.h")
itk_wrap_include("itkNumericTraitsVectorPixel.h")
itk_wrap_include("itkNumericTraitsCovariantVectorPixel.h")

if(WIN32 AND NOT MINGW)
  itk_wrap_simple_class("std::_Num_base")
  itk_wrap_simple_class("std::_Num_int_base")
  itk_wrap_simple_class("std::_Num_float_base")
endif()

# the superclass
itk_wrap_class(std::numeric_limits EXPLICIT_SPECIALIZATION)
# the basic types
foreach(
  t
  UC
  US
  UI
  UL
  ULL
  SC
  SS
  SI
  SL
  F
  D
  LD
  B)
  itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()
itk_end_wrap_class()

itk_wrap_class("itk::NumericTraits" EXPLICIT_SPECIALIZATION)
# the basic types
foreach(
  t
  UC
  US
  UI
  UL
  ULL
  SC
  SS
  SI
  SL
  F
  D
  LD
  B)
  itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()

# complex
foreach(t ${WRAP_ITK_COMPLEX_REAL})
  itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()

# the ITK types

# rgb, rgba
unique(rgbs "RGBUC;RGBAUC;RGBAF;${WRAP_ITK_RGB};${WRAP_ITK_RGBA}")
foreach(t ${WRAP_ITK_RGB} ${WRAP_ITK_RGBA})
  itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()

# covariant vector
foreach(d ${ITK_WRAP_VECTOR_COMPONENTS})
  foreach(t ${WRAP_ITK_COV_VECTOR_REAL})
    itk_wrap_template("${ITKM_${t}${d}}" "${ITKT_${t}${d}}")
  endforeach()
endforeach()

# vector, as in WrapITKTypes.cmake
unique(vector_dims "1;${ITK_WRAP_VECTOR_COMPONENTS};6")
unique(vector_types "UC;F;D;${WRAP_ITK_SCALAR}")
foreach(d ${vector_dims})
  foreach(t ${vector_types})
    add_template("${ITKM_V${t}${d}}" "${ITKT_V${t}${d}}")
  endforeach()
endforeach()

# fixed array, as in WrapITKTypes.cmake
set(dims ${ITK_WRAP_IMAGE_DIMS})
foreach(d ${ITK_WRAP_IMAGE_DIMS})
  math(EXPR d2 "${d} * 2")
  # for itk::SymmetricSecondRankTensor
  math(EXPR d3 "${d} * (${d} + 1) / 2")
  list(
    APPEND
    dims
    ${d2}
    ${d3})
endforeach()
unique(array_sizes "${dims};1;3;4;6")
# make sure that 1-D FixedArrays are wrapped. Also wrap for each selected
# image dimension.
# 3-D FixedArrays are required as superclass of rgb pixels
# TODO: Do we need fixed arrays for all of these types? For just the selected
# pixel types plus some few basic cases? Or just for a basic set of types?
foreach(d ${array_sizes})
  add_template("${ITKM_FAD${d}}" "${ITKT_FAD${d}}")
  add_template("${ITKM_FAF${d}}" "${ITKT_FAF${d}}")
  add_template("${ITKM_FAUL${d}}" "${ITKT_FAUL${d}}")
  add_template("${ITKM_FAUS${d}}" "${ITKT_FAUS${d}}")
  add_template("${ITKM_FAUC${d}}" "${ITKT_FAUC${d}}")
  add_template("${ITKM_FAUI${d}}" "${ITKT_FAUI${d}}")
  add_template("${ITKM_FASL${d}}" "${ITKT_FASL${d}}")
  add_template("${ITKM_FASS${d}}" "${ITKT_FASS${d}}")
  add_template("${ITKM_FASC${d}}" "${ITKT_FASC${d}}")
  # this one is not defined in itkNumerictTraitsFixedArrayPixel.h
  # ADD_TEMPLATE("${ITKM_FAB${d}}"  "${ITKT_FAB${d}}")
endforeach()

# variable length vector, as in WrapITKTypes.cmake
unique(wrap_image_types "${WRAP_ITK_SCALAR};UC")
foreach(type ${wrap_image_types})
  add_template("${ITKM_VLV${type}}" "${ITKT_VLV${type}}")
endforeach()

itk_end_wrap_class()