VTK
vtkFieldDataSerializer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFieldDataSerializer.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  =========================================================================*/
31 #ifndef vtkFieldDataSerializer_h
32 #define vtkFieldDataSerializer_h
33 
34 #include "vtkParallelCoreModule.h" // For export macro
35 #include "vtkObject.h"
36 
37 // Forward declarations
38 class vtkIdList;
39 class vtkFieldData;
40 class vtkDataArray;
41 class vtkStringArray;
42 class vtkIntArray;
44 
45 class VTKPARALLELCORE_EXPORT vtkFieldDataSerializer : public vtkObject
46 {
47  public:
48  static vtkFieldDataSerializer* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
56  static void SerializeMetaData(
57  vtkFieldData *fieldData, vtkMultiProcessStream& bytestream);
58 
71  static void DeserializeMetaData(
72  vtkMultiProcessStream& bytestream,
73  vtkStringArray *names,
74  vtkIntArray *datatypes,
75  vtkIntArray *dimensions);
76 
80  static void Serialize(
81  vtkFieldData *fieldData, vtkMultiProcessStream& bytestream);
82 
86  static void SerializeTuples(
87  vtkIdList *tupleIds, vtkFieldData *fieldData,
88  vtkMultiProcessStream& bytestream);
89 
96  static void SerializeSubExtent(
97  int subext[6], int gridExtent[6], vtkFieldData *fieldData,
98  vtkMultiProcessStream& bytestream);
99 
105  static void DeSerializeToSubExtent(
106  int subext[6], int gridExtent[6], vtkFieldData *fieldData,
107  vtkMultiProcessStream& bytestream);
108 
112  static void Deserialize(
113  vtkMultiProcessStream& bytestream, vtkFieldData *fieldData );
114 
115  protected:
117  ~vtkFieldDataSerializer() override;
118 
123  static vtkDataArray* ExtractSelectedTuples(
124  vtkIdList *tupleIds, vtkDataArray *inputDataArray );
125 
130  static vtkDataArray* ExtractSubExtentData(
131  int subext[6], int gridExtent[6], vtkDataArray *inputDataArray);
132 
136  static void SerializeDataArray(
137  vtkDataArray *dataArray, vtkMultiProcessStream& bytestream );
138 
142  static void DeserializeDataArray(
143  vtkMultiProcessStream& bytestream, vtkDataArray *&dataArray );
144 
145 
146  private:
148  void operator=(const vtkFieldDataSerializer&) = delete;
149 };
150 
151 #endif /* vtkFieldDataSerializer_h */
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
stream used to pass data across processes using vtkMultiProcessController.
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
A concrete instance of vtkObject which provides functionality for serializing and de-serializing fiel...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate fields of data
Definition: vtkFieldData.h:56