VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLStructuredGridWriter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00031 #ifndef __vtkXMLStructuredGridWriter_h 00032 #define __vtkXMLStructuredGridWriter_h 00033 00034 #include "vtkIOXMLModule.h" // For export macro 00035 #include "vtkXMLStructuredDataWriter.h" 00036 00037 class vtkStructuredGrid; 00038 00039 class VTKIOXML_EXPORT vtkXMLStructuredGridWriter : public vtkXMLStructuredDataWriter 00040 { 00041 public: 00042 static vtkXMLStructuredGridWriter* New(); 00043 vtkTypeMacro(vtkXMLStructuredGridWriter,vtkXMLStructuredDataWriter); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00046 //BTX 00048 00049 vtkStructuredGrid* GetInput(); 00050 //ETX 00052 00054 const char* GetDefaultFileExtension(); 00055 00056 protected: 00057 vtkXMLStructuredGridWriter(); 00058 ~vtkXMLStructuredGridWriter(); 00059 00060 // see algorithm for more info 00061 virtual int FillInputPortInformation(int port, vtkInformation* info); 00062 00063 void WriteAppendedPiece(int index, vtkIndent indent); 00064 void WriteAppendedPieceData(int index); 00065 void WriteInlinePiece(vtkIndent indent); 00066 void GetInputExtent(int* extent); 00067 const char* GetDataSetName(); 00068 void CalculateSuperclassFraction(float* fractions); 00069 00070 // The position of the appended data offset attribute for the points 00071 // array. 00072 OffsetsManagerGroup *PointsOM; //one per piece 00073 00074 virtual void AllocatePositionArrays(); 00075 virtual void DeletePositionArrays(); 00076 00077 private: 00078 vtkXMLStructuredGridWriter(const vtkXMLStructuredGridWriter&); // Not implemented. 00079 void operator=(const vtkXMLStructuredGridWriter&); // Not implemented. 00080 }; 00081 00082 #endif