mitk.Point2D#

class mitk.Point2D#

Bases: pybind11_object

2D point in world coordinates.

A pair of double-precision scalars accessible by index or by x / y attributes.

Examples

>>> p = mitk.Point2D(1.0, 2.0)
>>> p.x, p.y
(1.0, 2.0)
>>> p[0]
1.0
__init__(*args, **kwargs)#

Overloaded function.

  1. __init__(self: mitk.Point2D) -> None

Construct a point at the origin (0, 0).

  1. __init__(self: mitk.Point2D, x: typing.SupportsFloat, y: typing.SupportsFloat) -> None

Construct a point at the given coordinates.

Parameters:
  • x – X coordinate.

  • y – Y coordinate.

Methods

__init__(*args, **kwargs)

Overloaded function.

Attributes

x

X coordinate.

y

Y coordinate.

__getitem__(self: mitk.Point2D, arg0: SupportsInt) float#

Return the i-th coordinate (0 = x, 1 = y).

__setitem__(self: mitk.Point2D, arg0: SupportsInt, arg1: SupportsFloat) None#

Set the i-th coordinate.

property x#

X coordinate.

property y#

Y coordinate.