forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild_options.py
More file actions
69 lines (62 loc) · 2 KB
/
build_options.py
File metadata and controls
69 lines (62 loc) · 2 KB
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
import itk
# Finding the named elements in the templates
# requires that they are force loaded before
# before searching
itk.force_load()
from itk.support import types
from itk.support.template_class import itkTemplate, itkTemplateBase
from itkConfig import ITK_GLOBAL_WRAPPING_BUILD_OPTIONS as _itkwrapbo
DIMS: list[int] = [int(s) for s in _itkwrapbo["ITK_WRAP_IMAGE_DIMS"] if s]
USIGN_INTS: list[types.itkCType] = [
getattr(types, s) for s in _itkwrapbo["WRAP_ITK_USIGN_INT"] if s
]
SIGN_INTS: list[types.itkCType] = [
getattr(types, s) for s in _itkwrapbo["WRAP_ITK_SIGN_INT"] if s
]
REALS: list[types.itkCType] = [
getattr(types, s) for s in _itkwrapbo["WRAP_ITK_REAL"] if s
]
VECTOR_REALS: list[itkTemplate] = [
itkTemplateBase.__template_instantiations_name_to_object__[
itkTemplate.normalizeName(s)
]
for s in _itkwrapbo["ITK_WRAP_PYTHON_VECTOR_REAL"]
if s
]
COV_VECTOR_REALS: list[itkTemplate] = [
itkTemplateBase.__template_instantiations_name_to_object__[
itkTemplate.normalizeName(s)
]
for s in _itkwrapbo["ITK_WRAP_PYTHON_COV_VECTOR_REAL"]
if s
]
RGBS: list[itkTemplate] = [
itkTemplateBase.__template_instantiations_name_to_object__[
itkTemplate.normalizeName(s)
]
for s in _itkwrapbo["ITK_WRAP_PYTHON_RGB"]
if s
]
RGBAS: list[itkTemplate] = [
itkTemplateBase.__template_instantiations_name_to_object__[
itkTemplate.normalizeName(s)
]
for s in _itkwrapbo["ITK_WRAP_PYTHON_RGBA"]
if s
]
COMPLEX_REALS: list[itkTemplate] = [
itkTemplateBase.__template_instantiations_name_to_object__[
itkTemplate.normalizeName(s)
]
for s in _itkwrapbo["ITK_WRAP_PYTHON_COMPLEX_REAL"]
if s
]
INTS: list[types.itkCType] = SIGN_INTS + USIGN_INTS
SCALARS: list[types.itkCType] = INTS + REALS
VECTORS: list[itkTemplate] = VECTOR_REALS + COV_VECTOR_REALS
COLORS: list[itkTemplate] = RGBS + RGBAS
ALL_TYPES: list[types.itkCType | itkTemplate] = (
COLORS + VECTORS + SCALARS + COMPLEX_REALS
)
del itkTemplate
del types