IO/vtkXMLStructuredDataWriter.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# IO/vtkXMLStructuredDataWriter.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkXMLStructuredDataWriter.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00036 #ifndef __vtkXMLStructuredDataWriter_h
    00037 #define __vtkXMLStructuredDataWriter_h
    00038
    00039 #include "vtkXMLWriter.h"
    00040
    00041 class vtkDataSet;
    00042 class vtkPointData;
    00043 class vtkExtentTranslator;
    00044 class vtkDataArray;
    00045 class vtkDataSetAttributes;
    00046
    00047 class VTK_IO_EXPORT vtkXMLStructuredDataWriter : public vtkXMLWriter
    00048 {
    00049 public:
    00050   vtkTypeRevisionMacro(vtkXMLStructuredDataWriter,vtkXMLWriter);
    00051   void PrintSelf(ostream& os, vtkIndent indent);
    00052
    00054
    00056   vtkSetMacro(NumberOfPieces, int);
    00057   vtkGetMacro(NumberOfPieces, int);
    00059
    00061
    00064   vtkSetVector6Macro(WriteExtent, int);
    00065   vtkGetVector6Macro(WriteExtent, int);
    00067
    00069
    00070   virtual void SetExtentTranslator(vtkExtentTranslator*);
    00071   vtkGetObjectMacro(ExtentTranslator, vtkExtentTranslator);
    00073
    00074 protected:
    00075   vtkXMLStructuredDataWriter();
    00076   ~vtkXMLStructuredDataWriter();
    00077
    00078   // Writing drivers defined by subclasses.
    00079   virtual void WritePrimaryElementAttributes();
    00080   virtual void WriteAppendedPiece(int index, vtkIndent indent);
    00081   virtual void WriteAppendedPieceData(int index);
    00082   virtual void WriteInlinePiece(int index, vtkIndent indent);
    00083   virtual void GetInputExtent(int* extent)=0;
    00084
    00085   // The actual writing driver required by vtkXMLWriter.
    00086   int WriteData();
    00087   void SetupExtentTranslator();
    00088   virtual void WriteAppendedMode(vtkIndent indent);
    00089   vtkDataArray* CreateExactExtent(vtkDataArray* array, int* inExtent,
    00090                                   int* outExtent, int isPoint);
    00091   virtual void WriteInlineMode(vtkIndent indent);
    00092   unsigned int GetStartTuple(int* extent, int* increments,
    00093                              int i, int j, int k);
    00094
    00095   // Define utility methods required by vtkXMLWriter.
    00096   vtkDataArray* CreateArrayForPoints(vtkDataArray* inArray);
    00097   vtkDataArray* CreateArrayForCells(vtkDataArray* inArray);
    00098
    00099   // The extent of the input to write.
    00100   int WriteExtent[6];
    00101
    00102   // Number of pieces used for streaming.
    00103   int NumberOfPieces;
    00104
    00105   // Translate piece number to extent.
    00106   vtkExtentTranslator* ExtentTranslator;
    00107
    00108   // Appended data offsets of point and cell data arrays.
    00109   unsigned long** PointDataOffsets;
    00110   unsigned long** CellDataOffsets;
    00111
    00112 private:
    00113   vtkXMLStructuredDataWriter(const vtkXMLStructuredDataWriter&);  // Not implemented.
    00114   void operator=(const vtkXMLStructuredDataWriter&);  // Not implemented.
    00115 };
    00116
    00117 #endif