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
vtkProStarReader::shapeType
shapeType
The primitive cell shape.
Definition: vtkProStarReader.h:74
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkProStarReader::ScaleFactor
double ScaleFactor
The coordinates are multiplied by ScaleFactor when setting them.
Definition: vtkProStarReader.h:107
vtkUnstructuredGridAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkProStarReader::cellType
cellType
The type of material represented by the cell.
Definition: vtkProStarReader.h:61
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkProStarReader::FileName
char * FileName
The name of the file to be read.
Definition: vtkProStarReader.h:101
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkProStarReader
Reads geometry in proSTAR (STARCD) file format.
Definition: vtkProStarReader.h:33
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169