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 =========================================================================*/
27 #ifndef vtkProStarReader_h
28 #define vtkProStarReader_h
29 
30 #include "vtkIOGeometryModule.h" // For export macro
32 
33 class VTKIOGEOMETRY_EXPORT vtkProStarReader : public vtkUnstructuredGridAlgorithm
34 {
35 public:
36  static vtkProStarReader *New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
45  vtkSetStringMacro(FileName);
46  vtkGetStringMacro(FileName);
48 
50 
54  vtkSetClampMacro(ScaleFactor, double, 0, VTK_DOUBLE_MAX);
55  vtkGetMacro(ScaleFactor, double);
57 
61  enum cellType
62  {
63  starcdFluidType = 1,
64  starcdSolidType = 2,
65  starcdBaffleType = 3,
66  starcdShellType = 4,
67  starcdLineType = 5,
68  starcdPointType = 6
69  };
70 
74  enum shapeType
75  {
76  starcdPoint = 1,
77  starcdLine = 2,
78  starcdShell = 3,
79  starcdHex = 11,
80  starcdPrism = 12,
81  starcdTet = 13,
82  starcdPyr = 14,
83  starcdPoly = 255
84  };
85 
86 protected:
88  ~vtkProStarReader() override;
89 
92  int RequestData
94 
101  char *FileName;
102 
107  double ScaleFactor;
108 
109 private:
110  //
111  // Internal Classes/Structures
112  //
113  struct idMapping;
114 
115  FILE* OpenFile(const char *ext);
116 
117  bool ReadVrtFile(vtkUnstructuredGrid *output, idMapping& pointMapping);
118  bool ReadCelFile(vtkUnstructuredGrid *output, const idMapping& pointMapping);
119 
120  vtkProStarReader(const vtkProStarReader&) = delete;
121  void operator=(const vtkProStarReader&) = delete;
122 };
123 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
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:33
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.
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.