VTK  9.3.0
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:
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
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:24
vtkGetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int ComputeDivisionExtents(vtkDataObject *output, int idx, int numDivisions)
vtkSetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReadTextureFile(int numPts, vtkInformation *outInfo)
char * GeometryFileName
Definition: vtkBYUReader.h:124
vtkSetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
~vtkBYUReader() override
vtkGetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
static vtkBYUReader * New()
void ReadDisplacementFile(int numPts, vtkInformation *outInfo)
vtkSetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo)
char * TextureFileName
Definition: vtkBYUReader.h:127
char * ScalarFileName
Definition: vtkBYUReader.h:126
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
char * DisplacementFileName
Definition: vtkBYUReader.h:125
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:43
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:130
vtkSetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
void ReadScalarFile(int numPts, vtkInformation *outInfo)
vtkGetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:128
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:42
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:129
static int CanReadFile(VTK_FILEPATH const char *filename)
Returns 1 if this file can be read and 0 if the file cannot be read.
general representation of visualization data
Definition: vtkDataObject.h:55
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_INT_MAX
Definition: vtkType.h:144
#define VTK_FILEPATH