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 
140 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
141 {
142 public:
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 
230 protected:
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 
252 private:
253  vtkBYUReader(const vtkBYUReader&) = delete;
254  void operator=(const vtkBYUReader&) = delete;
255 };
256 
257 #endif
vtkBYUReader::vtkSetFilePathMacro
vtkSetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkBYUReader::PartNumber
int PartNumber
Definition: vtkBYUReader.h:245
vtkBYUReader::GetFileName
virtual VTK_FILEPATH char * GetFileName()
Definition: vtkBYUReader.h:160
vtkBYUReader::vtkSetFilePathMacro
vtkSetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkBYUReader::ReadDisplacement
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:242
vtkBYUReader::vtkGetFilePathMacro
vtkGetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkBYUReader::ReadScalar
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:243
vtkBYUReader::ReadTextureFile
void ReadTextureFile(int numPts, vtkInformation *outInfo)
vtkBYUReader::ScalarFileName
char * ScalarFileName
Definition: vtkBYUReader.h:240
vtkBYUReader::ReadTexture
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:244
vtkBYUReader::DisplacementFileName
char * DisplacementFileName
Definition: vtkBYUReader.h:239
vtkBYUReader::vtkGetFilePathMacro
vtkGetFilePathMacro(DisplacementFileName)
Specify name of displacement FileName.
vtkBYUReader::New
static vtkBYUReader * New()
vtkBYUReader::vtkGetFilePathMacro
vtkGetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
vtkBYUReader::vtkSetFilePathMacro
vtkSetFilePathMacro(ScalarFileName)
Specify name of scalar FileName.
vtkBYUReader::ComputeDivisionExtents
int ComputeDivisionExtents(vtkDataObject *output, int idx, int numDivisions)
vtkPolyDataAlgorithm.h
vtkBYUReader::vtkGetFilePathMacro
vtkGetFilePathMacro(GeometryFileName)
Specify name of geometry FileName.
vtkBYUReader
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:141
vtkBYUReader::GeometryFileName
char * GeometryFileName
Definition: vtkBYUReader.h:238
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkBYUReader::ReadDisplacementFile
void ReadDisplacementFile(int numPts, vtkInformation *outInfo)
vtkBYUReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBYUReader::TextureFileName
char * TextureFileName
Definition: vtkBYUReader.h:241
vtkBYUReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkBYUReader::vtkBYUReader
vtkBYUReader()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkBYUReader::CanReadFile
static int CanReadFile(VTK_FILEPATH const char *filename)
Returns 1 if this file can be read and 0 if the file cannot be read.
vtkBYUReader::ReadScalarFile
void ReadScalarFile(int numPts, vtkInformation *outInfo)
vtkBYUReader::ReadGeometryFile
void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo)
vtkBYUReader::vtkSetFilePathMacro
vtkSetFilePathMacro(TextureFileName)
Specify name of texture coordinates FileName.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkBYUReader::SetFileName
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:159
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBYUReader::~vtkBYUReader
~vtkBYUReader() override
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151