Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPDataSetWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPDataSetWriter.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 =========================================================================*/
00037 #ifndef __vtkPDataSetWriter_h
00038 #define __vtkPDataSetWriter_h
00039 
00040 #include "vtkDataSetWriter.h"
00041 
00042 class vtkImageData;
00043 class vtkRectilinearGrid;
00044 class vtkStructuredGrid;
00045 
00046 class VTK_PARALLEL_EXPORT vtkPDataSetWriter : public vtkDataSetWriter
00047 {
00048 public:
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050   vtkTypeRevisionMacro(vtkPDataSetWriter,vtkDataSetWriter);
00051   static vtkPDataSetWriter *New();
00052 
00054   virtual void Write();
00055 
00057 
00058   void SetNumberOfPieces(int num);
00059   vtkGetMacro(NumberOfPieces, int);
00061 
00063 
00065   vtkSetMacro(GhostLevel, int);
00066   vtkGetMacro(GhostLevel, int);
00068   
00070 
00074   vtkSetMacro(StartPiece, int);
00075   vtkGetMacro(StartPiece, int);
00076   vtkSetMacro(EndPiece, int);
00077   vtkGetMacro(EndPiece, int);
00079   
00081 
00083   vtkSetStringMacro(FilePattern);
00084   vtkGetStringMacro(FilePattern);
00086 
00088 
00093   vtkSetMacro(UseRelativeFileNames, int);
00094   vtkGetMacro(UseRelativeFileNames, int);
00095   vtkBooleanMacro(UseRelativeFileNames, int);
00097 
00098 protected:
00099   vtkPDataSetWriter();
00100   ~vtkPDataSetWriter();
00101 
00102 //BTX
00103   ostream *OpenFile();
00104   int WriteUnstructuredMetaData(vtkDataSet *input, 
00105                                 char *root, char *str, ostream *fptr);
00106   int WriteImageMetaData(vtkImageData *input, 
00107                          char *root, char *str, ostream *fptr);
00108   int WriteRectilinearGridMetaData(vtkRectilinearGrid *input,
00109                                    char *root, char *str, ostream *fptr);
00110   int WriteStructuredGridMetaData(vtkStructuredGrid *input,
00111                                   char *root, char *str, ostream *fptr);
00112 //ETX
00113 
00114   int StartPiece;
00115   int EndPiece;
00116   int NumberOfPieces;
00117   int GhostLevel;
00118 
00119   int UseRelativeFileNames;
00120 
00121   char *FilePattern;
00122 
00123   void DeleteFiles();
00124   
00125 private:
00126   vtkPDataSetWriter(const vtkPDataSetWriter&); // Not implemented
00127   void operator=(const vtkPDataSetWriter&); // Not implemented
00128 };
00129 
00130 #endif