weldx.util.media_file.MediaFile#
- class weldx.util.media_file.MediaFile(path_or_array, reference_time=None, fps=None)#
Encapsulates a media file, like video or image stacks making them accessible.
The underlying images are encapsulated to be loaded lazily (via Dask) and can be accessed by a time coordinate in case of videos.
- Parameters:
path_or_array (
Union
[str
,Path
,DataArray
,ndarray
,list
,tuple
]) – Path pointing towards a video, or tiff stack. If an array is given, it will be treated as a video.reference_time (
Optional
[Timestamp
]) – A reference time, when this media was recorded. Useful, when passing arrays.fps (
Optional
[float
]) – Frames per second in case of a video. Has to be passed in casepath_or_array
was given as list of frames.
Methods
File reference to underlying file/directory.
Attributes
Video attributes.
Get underlying DataArray.
In case of time-dynamic data, return its duration.
Frames per second.
Initialized from file or not?
Time of recording of this media (if known).
Resolution in pixels (widths, height).