mitk.TimeGeometry#

class mitk.TimeGeometry#

Bases: pybind11_object

Maps discrete time steps to floating-point time points.

A TimeGeometry is the temporal counterpart of BaseGeometry. It bridges integer time-step indices (used as array indices) and physical time points (the time values a user sees). For static 3D data the time geometry has a single time step that covers the full time range.

Subclasses:

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

count_time_steps(self)

Return the number of time steps.

get_geometry_for_time_point(self, time_point)

Return the BaseGeometry associated with a time point.

get_geometry_for_time_step(self, time_step)

Return the BaseGeometry associated with a time step.

get_max_time_point(*args, **kwargs)

Overloaded function.

get_min_time_point(*args, **kwargs)

Overloaded function.

get_time_bounds(*args, **kwargs)

Overloaded function.

is_valid_time_point(self, time_point)

Return True if the time point is within the geometry's bounds.

is_valid_time_step(self, time_step)

Return True if the index is a valid time step for this geometry.

time_point_to_time_step(self, time_point)

Convert a floating-point time point to a time-step index.

time_step_to_time_point(self, time_step)

Convert an integer time-step index to a floating-point time point.

count_time_steps(self: mitk.TimeGeometry) int#

Return the number of time steps.

get_geometry_for_time_point(self: mitk.TimeGeometry, time_point: SupportsFloat) mitk.BaseGeometry#

Return the BaseGeometry associated with a time point.

Parameters:

time_point – Time point in physical units.

Returns:

The spatial geometry at the matching time step.

get_geometry_for_time_step(self: mitk.TimeGeometry, time_step: SupportsInt) mitk.BaseGeometry#

Return the BaseGeometry associated with a time step.

Parameters:

time_step – Time-step index.

Returns:

The spatial geometry at that step.

get_max_time_point(*args, **kwargs)#

Overloaded function.

  1. get_max_time_point(self: mitk.TimeGeometry) -> float

Return the maximum (latest) time point covered by this geometry.

  1. get_max_time_point(self: mitk.TimeGeometry, time_step: typing.SupportsInt) -> float

Return the maximum time point of a single time step.

Parameters:

time_step – Time-step index.

get_min_time_point(*args, **kwargs)#

Overloaded function.

  1. get_min_time_point(self: mitk.TimeGeometry) -> float

Return the minimum (earliest) time point covered by this geometry.

  1. get_min_time_point(self: mitk.TimeGeometry, time_step: typing.SupportsInt) -> float

Return the minimum time point of a single time step.

Parameters:

time_step – Time-step index.

get_time_bounds(*args, **kwargs)#

Overloaded function.

  1. get_time_bounds(self: mitk.TimeGeometry) -> tuple[float, float]

Return the overall (min_time_point, max_time_point) tuple.

Returns:

A 2-tuple of floats.

  1. get_time_bounds(self: mitk.TimeGeometry, time_step: typing.SupportsInt) -> tuple[float, float]

Return the (min, max) time-point tuple for a single time step.

Parameters:

time_step – Time-step index.

Returns:

A 2-tuple of floats.

is_valid_time_point(self: mitk.TimeGeometry, time_point: SupportsFloat) bool#

Return True if the time point is within the geometry’s bounds.

Parameters:

time_point – Candidate time point.

is_valid_time_step(self: mitk.TimeGeometry, time_step: SupportsInt) bool#

Return True if the index is a valid time step for this geometry.

Parameters:

time_step – Candidate time-step index.

time_point_to_time_step(self: mitk.TimeGeometry, time_point: SupportsFloat) int#

Convert a floating-point time point to a time-step index.

Parameters:

time_point – Time point in physical units.

Returns:

The matching time-step index. For out-of-range inputs, returns the nearest valid step (clamping behavior is defined by the subclass).

time_step_to_time_point(self: mitk.TimeGeometry, time_step: SupportsInt) float#

Convert an integer time-step index to a floating-point time point.

Parameters:

time_step – Time-step index.

Returns:

The corresponding time point.