VTK  9.3.1
vtkBYUReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkBYUReader_h
17 #define vtkBYUReader_h
18 
19 #include "vtkIOGeometryModule.h" // For export macro
20 #include "vtkPolyDataAlgorithm.h"
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
24 {
25 public:
26  static vtkBYUReader* New();
27 
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
35  vtkSetFilePathMacro(GeometryFileName);
36  vtkGetFilePathMacro(GeometryFileName);
38 
42  virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
43  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
44  {
45  return this->GetGeometryFileName();
46  }
47 
49 
52  vtkSetFilePathMacro(DisplacementFileName);
53  vtkGetFilePathMacro(DisplacementFileName);
55 
57 
60  vtkSetFilePathMacro(ScalarFileName);
61  vtkGetFilePathMacro(ScalarFileName);
63 
65 
68  vtkSetFilePathMacro(TextureFileName);
69  vtkGetFilePathMacro(TextureFileName);
71 
73 
76  vtkSetMacro(ReadDisplacement, vtkTypeBool);
77  vtkGetMacro(ReadDisplacement, vtkTypeBool);
78  vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
80 
82 
85  vtkSetMacro(ReadScalar, vtkTypeBool);
86  vtkGetMacro(ReadScalar, vtkTypeBool);
87  vtkBooleanMacro(ReadScalar, vtkTypeBool);
89 
91 
95  vtkSetMacro(ReadTexture, vtkTypeBool);
96  vtkGetMacro(ReadTexture, vtkTypeBool);
97  vtkBooleanMacro(ReadTexture, vtkTypeBool);
99 
101 
104  vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
105  vtkGetMacro(PartNumber, int);
107 
114  static int CanReadFile(VTK_FILEPATH const char* filename);
115 
116 protected:
117  vtkBYUReader();
118  ~vtkBYUReader() override;
119 
121  // This source does not know how to generate pieces yet.
122  int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
123 
132 
133  void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
134  void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
135  void ReadScalarFile(int numPts, vtkInformation* outInfo);
136  void ReadTextureFile(int numPts, vtkInformation* outInfo);
137 
138 private:
139  vtkBYUReader(const vtkBYUReader&) = delete;
140  void operator=(const vtkBYUReader&) = delete;
141 };
142 
143 VTK_ABI_NAMESPACE_END
144 #endif
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:129
char * TextureFileName
Definition: vtkBYUReader.h:127
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:144
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:43
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
char * GeometryFileName
Definition: vtkBYUReader.h:124
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:23
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:128
#define VTK_FILEPATH
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:130
char * DisplacementFileName
Definition: vtkBYUReader.h:125
char * ScalarFileName
Definition: vtkBYUReader.h:126
Store zero or more vtkInformation instances.
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:42
general representation of visualization data
Definition: vtkDataObject.h:54
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.