VTK  9.1.0
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) override;
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  void WritePrimaryElementAttributes(ostream& os, vtkIndent indent) override;
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, int i, int j, int k);
95  void CalculatePieceFractions(float* fractions);
96 
97  void SetInputUpdateExtent(int piece);
99  vtkInformationVector* outputVector) override;
100 
101  vtkSetVector6Macro(InternalWriteExtent, int);
102 
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:
131  void operator=(const vtkXMLStructuredDataWriter&) = delete;
132 };
133 
134 #endif
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for VTK XML structured data writers.
virtual void WriteAppendedPiece(int index, vtkIndent indent)
void WritePrimaryElementAttributes(ostream &os, vtkIndent indent) override
virtual void WriteAppendedPieceData(int index)
void CalculatePieceFractions(float *fractions)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void DeletePositionArrays()
virtual void WriteInlinePiece(vtkIndent indent)
vtkIdType GetStartTuple(int *extent, vtkIdType *increments, int i, int j, int k)
virtual void AllocatePositionArrays()
virtual void GetInputExtent(int *extent)=0
static vtkIdType GetNumberOfValues(vtkDataSet *input)
~vtkXMLStructuredDataWriter() override
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void SetInputUpdateExtent(int piece)
virtual int WriteInlineMode(vtkIndent indent)
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:62
@ extent
Definition: vtkX3D.h:351
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332