VTK  9.3.0
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 
23 #include "vtkDataObjectAlgorithm.h"
24 #include "vtkIOXdmf3Module.h" // For export macro
25 
26 VTK_ABI_NAMESPACE_BEGIN
28 class vtkGraph;
29 
30 class VTKIOXDMF3_EXPORT vtkXdmf3Reader : public vtkDataObjectAlgorithm
31 {
32 public:
33  static vtkXdmf3Reader* New();
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 
155 protected:
157  ~vtkXdmf3Reader() override;
158 
159  const char* FileNameInternal;
160  vtkSetFilePathMacro(FileNameInternal);
161 
162  // Overridden to announce that we make general DataObjects.
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 
190 private:
191  vtkXdmf3Reader(const vtkXdmf3Reader&) = delete;
192  void operator=(const vtkXdmf3Reader&) = delete;
193 
194  bool FileSeriesAsTime;
195 
196  class Internals;
197  Internals* Internal;
198 };
199 
200 VTK_ABI_NAMESPACE_END
201 #endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
helper to identify requested arrays with
Reads eXtensible Data Model and Format files.
int GetCellArrayStatus(const char *name)
Get information about cell-based arrays.
int GetNumberOfSets()
Get/Set information about sets.
int GetGridStatus(const char *gridname)
Get/Set information about grids.
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 *)
const char * GetCellArrayName(int index)
Get information about cell-based arrays.
vtkXdmf3ArraySelection * CellArraysCache
vtkXdmf3ArraySelection * SetsCache
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
const char * GetSetArrayName(int index)
void SetGridStatus(const char *gridname, int status)
Get/Set information about grids.
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.
vtkXdmf3ArraySelection * GetSetsSelection()
int GetFieldArrayStatus(const char *name)
Get information about unaligned arrays.
vtkXdmf3ArraySelection * GetCellArraySelection()
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)
vtkXdmf3ArraySelection * PointArraysCache
vtkXdmf3ArraySelection * GridsCache
int GetSILUpdateStamp()
Every time the SIL is updated a this will return a different value.
vtkXdmf3ArraySelection * GetGridsSelection()
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.
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.
static vtkXdmf3Reader * New()
const char * GetPointArrayName(int index)
Returns the name of point array at the give index.
vtkXdmf3ArraySelection * GetFieldArraySelection()
int GetNumberOfCellArrays()
Get information about cell-based arrays.
virtual vtkGraph * GetSIL()
SIL describes organization of/relationships between classifications eg.
vtkSetFilePathMacro(FileNameInternal)
vtkXdmf3ArraySelection * GetPointArraySelection()
int GetNumberOfGrids()
Get/Set information about grids.
const char * GetGridName(int index)
Get/Set information about grids.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
void SetFieldArrayStatus(const char *name, int status)
Get information about unaligned arrays.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const char * GetSetName(int index)
Get/Set information about sets.
int GetNumberOfPointArrays()
Get information about point-based arrays.
~vtkXdmf3Reader() override
void SetPointArrayStatus(const char *name, int status)
Get/Set the point array status.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ name
Definition: vtkX3D.h:219
@ index
Definition: vtkX3D.h:246
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FILEPATH