VTK  9.3.20240301
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
125 #ifndef vtkBYUReader_h
126 #define vtkBYUReader_h
127 
128 #include "vtkIOGeometryModule.h" // For export macro
129 #include "vtkPolyDataAlgorithm.h"
130 
131 VTK_ABI_NAMESPACE_BEGIN
132 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
133 {
134 public:
135  static vtkBYUReader* New();
136 
138  void PrintSelf(ostream& os, vtkIndent indent) override;
139 
141 
144  vtkSetFilePathMacro(GeometryFileName);
145  vtkGetFilePathMacro(GeometryFileName);
147 
151  virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
152  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
153  {
154  return this->GetGeometryFileName();
155  }
156 
158 
161  vtkSetFilePathMacro(DisplacementFileName);
162  vtkGetFilePathMacro(DisplacementFileName);
164 
166 
169  vtkSetFilePathMacro(ScalarFileName);
170  vtkGetFilePathMacro(ScalarFileName);
172 
174 
177  vtkSetFilePathMacro(TextureFileName);
178  vtkGetFilePathMacro(TextureFileName);
180 
182 
185  vtkSetMacro(ReadDisplacement, vtkTypeBool);
186  vtkGetMacro(ReadDisplacement, vtkTypeBool);
187  vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
189 
191 
194  vtkSetMacro(ReadScalar, vtkTypeBool);
195  vtkGetMacro(ReadScalar, vtkTypeBool);
196  vtkBooleanMacro(ReadScalar, vtkTypeBool);
198 
200 
204  vtkSetMacro(ReadTexture, vtkTypeBool);
205  vtkGetMacro(ReadTexture, vtkTypeBool);
206  vtkBooleanMacro(ReadTexture, vtkTypeBool);
208 
210 
213  vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
214  vtkGetMacro(PartNumber, int);
216 
223  static int CanReadFile(VTK_FILEPATH const char* filename);
224 
225 protected:
227  ~vtkBYUReader() override;
228 
230  // This source does not know how to generate pieces yet.
231  int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
232 
241 
242  void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
243  void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
244  void ReadScalarFile(int numPts, vtkInformation* outInfo);
245  void ReadTextureFile(int numPts, vtkInformation* outInfo);
246 
247 private:
248  vtkBYUReader(const vtkBYUReader&) = delete;
249  void operator=(const vtkBYUReader&) = delete;
250 };
251 
252 VTK_ABI_NAMESPACE_END
253 #endif
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:133
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:233
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:236
char * ScalarFileName
Definition: vtkBYUReader.h:235
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
char * DisplacementFileName
Definition: vtkBYUReader.h:234
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:152
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:239
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:237
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:151
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:238
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
a simple class to control print indentation
Definition: vtkIndent.h:108
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