VTK  9.0.1
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 
99  char* FileName;
100 
105  double ScaleFactor;
106 
107 private:
108  //
109  // Internal Classes/Structures
110  //
111  struct idMapping;
112 
113  FILE* OpenFile(const char* ext);
114 
115  bool ReadVrtFile(vtkUnstructuredGrid* output, idMapping& pointMapping);
116  bool ReadCelFile(vtkUnstructuredGrid* output, const idMapping& pointMapping);
117 
118  vtkProStarReader(const vtkProStarReader&) = delete;
119  void operator=(const vtkProStarReader&) = delete;
120 };
121 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
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.