VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPDataSetWriter.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 =========================================================================*/ 00025 #ifndef __vtkPDataSetWriter_h 00026 #define __vtkPDataSetWriter_h 00027 00028 #include "vtkIOParallelModule.h" // For export macro 00029 #include "vtkDataSetWriter.h" 00030 00031 class vtkImageData; 00032 class vtkRectilinearGrid; 00033 class vtkStructuredGrid; 00034 00035 class VTKIOPARALLEL_EXPORT vtkPDataSetWriter : public vtkDataSetWriter 00036 { 00037 public: 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 vtkTypeMacro(vtkPDataSetWriter,vtkDataSetWriter); 00040 static vtkPDataSetWriter *New(); 00041 00043 virtual int Write(); 00044 00046 00047 void SetNumberOfPieces(int num); 00048 vtkGetMacro(NumberOfPieces, int); 00050 00052 00054 vtkSetMacro(GhostLevel, int); 00055 vtkGetMacro(GhostLevel, int); 00057 00059 00063 vtkSetMacro(StartPiece, int); 00064 vtkGetMacro(StartPiece, int); 00065 vtkSetMacro(EndPiece, int); 00066 vtkGetMacro(EndPiece, int); 00068 00070 00072 vtkSetStringMacro(FilePattern); 00073 vtkGetStringMacro(FilePattern); 00075 00077 00082 vtkSetMacro(UseRelativeFileNames, int); 00083 vtkGetMacro(UseRelativeFileNames, int); 00084 vtkBooleanMacro(UseRelativeFileNames, int); 00086 00087 protected: 00088 vtkPDataSetWriter(); 00089 ~vtkPDataSetWriter(); 00090 00091 //BTX 00092 ostream *OpenFile(); 00093 int WriteUnstructuredMetaData(vtkDataSet *input, 00094 char *root, char *str, ostream *fptr); 00095 int WriteImageMetaData(vtkImageData *input, 00096 char *root, char *str, ostream *fptr); 00097 int WriteRectilinearGridMetaData(vtkRectilinearGrid *input, 00098 char *root, char *str, ostream *fptr); 00099 int WriteStructuredGridMetaData(vtkStructuredGrid *input, 00100 char *root, char *str, ostream *fptr); 00101 //ETX 00102 00103 int StartPiece; 00104 int EndPiece; 00105 int NumberOfPieces; 00106 int GhostLevel; 00107 00108 int UseRelativeFileNames; 00109 00110 char *FilePattern; 00111 00112 void DeleteFiles(); 00113 00114 private: 00115 vtkPDataSetWriter(const vtkPDataSetWriter&); // Not implemented 00116 void operator=(const vtkPDataSetWriter&); // Not implemented 00117 }; 00118 00119 #endif