00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLRectilinearGridWriter.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 __vtkXMLRectilinearGridWriter_h 00032 #define __vtkXMLRectilinearGridWriter_h 00033 00034 #include "vtkXMLStructuredDataWriter.h" 00035 00036 class vtkRectilinearGrid; 00037 00038 class VTK_IO_EXPORT vtkXMLRectilinearGridWriter : public vtkXMLStructuredDataWriter 00039 { 00040 public: 00041 static vtkXMLRectilinearGridWriter* New(); 00042 vtkTypeMacro(vtkXMLRectilinearGridWriter,vtkXMLStructuredDataWriter); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00045 //BTX 00047 00048 vtkRectilinearGrid* GetInput(); 00049 //ETX 00051 00053 const char* GetDefaultFileExtension(); 00054 00055 protected: 00056 vtkXMLRectilinearGridWriter(); 00057 ~vtkXMLRectilinearGridWriter(); 00058 00059 // see algorithm for more info 00060 virtual int FillInputPortInformation(int port, vtkInformation* info); 00061 00062 int WriteAppendedMode(vtkIndent indent); 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 vtkDataArray* CreateExactCoordinates(vtkDataArray* a, int xyz); 00069 void CalculateSuperclassFraction(float* fractions); 00070 00071 // Coordinate array appended data positions. 00072 OffsetsManagerArray *CoordinateOM; 00073 00074 virtual void AllocatePositionArrays(); 00075 virtual void DeletePositionArrays(); 00076 00077 private: 00078 vtkXMLRectilinearGridWriter(const vtkXMLRectilinearGridWriter&); // Not implemented. 00079 void operator=(const vtkXMLRectilinearGridWriter&); // Not implemented. 00080 }; 00081 00082 #endif