VTK
vtkXMLStructuredDataWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLStructuredDataWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
23 #ifndef vtkXMLStructuredDataWriter_h
24 #define vtkXMLStructuredDataWriter_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
27 #include "vtkXMLWriter.h"
28 
29 class vtkAbstractArray;
30 class vtkInformation;
32 
33 class VTKIOXML_EXPORT vtkXMLStructuredDataWriter : public vtkXMLWriter
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40 
44  vtkSetMacro(NumberOfPieces, int);
45  vtkGetMacro(NumberOfPieces, int);
47 
49 
53  vtkSetMacro(WritePiece, int);
54  vtkGetMacro(WritePiece, int);
56 
58 
61  vtkSetMacro(GhostLevel, int);
62  vtkGetMacro(GhostLevel, int);
64 
66 
71  vtkSetVector6Macro(WriteExtent, int);
72  vtkGetVector6Macro(WriteExtent, int);
74 
75 protected:
78 
79  // Writing drivers defined by subclasses.
80  virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
81  virtual void WriteAppendedPiece(int index, vtkIndent indent);
82  virtual void WriteAppendedPieceData(int index);
83  virtual void WriteInlinePiece(vtkIndent indent);
84  virtual void GetInputExtent(int* extent)=0;
85 
86  virtual int WriteHeader();
87  virtual int WriteAPiece();
88  virtual int WriteFooter();
89 
90  virtual void AllocatePositionArrays();
91  virtual void DeletePositionArrays();
92 
93  virtual int WriteInlineMode(vtkIndent indent);
94  vtkIdType GetStartTuple(int* extent, vtkIdType* increments,
95  int i, int j, int k);
96  void CalculatePieceFractions(float* fractions);
97 
98  void SetInputUpdateExtent(int piece);
99  int ProcessRequest(vtkInformation* request,
100  vtkInformationVector** inputVector,
101  vtkInformationVector* outputVector);
102 
103  vtkSetVector6Macro(InternalWriteExtent, int);
104 
105  // The extent of the input to write, as specified by user
106  int WriteExtent[6];
107 
108  // The actual extent of the input to write.
109  int InternalWriteExtent[6];
110 
111  // Number of pieces used for streaming.
113 
115 
117 
119 
121 
122  vtkTypeInt64* ExtentPositions;
123 
124  // Appended data offsets of point and cell data arrays.
125  // Store offset position (add TimeStep support)
128 
129 private:
130  vtkXMLStructuredDataWriter(const vtkXMLStructuredDataWriter&) VTK_DELETE_FUNCTION;
131  void operator=(const vtkXMLStructuredDataWriter&) VTK_DELETE_FUNCTION;
132 };
133 
134 #endif
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
int vtkIdType
Definition: vtkType.h:287
Superclass for VTK XML structured data writers.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:53
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.