mitk.ArbitraryTimeGeometry#
- class mitk.ArbitraryTimeGeometry#
Bases:
TimeGeometryTimeGeometrywith user-defined time points per step.Use when the time points are not evenly spaced (gated acquisitions, re-binned reconstructions, sparse 4D series).
- __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
BaseGeometryassociated with a time point.get_geometry_for_time_step(self, time_step)Return the
BaseGeometryassociated 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.
new()Construct an empty arbitrary time 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
BaseGeometryassociated 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
BaseGeometryassociated 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.
get_max_time_point(self: mitk.TimeGeometry) -> float
Return the maximum (latest) time point covered by this geometry.
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.
get_min_time_point(self: mitk.TimeGeometry) -> float
Return the minimum (earliest) time point covered by this geometry.
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.
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.
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.
- static new() mitk.ArbitraryTimeGeometry#
Construct an empty arbitrary time geometry.
- 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.