VTK  9.4.20241118
VTXvtkVTI.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4/*
5 * VTXvtkVTI.h : class that supports ImageData schema in VTK XML format .vti
6 * extends abstract ADIOS2xmlVTK
7 *
8 * Created on: May 1, 2019
9 * Author: William F Godoy godoywf@ornl.gov
10 */
11
12#ifndef VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h
13#define VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h
14
15#include <map>
16#include <string>
17#include <vector>
18
20
21#include "vtkImageData.h"
22#include "vtkNew.h"
23
24namespace vtx
25{
26namespace schema
27{
28VTK_ABI_NAMESPACE_BEGIN
29class VTXvtkVTI : public VTXvtkBase
30{
31public:
32 VTXvtkVTI(const std::string& schema, adios2::IO& io, adios2::Engine& engine);
33 ~VTXvtkVTI() override;
34
35private:
37 vtkNew<vtkImageData> ImageData;
39 adios2::Dims WholeExtent;
40
41 adios2::Dims GetShape(types::DataSetType type);
42 adios2::Box<adios2::Dims> GetSelection(types::DataSetType type);
43
44 void DoFill(vtkMultiBlockDataSet* multiBlock, size_t step) final;
45 void ReadPiece(size_t step, size_t pieceID) final;
46
47 void Init() final;
48
49#define declare_type(T) \
50 void SetDimensions(adios2::Variable<T> variable, const types::DataArray& dataArray, size_t step) \
51 final;
53#undef declare_type
54
55 template <class T>
56 void SetDimensionsCommon(
57 adios2::Variable<T> variable, const types::DataArray& dataArray, size_t step);
58};
59
60VTK_ABI_NAMESPACE_END
61} // end namespace schema
62} // end namespace vtx
63
64#endif /* VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h */
#define VTK_IO_ADIOS2_VTX_ARRAY_TYPE(MACRO)
Definition VTXTypes.h:45
#define declare_type(T)
Definition VTXvtkVTI.h:49
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
Definition vtkNew.h:167
VTXvtkVTI(const std::string &schema, adios2::IO &io, adios2::Engine &engine)