ParaView
vtkFileSeriesWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkFileSeriesWriter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkFileSeriesWriter_h
25 #define vtkFileSeriesWriter_h
26 
27 #include "vtkDataObjectAlgorithm.h"
28 #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
30 
31 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkFileSeriesWriter : public vtkDataObjectAlgorithm
32 {
33 public:
34  static vtkFileSeriesWriter* New();
35  vtkTypeMacro(vtkFileSeriesWriter, vtkDataObjectAlgorithm);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
39 
42  virtual void SetWriter(vtkAlgorithm*);
43  vtkGetObjectMacro(Writer, vtkAlgorithm);
45 
49  virtual vtkMTimeType GetMTime();
50 
52 
56  vtkSetStringMacro(FileNameMethod);
57  vtkGetStringMacro(FileNameMethod);
59 
61 
64  vtkSetStringMacro(FileName);
65  vtkGetStringMacro(FileName);
67 
71  int Write();
72 
74 
78  vtkGetMacro(WriteAllTimeSteps, int);
79  vtkSetMacro(WriteAllTimeSteps, int);
80  vtkBooleanMacro(WriteAllTimeSteps, int);
82 
86  virtual int ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
87 
91  void SetInterpreter(vtkClientServerInterpreter* interp) { this->Interpreter = interp; }
92 
93 protected:
96 
97  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector);
99  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
100  vtkInformationVector* outputVector);
101  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
103 
104 private:
105  vtkFileSeriesWriter(const vtkFileSeriesWriter&) VTK_DELETE_FUNCTION;
106  void operator=(const vtkFileSeriesWriter&) VTK_DELETE_FUNCTION;
107 
108  void SetWriterFileName(const char* fname);
109  void WriteATimestep(vtkDataObject*, vtkInformation* inInfo);
110  void WriteInternal();
111 
112  vtkAlgorithm* Writer;
113  char* FileNameMethod;
114 
115  int WriteAllTimeSteps;
116  int NumberOfTimeSteps;
117  int CurrentTimeIndex;
118 
119  // The name of the output file.
120  char* FileName;
121 
122  vtkClientServerInterpreter* Interpreter;
123 };
124 
125 #endif
Run-time VTK interpreter.
meta-writer for writing a file series using writers that are not time-aware.
void SetInterpreter(vtkClientServerInterpreter *interp)
Get/Set the interpreter to use to call methods on the writer.