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 =========================================================================*/
30 #ifndef vtkProStarReader_h
31 #define vtkProStarReader_h
32 
33 #include "vtkIOGeometryModule.h" // For export macro
35 
36 class VTKIOGEOMETRY_EXPORT vtkProStarReader : public vtkUnstructuredGridAlgorithm
37 {
38 public:
39  static vtkProStarReader *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
48  vtkSetStringMacro(FileName);
49  vtkGetStringMacro(FileName);
51 
53 
57  vtkSetClampMacro(ScaleFactor, double, 0, VTK_DOUBLE_MAX);
58  vtkGetMacro(ScaleFactor, double);
60 
64  enum cellType
65  {
66  starcdFluidType = 1,
67  starcdSolidType = 2,
68  starcdBaffleType = 3,
69  starcdShellType = 4,
70  starcdLineType = 5,
71  starcdPointType = 6
72  };
73 
77  enum shapeType
78  {
79  starcdPoint = 1,
80  starcdLine = 2,
81  starcdShell = 3,
82  starcdHex = 11,
83  starcdPrism = 12,
84  starcdTet = 13,
85  starcdPyr = 14,
86  starcdPoly = 255
87  };
88 
89 protected:
92 
95  int RequestData
97 
104  char *FileName;
105 
110  double ScaleFactor;
111 
112 private:
113  //
114  // Internal Classes/Structures
115  //
116  struct idMapping;
117 
118  FILE* OpenFile(const char *ext);
119 
120  bool ReadVrtFile(vtkUnstructuredGrid *output, idMapping& pointMapping);
121  bool ReadCelFile(vtkUnstructuredGrid *output, const idMapping& pointMapping);
122 
123  vtkProStarReader(const vtkProStarReader&) VTK_DELETE_FUNCTION;
124  void operator=(const vtkProStarReader&) VTK_DELETE_FUNCTION;
125 };
126 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
char * FileName
The name of the file to be read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
shapeType
The primitive cell shape.
dataset represents arbitrary combinations of all possible cell types
double ScaleFactor
The coordinates are multiplied by ScaleFactor when setting them.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.
Reads geometry in proSTAR (STARCD) file format.
cellType
The type of material represented by the cell.