VTK  9.1.0
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=========================================================================*/
134#ifndef vtkBYUReader_h
135#define vtkBYUReader_h
136
137#include "vtkIOGeometryModule.h" // For export macro
138#include "vtkPolyDataAlgorithm.h"
139
140class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
141{
142public:
143 static vtkBYUReader* New();
144
146 void PrintSelf(ostream& os, vtkIndent indent) override;
147
149
152 vtkSetFilePathMacro(GeometryFileName);
153 vtkGetFilePathMacro(GeometryFileName);
155
159 virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
160 virtual VTK_FILEPATH char* GetFileName() { return this->GetGeometryFileName(); }
161
163
166 vtkSetFilePathMacro(DisplacementFileName);
167 vtkGetFilePathMacro(DisplacementFileName);
169
171
174 vtkSetFilePathMacro(ScalarFileName);
175 vtkGetFilePathMacro(ScalarFileName);
177
179
182 vtkSetFilePathMacro(TextureFileName);
183 vtkGetFilePathMacro(TextureFileName);
185
187
190 vtkSetMacro(ReadDisplacement, vtkTypeBool);
191 vtkGetMacro(ReadDisplacement, vtkTypeBool);
192 vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
194
196
199 vtkSetMacro(ReadScalar, vtkTypeBool);
200 vtkGetMacro(ReadScalar, vtkTypeBool);
201 vtkBooleanMacro(ReadScalar, vtkTypeBool);
203
205
209 vtkSetMacro(ReadTexture, vtkTypeBool);
210 vtkGetMacro(ReadTexture, vtkTypeBool);
211 vtkBooleanMacro(ReadTexture, vtkTypeBool);
213
215
218 vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
219 vtkGetMacro(PartNumber, int);
221
228 static int CanReadFile(VTK_FILEPATH const char* filename);
229
230protected:
232 ~vtkBYUReader() override;
233
235 // This source does not know how to generate pieces yet.
236 int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
237
246
247 void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
248 void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
249 void ReadScalarFile(int numPts, vtkInformation* outInfo);
250 void ReadTextureFile(int numPts, vtkInformation* outInfo);
251
252private:
253 vtkBYUReader(const vtkBYUReader&) = delete;
254 void operator=(const vtkBYUReader&) = delete;
255};
256
257#endif
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:141
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:238
vtkSetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
~vtkBYUReader() override
virtual VTK_FILEPATH char * GetFileName()
Definition: vtkBYUReader.h:160
vtkGetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
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:241
char * ScalarFileName
Definition: vtkBYUReader.h:240
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
char * DisplacementFileName
Definition: vtkBYUReader.h:239
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:244
vtkSetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
static vtkBYUReader * New()
void ReadScalarFile(int numPts, vtkInformation *outInfo)
vtkGetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:242
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:159
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:243
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:113
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:69
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FILEPATH