VTK  9.2.6
vtkH5PartReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkH5PartReader.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 Copyright (C) CSCS - Swiss National Supercomputing Centre.
18 You may use modify and and distribute this code freely providing
19 1) This copyright notice appears on all copies of source code
20 2) An acknowledgment appears with any substantial usage of the code
21 3) If this code is contributed to any other open source project, it
22 must not be reformatted such that the indentation, bracketing or
23 overall style is modified significantly.
24
25 This software is distributed WITHOUT ANY WARRANTY; without even the
26 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27
28=========================================================================*/
44#ifndef vtkH5PartReader_h
45#define vtkH5PartReader_h
46
47#include "vtkIOH5partModule.h" // for export macro
49
50#include <string> // for string
51#include <vector> // for vector
52
54struct H5PartFile;
55class VTKIOH5PART_EXPORT vtkH5PartReader : public vtkPolyDataAlgorithm
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
63
66 void SetFileName(VTK_FILEPATH char* filename);
69
71
74 vtkGetStringMacro(Xarray);
75 vtkSetStringMacro(Xarray);
77
79
82 vtkGetStringMacro(Yarray);
83 vtkSetStringMacro(Yarray);
85
87
90 vtkGetStringMacro(Zarray);
91 vtkSetStringMacro(Zarray);
93
95
103 vtkSetMacro(GenerateVertexCells, int);
104 vtkGetMacro(GenerateVertexCells, int);
105 vtkBooleanMacro(GenerateVertexCells, int);
107
109
114 vtkSetMacro(CombineVectorComponents, int);
115 vtkGetMacro(CombineVectorComponents, int);
116 vtkBooleanMacro(CombineVectorComponents, int);
118
120
129 vtkSetMacro(MaskOutOfTimeRangeOutput, int);
130 vtkGetMacro(MaskOutOfTimeRangeOutput, int);
131 vtkBooleanMacro(MaskOutOfTimeRangeOutput, int);
133
135
146 const char* GetPointArrayName(int index);
147 int GetPointArrayStatus(const char* name);
148 void SetPointArrayStatus(const char* name, int status);
150 void EnableAll();
151 void Disable(const char* name);
152 void Enable(const char* name);
153
154 int GetNumberOfPointArrayStatusArrays() { return GetNumberOfPointArrays(); }
155 const char* GetPointArrayStatusArrayName(int index) { return GetPointArrayName(index); }
156 int GetPointArrayStatusArrayStatus(const char* name) { return GetPointArrayStatus(name); }
157 void SetPointArrayStatusArrayStatus(const char* name, int status)
158 {
159 this->SetPointArrayStatus(name, status);
160 }
161
163
165 int GetNumberOfCoordinateArrays() { return GetNumberOfPointArrays(); }
166 const char* GetCoordinateArrayName(int index) { return GetPointArrayName(index); }
167 int GetCoordinateArrayStatus(const char* name);
168 void SetCoordinateArrayStatus(const char* name, int status);
170
171protected:
174 //
177 int OpenFile();
178 void CloseFile();
179 // void CopyIntoCoords(int offset, vtkDataArray *source, vtkDataArray *dest);
180 // returns 0 if no, returns 1,2,3,45 etc for the first, second...
181 // example : if CombineVectorComponents is true, then
182 // velocity_0 returns 1, velocity_1 returns 2 etc
183 // if CombineVectorComponents is false, then
184 // velocity_0 returns 0, velocity_1 returns 0 etc
185 int IndexOfVectorComponent(const char* name);
186
187 std::string NameOfVectorComponent(const char* name);
188
189 //
190 // Internal Variables
191 //
192 char* FileName;
199 H5PartFile* H5FileId;
204 //
205 char* Xarray;
206 char* Yarray;
207 char* Zarray;
208
209 std::vector<double> TimeStepValues;
210
211 // To allow paraview gui to enable/disable scalar reading
213
214private:
215 vtkH5PartReader(const vtkH5PartReader&) = delete;
216 void operator=(const vtkH5PartReader&) = delete;
217};
218
219#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:40
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
Definition: vtkTimeStamp.h:36
#define VTK_FILEPATH