pub enum DataSet {
ImageData {
extent: Extent,
origin: [f32; 3],
spacing: [f32; 3],
meta: Option<Box<MetaData>>,
pieces: Vec<Piece<ImageDataPiece>>,
},
StructuredGrid {
extent: Extent,
meta: Option<Box<MetaData>>,
pieces: Vec<Piece<StructuredGridPiece>>,
},
RectilinearGrid {
extent: Extent,
meta: Option<Box<MetaData>>,
pieces: Vec<Piece<RectilinearGridPiece>>,
},
UnstructuredGrid {
meta: Option<Box<MetaData>>,
pieces: Vec<Piece<UnstructuredGridPiece>>,
},
PolyData {
meta: Option<Box<MetaData>>,
pieces: Vec<Piece<PolyDataPiece>>,
},
Field {
name: String,
data_array: Vec<FieldArray>,
},
}
Expand description
Dataset described in the file.
For 2D objects, dims[2]
will be set to 1
. For 1D objects, dims[1]
will also be 1
.
This enum is designed to closely represent the data as it is stored in the vtk file.
The extent
specified in the enum variants corresponds to the WholeExtent
attribute.
Each DataSet
is split into pieces for compatibility with XML formats. Legacy formats
correspond to a data set with a single inline piece.
Variants§
ImageData
Also referred to as StructuredPoints
in Legacy format.
Fields
§
pieces: Vec<Piece<ImageDataPiece>>
StructuredGrid
RectilinearGrid
UnstructuredGrid
3D Unstructured grid. Note that cells.num_cells
must equal cell_types.len()
.
PolyData
3D Polygon data.
Field
Same as one field attribute.
Implementations§
Trait Implementations§
Source§impl From<ImageDataPiece> for DataSet
impl From<ImageDataPiece> for DataSet
Source§fn from(p: ImageDataPiece) -> DataSet
fn from(p: ImageDataPiece) -> DataSet
Converts to this type from the input type.
Source§impl From<PolyDataPiece> for DataSet
impl From<PolyDataPiece> for DataSet
Source§fn from(p: PolyDataPiece) -> DataSet
fn from(p: PolyDataPiece) -> DataSet
Converts to this type from the input type.
Source§impl From<RectilinearGridPiece> for DataSet
impl From<RectilinearGridPiece> for DataSet
Source§fn from(p: RectilinearGridPiece) -> DataSet
fn from(p: RectilinearGridPiece) -> DataSet
Converts to this type from the input type.
Source§impl From<StructuredGridPiece> for DataSet
impl From<StructuredGridPiece> for DataSet
Source§fn from(p: StructuredGridPiece) -> DataSet
fn from(p: StructuredGridPiece) -> DataSet
Converts to this type from the input type.
Source§impl From<UnstructuredGridPiece> for DataSet
impl From<UnstructuredGridPiece> for DataSet
Source§fn from(p: UnstructuredGridPiece) -> DataSet
fn from(p: UnstructuredGridPiece) -> DataSet
Converts to this type from the input type.
Source§impl TryFrom<DataSet> for ImageDataPiece
impl TryFrom<DataSet> for ImageDataPiece
Source§impl TryFrom<DataSet> for PolyDataPiece
impl TryFrom<DataSet> for PolyDataPiece
Source§impl TryFrom<DataSet> for RectilinearGridPiece
impl TryFrom<DataSet> for RectilinearGridPiece
Source§impl TryFrom<DataSet> for StructuredGridPiece
impl TryFrom<DataSet> for StructuredGridPiece
Source§impl TryFrom<DataSet> for UnstructuredGridPiece
impl TryFrom<DataSet> for UnstructuredGridPiece
impl StructuralPartialEq for DataSet
Auto Trait Implementations§
impl Freeze for DataSet
impl RefUnwindSafe for DataSet
impl Send for DataSet
impl Sync for DataSet
impl Unpin for DataSet
impl UnwindSafe for DataSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more