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 =========================================================================*/ 00028 #ifndef __vtkXMLStructuredGridWriter_h 00029 #define __vtkXMLStructuredGridWriter_h 00030 00031 #include "vtkXMLStructuredDataWriter.h" 00032 00033 class vtkStructuredGrid; 00034 00035 class VTK_IO_EXPORT vtkXMLStructuredGridWriter : public vtkXMLStructuredDataWriter 00036 { 00037 public: 00038 static vtkXMLStructuredGridWriter* New(); 00039 vtkTypeRevisionMacro(vtkXMLStructuredGridWriter,vtkXMLStructuredDataWriter); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00043 00044 void SetInput(vtkStructuredGrid* input); 00045 vtkStructuredGrid* GetInput(); 00047 00049 const char* GetDefaultFileExtension(); 00050 00051 protected: 00052 vtkXMLStructuredGridWriter(); 00053 ~vtkXMLStructuredGridWriter(); 00054 00055 int WriteAppendedMode(vtkIndent indent); 00056 void WriteAppendedPiece(int index, vtkIndent indent); 00057 void WriteAppendedPieceData(int index); 00058 void WriteInlinePiece(int index, vtkIndent indent); 00059 void GetInputExtent(int* extent); 00060 const char* GetDataSetName(); 00061 void CalculateSuperclassFraction(float* fractions); 00062 00063 // The position of the appended data offset attribute for the points 00064 // array. 00065 unsigned long* PointsPosition; 00066 00067 private: 00068 vtkXMLStructuredGridWriter(const vtkXMLStructuredGridWriter&); // Not implemented. 00069 void operator=(const vtkXMLStructuredGridWriter&); // Not implemented. 00070 }; 00071 00072 #endif