vtkXMLStructuredDataWriter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkXMLStructuredDataWriter_h
00035 #define __vtkXMLStructuredDataWriter_h
00036
00037 #include "vtkXMLWriter.h"
00038
00039 class vtkDataSet;
00040 class vtkPointData;
00041 class vtkExtentTranslator;
00042 class vtkDataArray;
00043 class vtkDataSetAttributes;
00044
00045 class VTK_IO_EXPORT vtkXMLStructuredDataWriter : public vtkXMLWriter
00046 {
00047 public:
00048 vtkTypeRevisionMacro(vtkXMLStructuredDataWriter,vtkXMLWriter);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00054 vtkSetMacro(NumberOfPieces, int);
00055 vtkGetMacro(NumberOfPieces, int);
00057
00059
00062 vtkSetVector6Macro(WriteExtent, int);
00063 vtkGetVector6Macro(WriteExtent, int);
00065
00067
00068 virtual void SetExtentTranslator(vtkExtentTranslator*);
00069 vtkGetObjectMacro(ExtentTranslator, vtkExtentTranslator);
00071
00072 protected:
00073 vtkXMLStructuredDataWriter();
00074 ~vtkXMLStructuredDataWriter();
00075
00076
00077 virtual void WritePrimaryElementAttributes();
00078 virtual void WriteAppendedPiece(int index, vtkIndent indent);
00079 virtual void WriteAppendedPieceData(int index);
00080 virtual void WriteInlinePiece(int index, vtkIndent indent);
00081 virtual void GetInputExtent(int* extent)=0;
00082
00083
00084 int WriteData();
00085 void SetupExtentTranslator();
00086 virtual int WriteAppendedMode(vtkIndent indent);
00087 vtkDataArray* CreateExactExtent(vtkDataArray* array, int* inExtent,
00088 int* outExtent, int isPoint);
00089 virtual int WriteInlineMode(vtkIndent indent);
00090 unsigned int GetStartTuple(int* extent, int* increments,
00091 int i, int j, int k);
00092 void CalculatePieceFractions(float* fractions);
00093
00094
00095 vtkDataArray* CreateArrayForPoints(vtkDataArray* inArray);
00096 vtkDataArray* CreateArrayForCells(vtkDataArray* inArray);
00097
00098
00099 int WriteExtent[6];
00100
00101
00102 int NumberOfPieces;
00103
00104
00105 vtkExtentTranslator* ExtentTranslator;
00106
00107
00108 unsigned long** PointDataOffsets;
00109 unsigned long** CellDataOffsets;
00110
00111 private:
00112 vtkXMLStructuredDataWriter(const vtkXMLStructuredDataWriter&);
00113 void operator=(const vtkXMLStructuredDataWriter&);
00114 };
00115
00116 #endif