File: build_options.py

package info (click to toggle)
insighttoolkit5 5.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704,588 kB
  • sloc: cpp: 784,579; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,934; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 461; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (70 lines) | stat: -rw-r--r-- 2,086 bytes parent folder | download | duplicates (3)
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
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 typing import List, Union
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[Union[types.itkCType, itkTemplate]] = (
    COLORS + VECTORS + SCALARS + COMPLEX_REALS
)

del itkTemplate
del types