VTK
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 =========================================================================*/
25 #ifndef vtkBYUReader_h
26 #define vtkBYUReader_h
27 
28 #include "vtkIOGeometryModule.h" // For export macro
29 #include "vtkPolyDataAlgorithm.h"
30 
31 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
32 {
33 public:
34  static vtkBYUReader *New();
35 
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
43  vtkSetStringMacro(GeometryFileName);
44  vtkGetStringMacro(GeometryFileName);
46 
50  virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
51  virtual char* GetFileName() { return this->GetGeometryFileName(); }
52 
54 
57  vtkSetStringMacro(DisplacementFileName);
58  vtkGetStringMacro(DisplacementFileName);
60 
62 
65  vtkSetStringMacro(ScalarFileName);
66  vtkGetStringMacro(ScalarFileName);
68 
70 
73  vtkSetStringMacro(TextureFileName);
74  vtkGetStringMacro(TextureFileName);
76 
78 
81  vtkSetMacro(ReadDisplacement,vtkTypeBool);
82  vtkGetMacro(ReadDisplacement,vtkTypeBool);
83  vtkBooleanMacro(ReadDisplacement,vtkTypeBool);
85 
87 
90  vtkSetMacro(ReadScalar,vtkTypeBool);
91  vtkGetMacro(ReadScalar,vtkTypeBool);
92  vtkBooleanMacro(ReadScalar,vtkTypeBool);
94 
96 
100  vtkSetMacro(ReadTexture,vtkTypeBool);
101  vtkGetMacro(ReadTexture,vtkTypeBool);
102  vtkBooleanMacro(ReadTexture,vtkTypeBool);
104 
106 
109  vtkSetClampMacro(PartNumber,int,1,VTK_INT_MAX);
110  vtkGetMacro(PartNumber,int);
112 
119  static int CanReadFile(const char *filename);
120 
121 protected:
122  vtkBYUReader();
123  ~vtkBYUReader() override;
124 
126  // This source does not know how to generate pieces yet.
127  int ComputeDivisionExtents(vtkDataObject *output,
128  int idx, int numDivisions);
129 
138 
139  void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo);
140  void ReadDisplacementFile(int numPts, vtkInformation *outInfo);
141  void ReadScalarFile(int numPts, vtkInformation *outInfo);
142  void ReadTextureFile(int numPts, vtkInformation *outInfo);
143 private:
144  vtkBYUReader(const vtkBYUReader&) = delete;
145  void operator=(const vtkBYUReader&) = delete;
146 };
147 
148 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkBYUReader::PartNumber
int PartNumber
Definition: vtkBYUReader.h:137
vtkBYUReader::ReadDisplacement
vtkTypeBool ReadDisplacement
Definition: vtkBYUReader.h:134
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkBYUReader::ReadScalar
vtkTypeBool ReadScalar
Definition: vtkBYUReader.h:135
vtkBYUReader::ScalarFileName
char * ScalarFileName
Definition: vtkBYUReader.h:132
vtkBYUReader::ReadTexture
vtkTypeBool ReadTexture
Definition: vtkBYUReader.h:136
vtkBYUReader::GetFileName
virtual char * GetFileName()
Definition: vtkBYUReader.h:51
vtkBYUReader::DisplacementFileName
char * DisplacementFileName
Definition: vtkBYUReader.h:131
vtkBYUReader::SetFileName
virtual void SetFileName(const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:50
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkBYUReader
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:31
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkBYUReader::GeometryFileName
char * GeometryFileName
Definition: vtkBYUReader.h:130
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkBYUReader::TextureFileName
char * TextureFileName
Definition: vtkBYUReader.h:133
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41