|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
#include <mitkBaseProperty.h>#include <mitkColorProperty.h>#include <mitkIPropertyOwner.h>#include <mitkProperties.h>#include <mitkStringProperty.h>#include <pybind11/pybind11.h>Go to the source code of this file.
Functions | |
| mitk::BaseProperty::Pointer | pythonValueToProperty (py::object value) |
| Converts a Python object to a BaseProperty, auto-wrapping common scalar types. More... | |
| mitk::BaseProperty::Pointer | pythonValueToPropertyWithType (py::object value, const std::string &targetType) |
| Converts a Python object to a BaseProperty, coercing to a specific target class when given. More... | |
| mitk::BaseProperty::Pointer | coerceToExistingType (const mitk::BaseProperty *existing, py::object value) |
| Coerces a Python value to the class of an existing property. More... | |
| mitk::BaseProperty::Pointer | resolvePropertyValue (mitk::IPropertyOwner &owner, const std::string &key, py::object value) |
| Resolves a Python value to a BaseProperty, respecting any existing property's type. More... | |
|
inline |
Coerces a Python value to the class of an existing property.
Definition at line 141 of file PropertyAutoWrap.h.
References pythonValueToPropertyWithType().
Referenced by resolvePropertyValue().
|
inline |
Converts a Python object to a BaseProperty, auto-wrapping common scalar types.
Supported auto-wrap conversions:
For property types without a scalar equivalent (Vector3D, Point*, ...), callers must pass an explicit mitk.<Name>Property instance.
| py::type_error | if the Python type cannot be auto-wrapped. |
Definition at line 43 of file PropertyAutoWrap.h.
References mitk::ColorProperty::New(), and mitk::StringProperty::New().
Referenced by pythonValueToPropertyWithType(), and resolvePropertyValue().
|
inline |
Converts a Python object to a BaseProperty, coercing to a specific target class when given.
If targetType is empty, falls back to pythonValueToProperty() (type inference). Otherwise, coerces the Python value to the named property class.
Definition at line 93 of file PropertyAutoWrap.h.
References mitk::ColorProperty::New(), mitk::StringProperty::New(), and pythonValueToProperty().
Referenced by coerceToExistingType().
|
inline |
Resolves a Python value to a BaseProperty, respecting any existing property's type.
Resolution order:
key already has a property on owner, coerce to that type.Definition at line 157 of file PropertyAutoWrap.h.
References coerceToExistingType(), mitk::IPropertyProvider::GetConstProperty(), and pythonValueToProperty().
Referenced by bind_property_owner().