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 =========================================================================*/
22 #ifndef vtkXMLStructuredDataWriter_h
23 #define vtkXMLStructuredDataWriter_h
24 
25 #include "vtkIOXMLModule.h" // For export macro
26 #include "vtkXMLWriter.h"
27 
28 class vtkAbstractArray;
29 class vtkInformation;
31 
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
39 
41  vtkSetMacro(NumberOfPieces, int);
42  vtkGetMacro(NumberOfPieces, int);
44 
46 
48  vtkSetMacro(WritePiece, int);
49  vtkGetMacro(WritePiece, int);
51 
53 
54  vtkSetMacro(GhostLevel, int);
55  vtkGetMacro(GhostLevel, int);
57 
59 
62  vtkSetVector6Macro(WriteExtent, int);
63  vtkGetVector6Macro(WriteExtent, int);
65 
66 protected:
69 
70  // Writing drivers defined by subclasses.
71  virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
72  virtual void WriteAppendedPiece(int index, vtkIndent indent);
73  virtual void WriteAppendedPieceData(int index);
74  virtual void WriteInlinePiece(vtkIndent indent);
75  virtual void GetInputExtent(int* extent)=0;
76 
77  virtual int WriteHeader();
78  virtual int WriteAPiece();
79  virtual int WriteFooter();
80 
81  virtual void AllocatePositionArrays();
82  virtual void DeletePositionArrays();
83 
84  virtual int WriteInlineMode(vtkIndent indent);
85  vtkIdType GetStartTuple(int* extent, vtkIdType* increments,
86  int i, int j, int k);
87  void CalculatePieceFractions(float* fractions);
88 
89  void SetInputUpdateExtent(int piece);
90  int ProcessRequest(vtkInformation* request,
91  vtkInformationVector** inputVector,
92  vtkInformationVector* outputVector);
93 
94  vtkSetVector6Macro(InternalWriteExtent, int);
95 
96  // The extent of the input to write, as specified by user
97  int WriteExtent[6];
98 
99  // The actual extent of the input to write.
100  int InternalWriteExtent[6];
101 
102  // Number of pieces used for streaming.
104 
106 
108 
110 
112 
113  vtkTypeInt64* ExtentPositions;
114 
115  // Appended data offsets of point and cell data arrays.
116  // Store offset position (add TimeStep support)
119 
120 private:
121  vtkXMLStructuredDataWriter(const vtkXMLStructuredDataWriter&); // Not implemented.
122  void operator=(const vtkXMLStructuredDataWriter&); // Not implemented.
123 };
124 
125 #endif
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
int vtkIdType
Definition: vtkType.h:275
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:38
#define VTKIOXML_EXPORT
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.