VTK  9.0.20210725
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 
36 namespace vtx
37 {
38 namespace schema
39 {
40 class VTXvtkVTI : public VTXvtkBase
41 {
42 public:
43  VTXvtkVTI(const std::string& schema, adios2::IO& io, adios2::Engine& engine);
45 
46 private:
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 */
vtkImageData.h
vtx::types::DataSetType
DataSetType
Definition: VTXTypes.h:42
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtx::schema::VTXvtkVTI
Definition: VTXvtkVTI.h:41
vtx
Definition: vtkADIOS2VTXReader.h:36
vtx::schema::VTXvtkVTI::VTXvtkVTI
VTXvtkVTI(const std::string &schema, adios2::IO &io, adios2::Engine &engine)
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:46
vtx::schema::VTXvtkBase
Definition: VTXvtkBase.h:43
declare_type
#define declare_type(T)
Definition: VTXvtkVTI.h:60
VTXvtkBase.h
vtkNew< vtkImageData >
vtx::schema::VTXvtkVTI::~VTXvtkVTI
~VTXvtkVTI()
VTK_IO_ADIOS2_VTX_ARRAY_TYPE
#define VTK_IO_ADIOS2_VTX_ARRAY_TYPE(MACRO)
Definition: VTXTypes.h:56
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkNew.h