VTK  9.1.0
VTXvtkVTI.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: VTXvtkVTI.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
15
16/*
17 * VTXvtkVTI.h : class that supports ImageData schema in VTK XML format .vti
18 * extends abstract ADIOS2xmlVTK
19 *
20 * Created on: May 1, 2019
21 * Author: William F Godoy godoywf@ornl.gov
22 */
23
24#ifndef VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h
25#define VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h
26
27#include <map>
28#include <string>
29#include <vector>
30
32
33#include "vtkImageData.h"
34#include "vtkNew.h"
35
36namespace vtx
37{
38namespace schema
39{
40class VTXvtkVTI : public VTXvtkBase
41{
42public:
43 VTXvtkVTI(const std::string& schema, adios2::IO& io, adios2::Engine& engine);
45
46private:
48 vtkNew<vtkImageData> ImageData;
50 adios2::Dims WholeExtent;
51
52 adios2::Dims GetShape(const types::DataSetType type);
53 adios2::Box<adios2::Dims> GetSelection(const types::DataSetType type);
54
55 void DoFill(vtkMultiBlockDataSet* multiBlock, const size_t step) final;
56 void ReadPiece(const size_t step, const size_t pieceID) final;
57
58 void Init() final;
59
60#define declare_type(T) \
61 void SetDimensions( \
62 adios2::Variable<T> variable, const types::DataArray& dataArray, const size_t step) final;
64#undef declare_type
65
66 template <class T>
67 void SetDimensionsCommon(
68 adios2::Variable<T> variable, const types::DataArray& dataArray, const size_t step);
69};
70
71} // end namespace schema
72} // end namespace vtx
73
74#endif /* VTK_IO_ADIOS2_VTX_SCHEMA_VTK_VTXvtkVTI_h */
#define VTK_IO_ADIOS2_VTX_ARRAY_TYPE(MACRO)
Definition: VTXTypes.h:56
#define declare_type(T)
Definition: VTXvtkVTI.h:60
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
Definition: vtkNew.h:165
VTXvtkVTI(const std::string &schema, adios2::IO &io, adios2::Engine &engine)