00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLStructuredGridWriter.h,v $ 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 =========================================================================*/ 00039 #ifndef __vtkXMLStructuredGridWriter_h 00040 #define __vtkXMLStructuredGridWriter_h 00041 00042 #include "vtkXMLStructuredDataWriter.h" 00043 00044 class vtkStructuredGrid; 00045 00046 class VTK_IO_EXPORT vtkXMLStructuredGridWriter : public vtkXMLStructuredDataWriter 00047 { 00048 public: 00049 static vtkXMLStructuredGridWriter* New(); 00050 vtkTypeRevisionMacro(vtkXMLStructuredGridWriter,vtkXMLStructuredDataWriter); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 void SetInput(vtkStructuredGrid* input); 00056 vtkStructuredGrid* GetInput(); 00058 00060 const char* GetDefaultFileExtension(); 00061 00062 protected: 00063 vtkXMLStructuredGridWriter(); 00064 ~vtkXMLStructuredGridWriter(); 00065 00066 int WriteAppendedMode(vtkIndent indent); 00067 void WriteAppendedPiece(int index, vtkIndent indent); 00068 void WriteAppendedPieceData(int index); 00069 void WriteInlinePiece(int index, vtkIndent indent); 00070 void GetInputExtent(int* extent); 00071 const char* GetDataSetName(); 00072 void CalculateSuperclassFraction(float* fractions); 00073 00074 // The position of the appended data offset attribute for the points 00075 // array. 00076 unsigned long* PointsPosition; 00077 00078 private: 00079 vtkXMLStructuredGridWriter(const vtkXMLStructuredGridWriter&); // Not implemented. 00080 void operator=(const vtkXMLStructuredGridWriter&); // Not implemented. 00081 }; 00082 00083 #endif