VTK  9.3.20240425
vtkXdmf3Reader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
20#ifndef vtkXdmf3Reader_h
21#define vtkXdmf3Reader_h
22
24#include "vtkIOXdmf3Module.h" // For export macro
25
26VTK_ABI_NAMESPACE_BEGIN
28class vtkGraph;
29
30class VTKIOXDMF3_EXPORT vtkXdmf3Reader : public vtkDataObjectAlgorithm
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
40 void SetFileName(VTK_FILEPATH const char* filename);
41
43
48 virtual void AddFileName(VTK_FILEPATH const char* filename);
49 virtual void RemoveAllFileNames();
51
53
58 vtkSetMacro(FileSeriesAsTime, bool);
59 vtkGetMacro(FileSeriesAsTime, bool);
61
65 virtual int CanReadFile(VTK_FILEPATH const char* filename);
66
73
78 const char* GetPointArrayName(int index);
79
81
84 int GetPointArrayStatus(const char* name);
85 void SetPointArrayStatus(const char* name, int status);
87
89
95 const char* GetCellArrayName(int index);
96 void SetCellArrayStatus(const char* name, int status);
97 int GetCellArrayStatus(const char* name);
99
101
107 const char* GetFieldArrayName(int index);
108 void SetFieldArrayStatus(const char* name, int status);
109 int GetFieldArrayStatus(const char* name);
111
113
119 const char* GetGridName(int index);
120 void SetGridStatus(const char* gridname, int status);
121 int GetGridStatus(const char* gridname);
123
125
132 const char* GetSetName(int index);
133 void SetSetStatus(const char* gridname, int status);
134 int GetSetStatus(const char* gridname);
136
140 int GetNumberOfSetArrays() { return this->GetNumberOfSets(); }
141 const char* GetSetArrayName(int index) { return this->GetSetName(index); }
142 int GetSetArrayStatus(const char* name) { return this->GetSetStatus(name); }
143
148 virtual vtkGraph* GetSIL();
149
154
155protected:
157 ~vtkXdmf3Reader() override;
158
159 const char* FileNameInternal;
160 vtkSetFilePathMacro(FileNameInternal);
161
162 // Overridden to announce that we make general DataObjects.
163 int FillOutputPortInformation(int port, vtkInformation* info) override;
164
165 // Overridden to handle RDO requests the way we need to
168
169 // Overridden to create the correct vtkDataObject subclass for the file.
171
172 // Overridden to announce temporal information and to participate in
173 // structured extent splitting.
175
176 // Read the XDMF and HDF input files and fill in vtk data objects.
178
189
190private:
191 vtkXdmf3Reader(const vtkXdmf3Reader&) = delete;
192 void operator=(const vtkXdmf3Reader&) = delete;
193
194 bool FileSeriesAsTime;
195
196 class Internals;
197 Internals* Internal;
198};
199
200VTK_ABI_NAMESPACE_END
201#endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition vtkGraph.h:340
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
helper to identify requested arrays with
Reads eXtensible Data Model and Format files.
const char * GetSetArrayName(int index)
int GetCellArrayStatus(const char *name)
Get information about cell-based arrays.
int GetNumberOfSets()
Get/Set information about sets.
vtkXdmf3ArraySelection * GetSetsSelection()
int GetGridStatus(const char *gridname)
Get/Set information about grids.
vtkXdmf3ArraySelection * GetCellArraySelection()
virtual int CanReadFile(VTK_FILEPATH const char *filename)
Determine if the file can be read with this reader.
int GetPointArrayStatus(const char *name)
Get/Set the point array status.
vtkXdmf3ArraySelection * FieldArraysCache
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual int RequestDataObjectInternal(vtkInformationVector *)
vtkXdmf3ArraySelection * CellArraysCache
vtkXdmf3ArraySelection * SetsCache
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void SetGridStatus(const char *gridname, int status)
Get/Set information about grids.
vtkXdmf3ArraySelection * GetGridsSelection()
int GetSetStatus(const char *gridname)
Get/Set information about sets.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * FileNameInternal
virtual void RemoveAllFileNames()
Add and remove give the reader a list of top level xml files to read.
static vtkXdmf3Reader * New()
int GetFieldArrayStatus(const char *name)
Get information about unaligned arrays.
void SetSetStatus(const char *gridname, int status)
Get/Set information about sets.
virtual void AddFileName(VTK_FILEPATH const char *filename)
Add and remove give the reader a list of top level xml files to read.
int GetSetArrayStatus(const char *name)
const char * GetGridName(int index)
Get/Set information about grids.
vtkXdmf3ArraySelection * PointArraysCache
vtkXdmf3ArraySelection * GetPointArraySelection()
vtkXdmf3ArraySelection * GridsCache
int GetSILUpdateStamp()
Every time the SIL is updated a this will return a different value.
void SetFileName(VTK_FILEPATH const char *filename)
Set tells the reader the name of a single top level xml file to read.
void SetCellArrayStatus(const char *name, int status)
Get information about cell-based arrays.
const char * GetSetName(int index)
Get/Set information about sets.
int GetNumberOfSetArrays()
These methods are provided to make it easier to use the Sets in ParaView.
const char * GetFieldArrayName(int index)
Get information about unaligned arrays.
int GetNumberOfFieldArrays()
Get information about unaligned arrays.
int GetNumberOfCellArrays()
Get information about cell-based arrays.
vtkSetFilePathMacro(FileNameInternal)
int GetNumberOfGrids()
Get/Set information about grids.
const char * GetPointArrayName(int index)
Returns the name of point array at the give index.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
virtual vtkGraph * GetSIL()
SIL describes organization of/relationships between classifications eg.
void SetFieldArrayStatus(const char *name, int status)
Get information about unaligned arrays.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const char * GetCellArrayName(int index)
Get information about cell-based arrays.
vtkXdmf3ArraySelection * GetFieldArraySelection()
int GetNumberOfPointArrays()
Get information about point-based arrays.
~vtkXdmf3Reader() override
void SetPointArrayStatus(const char *name, int status)
Get/Set the point array status.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_FILEPATH