VTK  9.2.6
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) override;
42 
44 
48  vtkSetFilePathMacro(FileName);
49  vtkGetFilePathMacro(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:
91  ~vtkProStarReader() override;
92 
95 
102  char* FileName;
103 
108  double ScaleFactor;
109 
110 private:
111  //
112  // Internal Classes/Structures
113  //
114  struct idMapping;
115 
116  FILE* OpenFile(const char* ext);
117 
118  bool ReadVrtFile(vtkUnstructuredGrid* output, idMapping& pointMapping);
119  bool ReadCelFile(vtkUnstructuredGrid* output, const idMapping& pointMapping);
120 
121  vtkProStarReader(const vtkProStarReader&) = delete;
122  void operator=(const vtkProStarReader&) = delete;
123 };
124 #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: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.
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.