moab
vtkMOABReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile$
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 =========================================================================*/
00015 // .NAME vtkMOABReader - read vtk unstructured grid data file
00016 // .SECTION Description
00017 // vtkMOABReader is a source object that reads ASCII or binary
00018 // unstructured grid data files in vtk format. (see text for format details).
00019 // The output of this reader is a single vtkUnstructuredGrid data object.
00020 // The superclass of this class, vtkDataReader, provides many methods for
00021 // controlling the reading of the data file, see vtkDataReader for more
00022 // information.
00023 // .SECTION Caveats
00024 // Binary files written on one system may not be readable on other systems.
00025 // .SECTION See Also
00026 // vtkUnstructuredGrid vtkDataReader
00027 
00028 #ifndef __vtkMOABReader_h
00029 #define __vtkMOABReader_h
00030 
00031 #include "vtkIOGeometryModule.h" // For export macro
00032 #include "vtkMultiBlockDataSetAlgorithm.h"
00033 
00034 class vtkInformation;
00035 class vtkInformationVector;
00036 class vtkMOABReaderPrivate;
00037 
00038 #include <map>
00039 
00040 class VTKIOGEOMETRY_EXPORT vtkMOABReader : public vtkMultiBlockDataSetAlgorithm
00041 {
00042 public:
00043   static vtkMOABReader *New();
00044   vtkTypeMacro(vtkMOABReader,vtkMultiBlockDataSetAlgorithm);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00047   // Description:
00048   // Specify file name of the MOAB mesh file.
00049   vtkSetStringMacro(FileName);
00050   vtkGetStringMacro(FileName);
00051 
00052   // Description:
00053   // Specify whether to include edges(1D elements)
00054   vtkSetMacro(Edges, bool);
00055   vtkGetMacro(Edges, bool);
00056   vtkBooleanMacro(Edges, bool);
00057 
00058   // Description:
00059   // Specify whether to include faces(2D elements)
00060   vtkSetMacro(Faces, bool);
00061   vtkGetMacro(Faces, bool);
00062   vtkBooleanMacro(Faces, bool);
00063 
00064   // Description:
00065   // Specify whether to include regions(3D elements)
00066   vtkSetMacro(Regions, bool);
00067   vtkGetMacro(Regions, bool);
00068   vtkBooleanMacro(Regions, bool);
00069 
00070   void UpdateProgress(double amount);
00071 
00072 protected:
00073   vtkMOABReader();
00074   ~vtkMOABReader();
00075 
00076   int RequestInformation(vtkInformation *vtkNotUsed(request),
00077                          vtkInformationVector **vtkNotUsed(inputVector),
00078                          vtkInformationVector *outputVector);
00079 
00080   int RequestData(vtkInformation *vtkNotUsed(request),
00081                   vtkInformationVector **vtkNotUsed(inputVector),
00082                   vtkInformationVector *outputVector);
00083 
00084   int FillOutputPortInformation(int port, vtkInformation *info);
00085 
00086 private:
00087   vtkMOABReader(const vtkMOABReader&);  // Not implemented.
00088   void operator=(const vtkMOABReader&);  // Not implemented.
00089 
00090   char *FileName;
00091   bool Edges, Faces, Regions;
00092 
00093   vtkMOABReaderPrivate *masterReader;
00094 };
00095 
00096 #endif
00097 
00098 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines