VTK  9.4.20241108
vtkH5PartReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (C) CSCS - Swiss National Supercomputing Centre
3// SPDX-License-Identifier: BSD-3-Clause
19#ifndef vtkH5PartReader_h
20#define vtkH5PartReader_h
21
22#include "vtkIOH5partModule.h" // for export macro
24
25#include <string> // for string
26#include <vector> // for vector
27
28struct H5PartFile;
29
30VTK_ABI_NAMESPACE_BEGIN
32class VTKIOH5PART_EXPORT vtkH5PartReader : public vtkPolyDataAlgorithm
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
43 void SetFileName(VTK_FILEPATH char* filename);
46
48
51 vtkGetStringMacro(Xarray);
52 vtkSetStringMacro(Xarray);
54
56
59 vtkGetStringMacro(Yarray);
60 vtkSetStringMacro(Yarray);
62
64
67 vtkGetStringMacro(Zarray);
68 vtkSetStringMacro(Zarray);
70
72
80 vtkSetMacro(GenerateVertexCells, int);
81 vtkGetMacro(GenerateVertexCells, int);
82 vtkBooleanMacro(GenerateVertexCells, int);
84
86
91 vtkSetMacro(CombineVectorComponents, int);
92 vtkGetMacro(CombineVectorComponents, int);
93 vtkBooleanMacro(CombineVectorComponents, int);
95
97
106 vtkSetMacro(MaskOutOfTimeRangeOutput, int);
107 vtkGetMacro(MaskOutOfTimeRangeOutput, int);
108 vtkBooleanMacro(MaskOutOfTimeRangeOutput, int);
110
112
123 const char* GetPointArrayName(int index);
124 int GetPointArrayStatus(const char* name);
125 void SetPointArrayStatus(const char* name, int status);
127 void EnableAll();
128 void Disable(const char* name);
129 void Enable(const char* name);
130
131 int GetNumberOfPointArrayStatusArrays() { return GetNumberOfPointArrays(); }
132 const char* GetPointArrayStatusArrayName(int index) { return GetPointArrayName(index); }
133 int GetPointArrayStatusArrayStatus(const char* name) { return GetPointArrayStatus(name); }
134 void SetPointArrayStatusArrayStatus(const char* name, int status)
135 {
136 this->SetPointArrayStatus(name, status);
137 }
138
140
142 int GetNumberOfCoordinateArrays() { return GetNumberOfPointArrays(); }
143 const char* GetCoordinateArrayName(int index) { return GetPointArrayName(index); }
144 int GetCoordinateArrayStatus(const char* name);
145 void SetCoordinateArrayStatus(const char* name, int status);
147
148protected:
151 //
154 int OpenFile();
155 void CloseFile();
156 // void CopyIntoCoords(int offset, vtkDataArray *source, vtkDataArray *dest);
157 // returns 0 if no, returns 1,2,3,45 etc for the first, second...
158 // example : if CombineVectorComponents is true, then
159 // velocity_0 returns 1, velocity_1 returns 2 etc
160 // if CombineVectorComponents is false, then
161 // velocity_0 returns 0, velocity_1 returns 0 etc
162 int IndexOfVectorComponent(const char* name);
163
164 std::string NameOfVectorComponent(const char* name);
165
166 //
167 // Internal Variables
168 //
169 char* FileName;
176 H5PartFile* H5FileId;
181 //
182 char* Xarray;
183 char* Yarray;
184 char* Zarray;
185
186 std::vector<double> TimeStepValues;
187
188 // To allow paraview gui to enable/disable scalar reading
190
191private:
192 vtkH5PartReader(const vtkH5PartReader&) = delete;
193 void operator=(const vtkH5PartReader&) = delete;
194};
195
196VTK_ABI_NAMESPACE_END
197#endif
Store on/off settings for data arrays, etc.
Read H5Part particle files.
int GetNumberOfPointArrayStatusArrays()
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
int GetNumberOfCoordinateArrays()
void DisableAll()
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
void SetFileName(VTK_FILEPATH char *filename)
Specify file name.
void SetPointArrayStatus(const char *name, int status)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
void Enable(const char *name)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
static vtkH5PartReader * New()
void SetCoordinateArrayStatus(const char *name, int status)
H5PartFile * H5FileId
void EnableAll()
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
int IndexOfVectorComponent(const char *name)
int GetPointArrayStatusArrayStatus(const char *name)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTimeStamp FileOpenedTime
std::vector< double > TimeStepValues
vtkGetFilePathMacro(FileName)
Specify file name.
int GetNumberOfPointArrays()
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const char * GetPointArrayStatusArrayName(int index)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
const char * GetPointArrayName(int index)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
~vtkH5PartReader() override
std::string NameOfVectorComponent(const char *name)
void Disable(const char *name)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
int GetCoordinateArrayStatus(const char *name)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
const char * GetCoordinateArrayName(int index)
vtkTimeStamp FileModifiedTime
vtkDataArraySelection * PointDataArraySelection
int GetPointArrayStatus(const char *name)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
void SetPointArrayStatusArrayStatus(const char *name, int status)
An H5Part file may contain multiple arrays a GUI (eg Paraview) can provide a mechanism for selecting ...
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
record modification and/or execution time
#define VTK_FILEPATH