VTK  9.1.0
H5RageAdaptor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: H5RageAdaptor.h
5
6 Copyright (c) Kitware, Inc.
7 All rights reserved.
8 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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#ifndef H5RageAdaptor_h
16#define H5RageAdaptor_h
17
19#include "vtkIOH5RageModule.h" // For export macro
20
21#include <string> // for std::string
22#include <vector> // for std::vector
23
25class vtkImageData;
27
28class VTKIOH5RAGE_EXPORT H5RageAdaptor
29{
30public:
33
34 int InitializeGlobal(const char* DescFile);
35 void LoadVariableData(vtkImageData* data, int timeStep, vtkDataArraySelection* cellSelection);
36 template <class T>
37 void ConvertHDFData(int ndims, int* dims_out, T* hdfData);
38
39 int GetNumberOfTimeSteps() { return this->NumberOfTimeSteps; }
40 double GetTimeStep(int step) { return this->TimeSteps[step]; }
41
42 int GetNumberOfVariables() { return (int)this->VariableName.size(); }
43 const char* GetVariableName(int indx) { return this->VariableName[indx].c_str(); }
44
45 int GetWholeExtent(int ext) { return this->WholeExtent[ext]; }
46 int GetSubExtent(int ext) { return this->SubExtent[ext]; }
47 int GetDimension(int dim) { return this->Dimension[dim]; }
48 double GetOrigin(int dim) { return this->Origin[dim]; }
49 double GetSpacing(int dim) { return this->Spacing[dim]; }
50
51protected:
52 // Collect the metadata
53 int CollectMetaData(const char* H5RageFileName);
54 int ParseH5RageFile(const char* H5RageFileName);
56
57 // Used in parallel reader and load balancing
59 int Rank;
61
62 // Time series of hdf files
63 std::vector<std::string> HdfFileName; // all hdf files
64
65 // Time step information retrieved from hdf filenames
67 double* TimeSteps;
68
69 // Geometry information for sharing data with other processors
72
73 int WholeExtent[6]; // Size of image
74 int SubExtent[6]; // Size of image this processor
75 int Dimension[3]; // Dimension of image
76 double Origin[3]; // Physical origin
77 double Spacing[3]; // Physical spacing
78
82
83 // Variable information retrieved from hdf filenames
85 std::vector<std::string> VariableName;
86};
87
88#endif
89
90// VTK-HeaderTest-Exclude: H5RageAdaptor.h
int ** ExtentSchedule
Definition: H5RageAdaptor.h:70
void LoadVariableData(vtkImageData *data, int timeStep, vtkDataArraySelection *cellSelection)
int GetWholeExtent(int ext)
Definition: H5RageAdaptor.h:45
double * TimeSteps
Definition: H5RageAdaptor.h:67
int GetNumberOfTimeSteps()
Definition: H5RageAdaptor.h:39
std::vector< std::string > HdfFileName
Definition: H5RageAdaptor.h:63
int GetSubExtent(int ext)
Definition: H5RageAdaptor.h:46
std::vector< std::string > VariableName
Definition: H5RageAdaptor.h:85
int CollectMetaData(const char *H5RageFileName)
std::string TrimString(const std::string &str)
const char * GetVariableName(int indx)
Definition: H5RageAdaptor.h:43
int ParseH5RageFile(const char *H5RageFileName)
int GetNumberOfVariables()
Definition: H5RageAdaptor.h:42
int InitializeGlobal(const char *DescFile)
double GetOrigin(int dim)
Definition: H5RageAdaptor.h:48
H5RageAdaptor(vtkMultiProcessController *ctrl)
double GetSpacing(int dim)
Definition: H5RageAdaptor.h:49
vtkMultiProcessController * Controller
Definition: H5RageAdaptor.h:58
int NumberOfDimensions
Definition: H5RageAdaptor.h:79
int * NumberOfTuples
Definition: H5RageAdaptor.h:71
double GetTimeStep(int step)
Definition: H5RageAdaptor.h:40
void ConvertHDFData(int ndims, int *dims_out, T *hdfData)
int GetDimension(int dim)
Definition: H5RageAdaptor.h:47
Store on/off settings for data arrays for a vtkSource.
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
Multiprocessing communication superclass.
@ data
Definition: vtkX3D.h:321
@ string
Definition: vtkX3D.h:496