VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtkBYUReader_h
29 #define vtkBYUReader_h
30 
31 #include "vtkIOGeometryModule.h" // For export macro
32 #include "vtkPolyDataAlgorithm.h"
33 
34 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkBYUReader* New();
38 
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  vtkSetFilePathMacro(GeometryFileName);
47  vtkGetFilePathMacro(GeometryFileName);
49 
53  virtual void SetFileName(VTK_FILEPATH const char* f) { this->SetGeometryFileName(f); }
54  virtual VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
55  {
56  return this->GetGeometryFileName();
57  }
58 
60 
63  vtkSetFilePathMacro(DisplacementFileName);
64  vtkGetFilePathMacro(DisplacementFileName);
66 
68 
71  vtkSetFilePathMacro(ScalarFileName);
72  vtkGetFilePathMacro(ScalarFileName);
74 
76 
79  vtkSetFilePathMacro(TextureFileName);
80  vtkGetFilePathMacro(TextureFileName);
82 
84 
87  vtkSetMacro(ReadDisplacement, vtkTypeBool);
88  vtkGetMacro(ReadDisplacement, vtkTypeBool);
89  vtkBooleanMacro(ReadDisplacement, vtkTypeBool);
91 
93 
96  vtkSetMacro(ReadScalar, vtkTypeBool);
97  vtkGetMacro(ReadScalar, vtkTypeBool);
98  vtkBooleanMacro(ReadScalar, vtkTypeBool);
100 
102 
106  vtkSetMacro(ReadTexture, vtkTypeBool);
107  vtkGetMacro(ReadTexture, vtkTypeBool);
108  vtkBooleanMacro(ReadTexture, vtkTypeBool);
110 
112 
115  vtkSetClampMacro(PartNumber, int, 1, VTK_INT_MAX);
116  vtkGetMacro(PartNumber, int);
118 
125  static int CanReadFile(VTK_FILEPATH const char* filename);
126 
127 protected:
128  vtkBYUReader();
129  ~vtkBYUReader() override;
130 
132  // This source does not know how to generate pieces yet.
133  int ComputeDivisionExtents(vtkDataObject* output, int idx, int numDivisions);
134 
143 
144  void ReadGeometryFile(FILE* fp, int& numPts, vtkInformation* outInfo);
145  void ReadDisplacementFile(int numPts, vtkInformation* outInfo);
146  void ReadScalarFile(int numPts, vtkInformation* outInfo);
147  void ReadTextureFile(int numPts, vtkInformation* outInfo);
148 
149 private:
150  vtkBYUReader(const vtkBYUReader&) = delete;
151  void operator=(const vtkBYUReader&) = delete;
152 };
153 
154 #endif
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:140
char * TextureFileName
Definition: vtkBYUReader.h:138
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:155
virtual VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Definition: vtkBYUReader.h:54
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
char * GeometryFileName
Definition: vtkBYUReader.h:135
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:34
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:139
#define VTK_FILEPATH
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:141
char * DisplacementFileName
Definition: vtkBYUReader.h:136
char * ScalarFileName
Definition: vtkBYUReader.h:137
Store zero or more vtkInformation instances.
virtual void SetFileName(VTK_FILEPATH const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:53
general representation of visualization data
Definition: vtkDataObject.h:65
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.