mitk.property_from_dict

mitk.property_from_dict#

mitk.property_from_dict(d: dict) mitk.BaseProperty#

Reconstruct a BaseProperty subclass from a dict.

Consumes the dict layout used by PropertyList.to_dict() (per-entry values) and by TemporoSpatialStringProperty.to_dict(). Inspects the "type" key in the dict to pick the correct subclass.

Parameters:

d – Dict describing a single property’s type and value.

Returns:

A new BaseProperty of the appropriate subclass.