VTK
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 =========================================================================*/
33 #ifndef vtkXdmf3Reader_h
34 #define vtkXdmf3Reader_h
35 
36 #include "vtkIOXdmf3Module.h" // For export macro
37 #include "vtkDataObjectAlgorithm.h"
38 
40 class vtkGraph;
41 
42 class VTKIOXDMF3_EXPORT vtkXdmf3Reader : public vtkDataObjectAlgorithm
43 {
44 public:
45  static vtkXdmf3Reader* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  void SetFileName(const char* filename);
53 
55 
60  virtual void AddFileName(const char* filename);
61  virtual void RemoveAllFileNames();
63 
65 
70  vtkSetMacro(FileSeriesAsTime, bool);
71  vtkGetMacro(FileSeriesAsTime, bool);
73 
77  virtual int CanReadFile(const char* filename);
78 
84  int GetNumberOfPointArrays();
85 
90  const char* GetPointArrayName(int index);
91 
93 
96  int GetPointArrayStatus(const char* name);
97  void SetPointArrayStatus(const char* name, int status);
99 
101 
106  int GetNumberOfCellArrays();
107  const char* GetCellArrayName(int index);
108  void SetCellArrayStatus(const char* name, int status);
109  int GetCellArrayStatus(const char* name);
111 
113 
118  int GetNumberOfFieldArrays();
119  const char* GetFieldArrayName(int index);
120  void SetFieldArrayStatus(const char* name, int status);
121  int GetFieldArrayStatus(const char* name);
123 
125 
130  int GetNumberOfGrids();
131  const char* GetGridName(int index);
132  void SetGridStatus(const char* gridname, int status);
133  int GetGridStatus(const char* gridname);
135 
137 
143  int GetNumberOfSets();
144  const char* GetSetName(int index);
145  void SetSetStatus(const char* gridname, int status);
146  int GetSetStatus(const char* gridname);
148 
152  int GetNumberOfSetArrays() { return this->GetNumberOfSets(); }
153  const char* GetSetArrayName(int index)
154  { return this->GetSetName(index); }
155  int GetSetArrayStatus(const char* name)
156  { return this->GetSetStatus(name); }
157 
162  virtual vtkGraph* GetSIL();
163 
167  int GetSILUpdateStamp();
168 
169 protected:
170  vtkXdmf3Reader();
171  ~vtkXdmf3Reader();
172 
173  const char* FileNameInternal;
174  vtkSetStringMacro(FileNameInternal);
175 
176  //Overridden to announce that we make general DataObjects.
178 
179  //Overridden to handle RDO requests the way we need to
181  vtkInformationVector *) override;
182 
183  //Overridden to create the correct vtkDataObject subclass for the file.
184  virtual int RequestDataObjectInternal(
186 
187  //Overridden to announce temporal information and to participate in
188  //structured extent splitting.
190  vtkInformationVector *) override;
191 
192  //Read the XDMF and HDF input files and fill in vtk data objects.
194  vtkInformationVector *) override;
195 
196  vtkXdmf3ArraySelection* GetFieldArraySelection();
197  vtkXdmf3ArraySelection* GetCellArraySelection();
198  vtkXdmf3ArraySelection* GetPointArraySelection();
199  vtkXdmf3ArraySelection* GetGridsSelection();
200  vtkXdmf3ArraySelection* GetSetsSelection();
206 
207 private:
208  vtkXdmf3Reader(const vtkXdmf3Reader&) = delete;
209  void operator=(const vtkXdmf3Reader&) = delete;
210 
211  bool FileSeriesAsTime;
212 
213  class Internals;
214  Internals *Internal;
215 };
216 
217 #endif
const char * GetSetArrayName(int index)
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
vtkXdmf3ArraySelection * CellArraysCache
vtkXdmf3ArraySelection * FieldArraysCache
vtkXdmf3ArraySelection * SetsCache
vtkXdmf3ArraySelection * GridsCache
int GetNumberOfSetArrays()
These methods are provided to make it easier to use the Sets in ParaView.
Base class for graph data types.
Definition: vtkGraph.h:287
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkXdmf3ArraySelection * PointArraysCache
a simple class to control print indentation
Definition: vtkIndent.h:39
const char * FileNameInternal
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
int GetSetArrayStatus(const char *name)
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
Reads eXtensible Data Model and Format files.
helper to identify requested arrays with
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.