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
38class vtkIdList;
39class vtkFieldData;
40class vtkDataArray;
41class vtkStringArray;
42class vtkIntArray;
44
45class VTKPARALLELCORE_EXPORT vtkFieldDataSerializer : public vtkObject
46{
47 public:
50 void PrintSelf(ostream& os, vtkIndent indent);
51
56 static void SerializeMetaData(
57 vtkFieldData *fieldData, vtkMultiProcessStream& bytestream);
58
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
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:
118
124 vtkIdList *tupleIds, vtkDataArray *inputDataArray );
125
131 int subext[6], int gridExtent[6], vtkDataArray *inputDataArray);
132
137 vtkDataArray *dataArray, vtkMultiProcessStream& bytestream );
138
143 vtkMultiProcessStream& bytestream, vtkDataArray *&dataArray );
144
145
146 private:
147 vtkFieldDataSerializer(const vtkFieldDataSerializer&) VTK_DELETE_FUNCTION;
148 void operator=(const vtkFieldDataSerializer&) VTK_DELETE_FUNCTION;
149};
150
151#endif /* vtkFieldDataSerializer_h */
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
A concrete instance of vtkObject which provides functionality for serializing and de-serializing fiel...
static void SerializeDataArray(vtkDataArray *dataArray, vtkMultiProcessStream &bytestream)
Serializes the data array into a bytestream.
static void DeSerializeToSubExtent(int subext[6], int gridExtent[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Deserializes the field data from a bytestream to a the given sub-extent.
static void SerializeMetaData(vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Serializes the metadata of the given field data instance, i.e., the number of arrays,...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static void DeserializeMetaData(vtkMultiProcessStream &bytestream, vtkStringArray *names, vtkIntArray *datatypes, vtkIntArray *dimensions)
Given the serialized field metadata in a bytestream, this method extracts the name,...
static void SerializeSubExtent(int subext[6], int gridExtent[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Serializes the given sub-extent of field data of a structured grid in a byte-stream.
static void Deserialize(vtkMultiProcessStream &bytestream, vtkFieldData *fieldData)
Deserializes the field data from a bytestream.
static vtkFieldDataSerializer * New()
static vtkDataArray * ExtractSelectedTuples(vtkIdList *tupleIds, vtkDataArray *inputDataArray)
Given an input data array and list of tuples, it extracts the selected tuples in to a new array and r...
virtual ~vtkFieldDataSerializer()
static void Serialize(vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Serializes the given field data (all the field data) into a bytestream.
static vtkDataArray * ExtractSubExtentData(int subext[6], int gridExtent[6], vtkDataArray *inputDataArray)
Given an input data array corresponding to a field on a structured grid, extract the data within the ...
static void DeserializeDataArray(vtkMultiProcessStream &bytestream, vtkDataArray *&dataArray)
Deserializes the data array from a bytestream.
static void SerializeTuples(vtkIdList *tupleIds, vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Serializes the selected tuples from the the field data in a byte-stream.
represent and manipulate fields of data
Definition: vtkFieldData.h:57
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
Definition: vtkObject.h:60
a vtkAbstractArray subclass for strings