Cast the vtkVariant to the specified value type, where the type is in the following format: 'int', 'unsigned int', etc. for numeric types, and 'string' for strings. You can also use an integer VTK type constant for the type.
(v, t)
| 99 | |
| 100 | |
| 101 | def vtkVariantCast(v, t): |
| 102 | """ |
| 103 | Cast the vtkVariant to the specified value type, where the type is |
| 104 | in the following format: 'int', 'unsigned int', etc. for numeric types, |
| 105 | and 'string' for strings. You can also use an |
| 106 | integer VTK type constant for the type. |
| 107 | """ |
| 108 | if not issubclass(type(t), int): |
| 109 | t = _variant_type_map[t] |
| 110 | |
| 111 | v = vtkCommonCore.vtkVariant(v, t) |
| 112 | |
| 113 | if v.IsValid(): |
| 114 | return getattr(v, _variant_method_map[t])() |
| 115 | else: |
| 116 | return None |
| 117 | |
| 118 | |
| 119 | def vtkVariantStrictWeakOrder(s1, s2): |
nothing calls this directly
no test coverage detected