VTK  9.2.20230320
vtkBYUReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBYUReader.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 =========================================================================*/
137 #ifndef vtkBYUReader_h
138 #define vtkBYUReader_h
139 
140 #include "vtkIOGeometryModule.h" // For export macro
141 #include "vtkPolyDataAlgorithm.h"
142 
143 VTK_ABI_NAMESPACE_BEGIN
144 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
145 {
146 public:
147  static vtkBYUReader* New();
148 
150  void PrintSelf(ostream& os, vtkIndent indent) override;
151 
153 
156  vtkSetFilePathMacro(GeometryFileName);
157  vtkGetFilePathMacro(GeometryFileName);
159 
163  virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
164  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
165  {
166  return this->GetGeometryFileName();
167  }
168 
170 
173  vtkSetFilePathMacro(DisplacementFileName);
174  vtkGetFilePathMacro(DisplacementFileName);
176 
178 
181  vtkSetFilePathMacro(ScalarFileName);
182  vtkGetFilePathMacro(ScalarFileName);
184 
186 
189  vtkSetFilePathMacro(TextureFileName);
190  vtkGetFilePathMacro(TextureFileName);
192 
194 
197  vtkSetMacro(ReadDisplacement, vtkTypeBool);
198  vtkGetMacro(ReadDisplacement, vtkTypeBool);
199  vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
201 
203 
206  vtkSetMacro(ReadScalar, vtkTypeBool);
207  vtkGetMacro(ReadScalar, vtkTypeBool);
208  vtkBooleanMacro(ReadScalar, vtkTypeBool);
210 
212 
216  vtkSetMacro(ReadTexture, vtkTypeBool);
217  vtkGetMacro(ReadTexture, vtkTypeBool);
218  vtkBooleanMacro(ReadTexture, vtkTypeBool);
220 
222 
225  vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
226  vtkGetMacro(PartNumber, int);
228 
235  static int CanReadFile(VTK_FILEPATH const char* filename);
236 
237 protected:
239  ~vtkBYUReader() override;
240 
242  // This source does not know how to generate pieces yet.
243  int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
244 
253 
254  void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
255  void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
256  void ReadScalarFile(int numPts, vtkInformation* outInfo);
257  void ReadTextureFile(int numPts, vtkInformation* outInfo);
258 
259 private:
260  vtkBYUReader(const vtkBYUReader&) = delete;
261  void operator=(const vtkBYUReader&) = delete;
262 };
263 
264 VTK_ABI_NAMESPACE_END
265 #endif
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:145
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:245
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:248
char * ScalarFileName
Definition: vtkBYUReader.h:247
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
char * DisplacementFileName
Definition: vtkBYUReader.h:246
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:164
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:251
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:249
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:163
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:250
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:120
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:71
#define VTK_INT_MAX
Definition: vtkType.h:156
#define VTK_FILEPATH