VTK
vtkProStarReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProStarReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkProStarReader_h
30 #define vtkProStarReader_h
31 
32 #include "vtkIOGeometryModule.h" // For export macro
34 
36 {
37 public:
38  static vtkProStarReader *New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
45  vtkSetStringMacro(FileName);
46  vtkGetStringMacro(FileName);
48 
50 
52  vtkSetClampMacro(ScaleFactor, double, 0, VTK_DOUBLE_MAX);
53  vtkGetMacro(ScaleFactor, double);
55 
57 
58  enum cellType
59  {
60  starcdFluidType = 1,
61  starcdSolidType = 2,
62  starcdBaffleType = 3,
63  starcdShellType = 4,
64  starcdLineType = 5,
65  starcdPointType = 6
66  };
68 
70 
71  enum shapeType
72  {
73  starcdPoint = 1,
74  starcdLine = 2,
75  starcdShell = 3,
76  starcdHex = 11,
77  starcdPrism = 12,
78  starcdTet = 13,
79  starcdPyr = 14,
80  starcdPoly = 255
81  };
83 
84 protected:
87 
90  int RequestData
92 
97  char *FileName;
98 
101  double ScaleFactor;
102 
103 private:
104  //
105  // Internal Classes/Structures
106  //
107  struct idMapping;
108 
109  FILE* OpenFile(const char *ext);
110 
111  bool ReadVrtFile(vtkUnstructuredGrid *output, idMapping& pointMapping);
112  bool ReadCelFile(vtkUnstructuredGrid *output, const idMapping& pointMapping);
113 
114  vtkProStarReader(const vtkProStarReader&); // Not implemented.
115  void operator=(const vtkProStarReader&); // Not implemented.
116 };
117 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:142
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKIOGEOMETRY_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.
Reads geometry in proSTAR (STARCD) file format.