24 #ifndef __vtkXMLWriter_h
25 #define __vtkXMLWriter_h
61 enum { BigEndian, LittleEndian };
78 enum { Int32=32, Int64=64 };
84 enum { UInt32=32, UInt64=64 };
93 void SetByteOrderToBigEndian();
94 void SetByteOrderToLittleEndian();
100 virtual void SetHeaderType(
int);
102 void SetHeaderTypeToUInt32();
103 void SetHeaderTypeToUInt64();
109 virtual void SetIdType(
int);
111 void SetIdTypeToInt32();
112 void SetIdTypeToInt64();
138 void SetCompressorType(
int compressorType);
141 this->SetCompressorType(
NONE);
145 this->SetCompressorType(ZLIB);
154 virtual void SetBlockSize(
size_t blockSize);
164 void SetDataModeToAscii();
165 void SetDataModeToBinary();
166 void SetDataModeToAppended();
191 virtual const char* GetDefaultFileExtension()=0;
223 void WriteNextTime(
double time);
230 virtual int RequestInformation(
270 # if VTK_SIZEOF_SHORT == 4
271 typedef short Int32IdType;
272 # elif VTK_SIZEOF_INT == 4
273 typedef int Int32IdType;
274 # elif VTK_SIZEOF_LONG == 4
275 typedef long Int32IdType;
277 # error "No native data type can represent a signed 32-bit integer."
303 virtual int WriteInternal();
310 virtual const char* GetDataSetName()=0;
313 virtual int GetDataSetMajorVersion();
314 virtual int GetDataSetMinorVersion();
319 virtual void WriteFileAttributes();
322 void DeleteAFile(
const char*
name);
324 virtual int WritePrimaryElement(ostream &os,
vtkIndent indent);
325 virtual void WritePrimaryElementAttributes(ostream &os,
vtkIndent indent);
326 void StartAppendedData();
327 void EndAppendedData();
336 vtkTypeInt64 ReserveAttributeSpace(
const char* attr,
size_t length=20);
338 vtkTypeInt64 GetAppendedDataOffset();
339 void WriteAppendedDataOffset(vtkTypeInt64 streamPos,
340 vtkTypeInt64 &lastoffset,
342 void ForwardAppendedDataOffset(vtkTypeInt64 streamPos,
345 void ForwardAppendedDataDouble(vtkTypeInt64 streamPos,
349 int WriteScalarAttribute(
const char*
name,
int data);
350 int WriteScalarAttribute(
const char*
name,
float data);
351 int WriteScalarAttribute(
const char*
name,
double data);
352 #ifdef VTK_USE_64BIT_IDS
356 int WriteVectorAttribute(
const char*
name,
int length,
int*
data);
357 int WriteVectorAttribute(
const char*
name,
int length,
float*
data);
358 int WriteVectorAttribute(
const char*
name,
int length,
double*
data);
359 #ifdef VTK_USE_64BIT_IDS
363 int WriteDataModeAttribute(
const char*
name);
364 int WriteWordTypeAttribute(
const char*
name,
int dataType);
365 int WriteStringAttribute(
const char*
name,
const char*
value);
368 const char* alternateName,
int writeNumTuples,
int timestep);
371 const char* alternateName=0,
int writeNumTuples=0);
375 OffsetsManager &offs,
const char* alternateName=0,
int writeNumTuples=0,
381 vtkTypeInt64 &lastoffset);
390 void WriteFieldDataAppendedData(
vtkFieldData* fd,
int timestep,
394 void WritePointDataAppendedData(
vtkPointData* pd,
int timestep,
398 void WriteCellDataAppendedData(
vtkCellData* cd,
int timestep,
419 const char* alternateName=0);
424 int WriteBinaryDataBlock(
unsigned char* in_data,
size_t numWords,
int wordType);
425 void PerformByteSwap(
void*
data,
size_t numWords,
size_t wordSize);
426 int CreateCompressionHeader(
size_t size);
427 int WriteCompressionBlock(
unsigned char*
data,
size_t size);
428 int WriteCompressionHeader();
429 size_t GetWordTypeSize(
int dataType);
430 const char* GetWordTypeName(
int dataType);
431 size_t GetOutputWordTypeSize(
int dataType);
433 char** CreateStringArray(
int numStrings);
434 void DestroyStringArray(
int numStrings,
char**
strings);
438 virtual void GetProgressRange(
float range[2]);
439 virtual void SetProgressRange(
const float range[2],
int curStep,
int numSteps);
440 virtual void SetProgressRange(
const float range[2],
int curStep,
const float* fractions);
441 virtual void SetProgressPartial(
float fraction);
442 virtual void UpdateProgressDiscrete(
float progress);
443 float ProgressRange[2];
455 int TimeStepRange[2];
463 friend class vtkXMLWriterHelper;
GLsizei GLsizei GLenum GLenum const GLvoid * data
vtkTypeInt64 * NumberOfTimeValues
Wrapper around std::string to keep symbols short.
Abstract interface for data compression classes.
represent and manipulate point attribute data
vtkDataObject * GetInput()
abstract class to specify dataset behavior
Abstract superclass for all arrays.
#define vtkGetMacro(name, type)
represent and manipulate cell attribute data
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
GLuint GLsizei GLsizei * length
GLsizei const GLfloat * value
Helper class due to PIMPL excess.
#define vtkSetStringMacro(name)
#define vtkTypeMacro(thisClass, superclass)
Implementation template for a array iterator.
vtkOutputStream * DataStream
GLsizei const GLchar ** strings
Superclass for all sources, filters, and sinks in VTK.
vtkTypeInt64 AppendedDataPosition
GLuint const GLchar * name
Superclass for VTK's XML file writers.
a simple class to control print indentation
abstract superclass for arrays of numeric data
size_t CompressionBlockNumber
Abstract superclass to iterate over elements in an vtkAbstractArray.
represent and manipulate attribute data in a dataset
#define vtkGetStringMacro(name)
#define vtkGetObjectMacro(name, type)
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
#define vtkGetVector2Macro(name, type)
void SetCompressorTypeToNone()
vtkTypeInt64 CompressionHeaderPosition
Wraps a binary output stream with a VTK interface.
#define vtkBooleanMacro(name, type)
vtkDataCompressor * Compressor
unsigned char * ByteSwapBuffer
general representation of visualization data
#define vtkSetVector2Macro(name, type)
void SetCompressorTypeToZLib()
represent and manipulate 3D points
vtkXMLDataHeader * CompressionHeader
int UserContinueExecuting
OffsetsManagerGroup * FieldDataOM
represent and manipulate fields of data
Int32IdType * Int32IdTypeBuffer
void PrintSelf(ostream &os, vtkIndent indent)
#define vtkSetMacro(name, type)