VTK  9.1.0
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=========================================================================*/
41#ifndef vtkH5PartReader_h
42#define vtkH5PartReader_h
43
44#include "vtkIOH5partModule.h" // for export macro
46
47#include <string> // for string
48#include <vector> // for vector
49
51struct H5PartFile;
52class VTKIOH5PART_EXPORT vtkH5PartReader : public vtkPolyDataAlgorithm
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
63 void SetFileName(VTK_FILEPATH char* filename);
66
68
71 vtkGetStringMacro(Xarray);
72 vtkSetStringMacro(Xarray);
74
76
79 vtkGetStringMacro(Yarray);
80 vtkSetStringMacro(Yarray);
82
84
87 vtkGetStringMacro(Zarray);
88 vtkSetStringMacro(Zarray);
90
92
100 vtkSetMacro(GenerateVertexCells, int);
101 vtkGetMacro(GenerateVertexCells, int);
102 vtkBooleanMacro(GenerateVertexCells, int);
104
106
111 vtkSetMacro(CombineVectorComponents, int);
112 vtkGetMacro(CombineVectorComponents, int);
113 vtkBooleanMacro(CombineVectorComponents, int);
115
117
126 vtkSetMacro(MaskOutOfTimeRangeOutput, int);
127 vtkGetMacro(MaskOutOfTimeRangeOutput, int);
128 vtkBooleanMacro(MaskOutOfTimeRangeOutput, int);
130
132
143 const char* GetPointArrayName(int index);
144 int GetPointArrayStatus(const char* name);
145 void SetPointArrayStatus(const char* name, int status);
147 void EnableAll();
148 void Disable(const char* name);
149 void Enable(const char* name);
150
151 int GetNumberOfPointArrayStatusArrays() { return GetNumberOfPointArrays(); }
152 const char* GetPointArrayStatusArrayName(int index) { return GetPointArrayName(index); }
153 int GetPointArrayStatusArrayStatus(const char* name) { return GetPointArrayStatus(name); }
154 void SetPointArrayStatusArrayStatus(const char* name, int status)
155 {
156 this->SetPointArrayStatus(name, status);
157 }
158
160
162 int GetNumberOfCoordinateArrays() { return GetNumberOfPointArrays(); }
163 const char* GetCoordinateArrayName(int index) { return GetPointArrayName(index); }
165 void SetCoordinateArrayStatus(const char* name, int status);
167
168protected:
171 //
174 int OpenFile();
175 void CloseFile();
176 // void CopyIntoCoords(int offset, vtkDataArray *source, vtkDataArray *dest);
177 // returns 0 if no, returns 1,2,3,45 etc for the first, second...
178 // example : if CombineVectorComponents is true, then
179 // velocity_0 returns 1, velocity_1 returns 2 etc
180 // if CombineVectorComponents is false, then
181 // velocity_0 returns 0, velocity_1 returns 0 etc
182 int IndexOfVectorComponent(const char* name);
183
185
186 //
187 // Internal Variables
188 //
189 char* FileName;
196 H5PartFile* H5FileId;
201 //
202 char* Xarray;
203 char* Yarray;
204 char* Zarray;
205
206 std::vector<double> TimeStepValues;
207
208 // To allow paraview gui to enable/disable scalar reading
210
211private:
212 vtkH5PartReader(const vtkH5PartReader&) = delete;
213 void operator=(const vtkH5PartReader&) = delete;
214};
215
216#endif
Store on/off settings for data arrays for a vtkSource.
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:113
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:52
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
@ string
Definition: vtkX3D.h:496
#define VTK_FILEPATH