mitk.IntProperty#

class mitk.IntProperty#

Bases: BaseProperty

Property holding a single int value.

__init__(self: mitk.IntProperty, value: SupportsInt = 0) None#

Construct an int property with the given value (default 0).

Methods

__init__(self[, value])

Construct an int property with the given value (default 0).

clone(self)

Return a deep copy of this property.

from_json(json)

Reconstruct a BaseProperty subclass from JSON.

to_json(self)

Serialize this property to a self-contained JSON string.

Attributes

value

The stored int.

__eq__(self: mitk.BaseProperty, arg0: mitk.BaseProperty) bool#
clone(self: mitk.BaseProperty) mitk.BaseProperty#

Return a deep copy of this property.

static from_json(json: str) mitk.BaseProperty#

Reconstruct a BaseProperty subclass from JSON.

Parameters:

json – JSON string produced by to_json().

Returns:

A new BaseProperty of the appropriate subclass.

to_json(self: mitk.BaseProperty) str#

Serialize this property to a self-contained JSON string.

The string carries enough type information that from_json() can reconstruct the correct subclass.

Returns:

JSON string representation of the property.

property value#

The stored int.