VTK  9.2.6
vtkHDFReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHDFReader.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=========================================================================*/
20
21#ifndef vtkHDFReader_h
22#define vtkHDFReader_h
23
25#include "vtkIOHDFModule.h" // For export macro
26#include <vector> // For storing list of values
27
30class vtkCommand;
32class vtkDataSet;
34class vtkImageData;
36class vtkInformation;
39
49class VTKIOHDF_EXPORT vtkHDFReader : public vtkDataObjectAlgorithm
50{
51public:
52 static vtkHDFReader* New();
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
63
71 virtual int CanReadFile(VTK_FILEPATH const char* name);
72
74
80
82
90
92
98
100
104 const char* GetPointArrayName(int index);
105 const char* GetCellArrayName(int index);
107
108 vtkSetMacro(MaximumLevelsToReadByDefaultForAMR, unsigned int);
109 vtkGetMacro(MaximumLevelsToReadByDefaultForAMR, unsigned int);
110
111protected:
113 ~vtkHDFReader() override;
114
119 constexpr static int GetNumberOfAttributeTypes() { return 3; }
120
124 int CanReadFileVersion(int major, int minor);
125
127
131 int Read(vtkInformation* outInfo, vtkImageData* data);
135
140 int Read(const std::vector<vtkIdType>& numberOfPoints,
141 const std::vector<vtkIdType>& numberOfCells,
142 const std::vector<vtkIdType>& numberOfConnectivityIds, int filePiece,
143 vtkUnstructuredGrid* pieceData);
148
153 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
154
156
161 vtkInformationVector* outputVector) override;
163 vtkInformationVector* outputVector) override;
165 vtkInformationVector* outputVector) override;
167
172
173private:
174 vtkHDFReader(const vtkHDFReader&) = delete;
175 void operator=(const vtkHDFReader&) = delete;
176
177protected:
181 char* FileName;
182
188
195
199 double Origin[3];
200 double Spacing[3];
202
204
205 class Implementation;
207};
208
209#endif
Abstract superclass for all arrays.
supports function callbacks
superclass for callback/observer methods
Definition vtkCommand.h:395
Store on/off settings for data arrays, etc.
general representation of visualization data
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
Implementation for the vtkHDFReader.
int GetNumberOfPointArrays()
Get the number of point or cell arrays available in the input.
int GetNumberOfCellArrays()
const char * GetCellArrayName(int index)
virtual vtkDataArraySelection * GetFieldDataArraySelection()
vtkDataSet * GetOutputAsDataSet(int index)
virtual vtkDataArraySelection * GetCellDataArraySelection()
int CanReadFileVersion(int major, int minor)
Test if the reader can read a file with the given version number.
int Read(vtkInformation *outInfo, vtkImageData *data)
Reads the 'data' requested in 'outInfo' (through extents or pieces).
~vtkHDFReader() override
vtkSetFilePathMacro(FileName)
Get/Set the name of the input file.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Standard functions to specify the type, information and read the data from the file.
double Spacing[3]
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
static vtkHDFReader * New()
static constexpr int GetNumberOfAttributeTypes()
How many attribute types we have.
int WholeExtent[6]
Image data topology and geometry.
vtkGetFilePathMacro(FileName)
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
Modify this object when an array selection is changed.
int AddFieldArrays(vtkDataObject *data)
Read the field arrays from the file and add them to the dataset.
unsigned int MaximumLevelsToReadByDefaultForAMR
const char * GetPointArrayName(int index)
Get the name of the point or cell array with the given index in the input.
double Origin[3]
char * FileName
The input file's name.
int Read(const std::vector< vtkIdType > &numberOfPoints, const std::vector< vtkIdType > &numberOfCells, const std::vector< vtkIdType > &numberOfConnectivityIds, int filePiece, vtkUnstructuredGrid *pieceData)
Read 'pieceData' specified by 'filePiece' where number of points, cells and connectivity ids store th...
virtual vtkDataArraySelection * GetPointDataArraySelection()
Get the data array selection tables used to configure which data arrays are loaded by the reader.
vtkDataArraySelection * DataArraySelection[3]
The array selections.
vtkCallbackCommand * SelectionObserver
The observer to modify this object when the array selections are modified.
virtual int CanReadFile(VTK_FILEPATH const char *name)
Test whether the file (type) with the given name can be read by this reader.
int Read(vtkInformation *outInfo, vtkOverlappingAMR *data)
void PrintPieceInformation(vtkInformation *outInfo)
Print update number of pieces, piece number and ghost levels.
int Read(vtkInformation *outInfo, vtkUnstructuredGrid *data)
Implementation * Impl
vtkDataSet * GetOutputAsDataSet()
Get the output as a vtkDataSet pointer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
dataset represents arbitrary combinations of all possible cell types
#define VTK_FILEPATH