pyvista_zstd.DataSetMetadata#
- class pyvista_zstd.DataSetMetadata(ds_type: str, uid: str, n_points: int, points_dtype: str | None, n_cells: int, celltypes_dtype: str | None, point_data_keys: dict[str, ~pyvista_zstd.pyvista_zstd.ArrayInfo]=<factory>, cell_data_keys: dict[str, ~pyvista_zstd.pyvista_zstd.ArrayInfo]=<factory>, field_data_keys: dict[str, ~pyvista_zstd.pyvista_zstd.ArrayInfo]=<factory>, fixed_cell_sizes: dict[str, int]=<factory>, point_data_active_scalars_name: str | None = None, point_data_active_vectors_name: str | None = None, point_data_active_texture_coordinates_name: str | None = None, point_data_active_normals_name: str | None = None, cell_data_active_scalars_name: str | None = None, cell_data_active_vectors_name: str | None = None, cell_data_active_texture_coordinates_name: str | None = None, cell_data_active_normals_name: str | None = None, dimensions: tuple[int, int, int] | None=None, origin: tuple[float, float, float] | None=None, spacing: tuple[float, float, float] | None=None, direction_matrix: list[list[float]] | None = None, offset: tuple[int, int, int] | None=None, faces_connectivity_flags_array_name: str | None = None)#
Metadata of one stored dataset, known without decompressing its arrays.
Returned by
pyvista_zstd.Reader.dataset_metadata. The attributes are the supported interface; the JSON and array conversions serve the file format.- Attributes:
- ds_typestr
Dataset class name, such as
"UnstructuredGrid".- uidstr
Identifier of this dataset within the file.
- n_points, n_cellsint
Number of points and cells.
- points_dtype, celltypes_dtypestr | None
Dtype of the points and cell types, when the dataset stores them.
- point_data_keys, cell_data_keys, field_data_keysdict[str, ArrayInfo]
Shape and dtype of each point, cell and field array, by name.
- fixed_cell_sizesdict[str, int]
Common cell width of each fixed-width cell array.
- point_data_active_scalars_name, point_data_active_vectors_namestr | None
Active point scalars and vectors.
- point_data_active_texture_coordinates_name, point_data_active_normals_namestr | None
Active point texture coordinates and normals.
- cell_data_active_scalars_name, cell_data_active_vectors_namestr | None
Active cell scalars and vectors.
- cell_data_active_texture_coordinates_name, cell_data_active_normals_namestr | None
Active cell texture coordinates and normals.
- dimensionstuple[int, int, int] | None
Dimensions of a structured dataset.
- origin, spacingtuple[float, float, float] | None
Origin and spacing of an
pyvista.ImageData.- direction_matrixlist[list[float]] | None
Direction matrix of an
pyvista.ImageData.- offsettuple[int, int, int] | None
Extent offset of a structured dataset.
- faces_connectivity_flags_array_namestr | None
Connectivity flags array name of an
pyvista.ExplicitStructuredGrid.
Methods
from_array(arr)Create from a numpy uint8 array.
from_dataset(ds, point_info, cell_info, ...)Create metadata from a dataset.
from_json(s)Create from JSON.
to_array()Output as a numpy uint8 array.
to_json()Convert to JSON, leaving out an unset ExplicitStructuredGrid flags array name.
Methods
DataSetMetadata.__init__(ds_type, uid, ...)Create from a numpy uint8 array.
DataSetMetadata.from_dataset(ds, point_info, ...)Create metadata from a dataset.
Create from JSON.
Output as a numpy uint8 array.
Convert to JSON, leaving out an unset ExplicitStructuredGrid flags array name.
Attributes