VTK  9.2.5
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 
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
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Reads geometry in proSTAR (STARCD) file format.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSetFilePathMacro(FileName)
Specify the file name prefix of the cel/vrt files to read.
cellType
The type of material represented by the cell.
double ScaleFactor
The coordinates are multiplied by ScaleFactor when setting them.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
shapeType
The primitive cell shape.
vtkGetFilePathMacro(FileName)
Specify the file name prefix of the cel/vrt files to read.
~vtkProStarReader() override
static vtkProStarReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
char * FileName
The name of the file to be read.
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165