VTK  9.0.1
vtkXdmf3Reader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXdmf3Reader.h
5  Language: C++
6 
7  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
30 #ifndef vtkXdmf3Reader_h
31 #define vtkXdmf3Reader_h
32 
33 #include "vtkDataObjectAlgorithm.h"
34 #include "vtkIOXdmf3Module.h" // For export macro
35 
37 class vtkGraph;
38 
39 class VTKIOXDMF3_EXPORT vtkXdmf3Reader : public vtkDataObjectAlgorithm
40 {
41 public:
42  static vtkXdmf3Reader* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void SetFileName(const char* filename);
50 
52 
57  virtual void AddFileName(const char* filename);
58  virtual void RemoveAllFileNames();
60 
62 
67  vtkSetMacro(FileSeriesAsTime, bool);
68  vtkGetMacro(FileSeriesAsTime, bool);
70 
74  virtual int CanReadFile(const char* filename);
75 
82 
87  const char* GetPointArrayName(int index);
88 
90 
93  int GetPointArrayStatus(const char* name);
94  void SetPointArrayStatus(const char* name, int status);
96 
98 
104  const char* GetCellArrayName(int index);
105  void SetCellArrayStatus(const char* name, int status);
106  int GetCellArrayStatus(const char* name);
108 
110 
116  const char* GetFieldArrayName(int index);
117  void SetFieldArrayStatus(const char* name, int status);
118  int GetFieldArrayStatus(const char* name);
120 
122 
128  const char* GetGridName(int index);
129  void SetGridStatus(const char* gridname, int status);
130  int GetGridStatus(const char* gridname);
132 
134 
141  const char* GetSetName(int index);
142  void SetSetStatus(const char* gridname, int status);
143  int GetSetStatus(const char* gridname);
145 
149  int GetNumberOfSetArrays() { return this->GetNumberOfSets(); }
150  const char* GetSetArrayName(int index) { return this->GetSetName(index); }
151  int GetSetArrayStatus(const char* name) { return this->GetSetStatus(name); }
152 
157  virtual vtkGraph* GetSIL();
158 
163 
164 protected:
166  ~vtkXdmf3Reader() override;
167 
168  const char* FileNameInternal;
169  vtkSetStringMacro(FileNameInternal);
170 
171  // Overridden to announce that we make general DataObjects.
173 
174  // Overridden to handle RDO requests the way we need to
177 
178  // Overridden to create the correct vtkDataObject subclass for the file.
180 
181  // Overridden to announce temporal information and to participate in
182  // structured extent splitting.
183  virtual int RequestInformation(
185 
186  // Read the XDMF and HDF input files and fill in vtk data objects.
188 
199 
200 private:
201  vtkXdmf3Reader(const vtkXdmf3Reader&) = delete;
202  void operator=(const vtkXdmf3Reader&) = delete;
203 
204  bool FileSeriesAsTime;
205 
206  class Internals;
207  Internals* Internal;
208 };
209 
210 #endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:34
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)
int GetNumberOfSets()
Get/Set information about sets.
int GetGridStatus(const char *gridname)
int GetPointArrayStatus(const char *name)
Get/Set the point array status.
vtkXdmf3ArraySelection * FieldArraysCache
virtual int RequestDataObjectInternal(vtkInformationVector *)
const char * GetCellArrayName(int index)
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)
int GetSetStatus(const char *gridname)
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()
vtkXdmf3ArraySelection * GetSetsSelection()
int GetFieldArrayStatus(const char *name)
vtkXdmf3ArraySelection * GetCellArraySelection()
void SetFileName(const char *filename)
Set tells the reader the name of a single top level xml file to read.
virtual int CanReadFile(const char *filename)
Determine if the file can be read with this reader.
void SetSetStatus(const char *gridname, int status)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
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 SetCellArrayStatus(const char *name, int status)
int GetNumberOfSetArrays()
These methods are provided to make it easier to use the Sets in ParaView.
const char * GetFieldArrayName(int index)
int GetNumberOfFieldArrays()
Get information about unaligned arrays.
static vtkXdmf3Reader * New()
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
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.
vtkXdmf3ArraySelection * GetPointArraySelection()
int GetNumberOfGrids()
Get/Set information about grids.
const char * GetGridName(int index)
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
void SetFieldArrayStatus(const char *name, int status)
const char * GetSetName(int index)
int GetNumberOfPointArrays()
Get information about point-based arrays.
~vtkXdmf3Reader() override
virtual void AddFileName(const char *filename)
Add and remove give the reader a list of top level xml files to read.
void SetPointArrayStatus(const char *name, int status)
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69