darsia.imread_from_vtu#

imread_from_vtu(path, key, shape, **kwargs)[source]#

Read data with meshio and map it onto a pixel grid.

Only 1d and 2d vtu images are supported. Any format meshio can read should work in principle, but only vtu is tested.

Parameters:
pathPath or list of Path

Path(s) to the file(s).

keystr

Identifier addressing the data field in the vtu file.

shapetuple of int

Shape of the target 2d pixel array, in matrix indexing.

**kwargs

series (bool) – create a time series of images.

Returns:
darsia.Image

Scalar image (space-time if a list of paths is given).