VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkXdmfReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXdmfReader.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 =========================================================================*/
39 #ifndef __vtkXdmfReader_h
40 #define __vtkXdmfReader_h
41 
42 #include "vtkIOXdmf2Module.h" // For export macro
43 #include "vtkDataReader.h"
44 
46 class vtkXdmfDocument;
47 class vtkGraph;
48 
50 {
51 public:
52  static vtkXdmfReader* New();
53  vtkTypeMacro(vtkXdmfReader, vtkDataReader);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
56  // Until needed, multiple domains are not supported.
61  //unsigned int GetNumberOfDomains();
62 
64 
70  vtkSetStringMacro(DomainName);
71  vtkGetStringMacro(DomainName);
73 
77  // vtkGetStringMacro(ActiveDomainName);
78 
82  int GetNumberOfPointArrays();
83 
86  const char* GetPointArrayName(int index);
87 
89 
90  int GetPointArrayStatus(const char* name);
91  void SetPointArrayStatus(const char* name, int status);
93 
95 
98  int GetNumberOfCellArrays();
99  const char* GetCellArrayName(int index);
100  void SetCellArrayStatus(const char* name, int status);
101  int GetCellArrayStatus(const char* name);
103 
105 
108  int GetNumberOfGrids();
109  const char* GetGridName(int index);
110  void SetGridStatus(const char* gridname, int status);
111  int GetGridStatus(const char* gridname);
113 
115 
119  int GetNumberOfSets();
120  const char* GetSetName(int index);
121  void SetSetStatus(const char* gridname, int status);
122  int GetSetStatus(const char* gridname);
124 
126 
128  int GetNumberOfSetArrays() { return this->GetNumberOfSets(); }
129  const char* GetSetArrayName(int index)
130  { return this->GetSetName(index); }
131  int GetSetArrayStatus(const char* name)
132  { return this->GetSetStatus(name); }
134 
136 
138  vtkSetVector3Macro(Stride, int);
139  vtkGetVector3Macro(Stride, int);
141 
143  virtual int CanReadFile(const char* filename);
144 
146 
147  vtkGetMacro(SILUpdateStamp, int);
149 
152  virtual vtkGraph* GetSIL();
153 
154 //BTX
155 protected:
156  vtkXdmfReader();
157  ~vtkXdmfReader();
158 
159  virtual int ProcessRequest(vtkInformation *request,
160  vtkInformationVector **inputVector,
161  vtkInformationVector *outputVector);
162  virtual int RequestDataObject(vtkInformationVector *outputVector);
168 
169  vtkXdmfArraySelection* GetPointArraySelection();
170  vtkXdmfArraySelection* GetCellArraySelection();
171  vtkXdmfArraySelection* GetGridSelection();
172  vtkXdmfArraySelection* GetSetsSelection();
173  void PassCachedSelections();
174 
175  char* DomainName;
176  // char* ActiveDomainName;
177  int Stride[3];
178  unsigned int LastTimeIndex;
179 
181 
182  // Until RequestInformation() is called, the active domain is not set
183  // correctly. If SetGridStatus() etc. are called before that happens, then we
184  // have no place to save the user choices. So we cache them in these temporary
185  // caches. These are passed on to the actual vtkXdmfArraySelection instances
186  // used by the active vtkXdmfDomain in RequestInformation().
187  // Note that these are only used until the first domain is setup, once that
188  // happens, the information set in these is passed to the domain and these
189  // are cleared an no longer used, until the active domain becomes invalid
190  // again.
195 
197 private:
199  bool PrepareDocument();
200 
203  int ChooseTimeStep(vtkInformation* outInfo);
204 
205 private:
206  vtkXdmfReader(const vtkXdmfReader&); // Not implemented
207  void operator=(const vtkXdmfReader&); // Not implemented
208 //ETX
209 };
210 
211 #endif
GLuint index
Definition: vtkgl.h:11983
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkXdmfArraySelection * CellArraysCache
#define VTKIOXDMF2_EXPORT
Reads eXtensible Data Model and Format files.
Definition: vtkXdmfReader.h:49
Base class for graph data types.
Definition: vtkGraph.h:288
static vtkDataReader * New()
vtkXdmfArraySelection * PointArraysCache
void PrintSelf(ostream &os, vtkIndent indent)
helper superclass for objects that read vtk data files
Definition: vtkDataReader.h:48
GLuint const GLchar * name
Definition: vtkgl.h:11983
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:38
const char * GetSetArrayName(int index)
vtkXdmfDocument * XdmfDocument
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkXdmfArraySelection * GridsCache
int GetNumberOfSetArrays()
Store zero or more vtkInformation instances.
unsigned int LastTimeIndex
vtkXdmfArraySelection * SetsCache
int GetSetArrayStatus(const char *name)