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) VTK_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,int);
82  vtkGetMacro(ReadDisplacement,int);
83  vtkBooleanMacro(ReadDisplacement,int);
85 
87 
90  vtkSetMacro(ReadScalar,int);
91  vtkGetMacro(ReadScalar,int);
92  vtkBooleanMacro(ReadScalar,int);
94 
96 
100  vtkSetMacro(ReadTexture,int);
101  vtkGetMacro(ReadTexture,int);
102  vtkBooleanMacro(ReadTexture,int);
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() VTK_OVERRIDE;
124 
125  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
126  // This source does not know how to generate pieces yet.
127  int ComputeDivisionExtents(vtkDataObject *output,
128  int idx, int numDivisions);
129 
130  char *GeometryFileName;
131  char *DisplacementFileName;
132  char *ScalarFileName;
133  char *TextureFileName;
134  int ReadDisplacement;
135  int ReadScalar;
136  int ReadTexture;
137  int PartNumber;
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&) VTK_DELETE_FUNCTION;
145  void operator=(const vtkBYUReader&) VTK_DELETE_FUNCTION;
146 };
147 
148 #endif
Store vtkAlgorithm input/output information.
virtual void SetFileName(const char *f)
Specify name of geometry FileName (alias).
Definition: vtkBYUReader.h:50
#define VTK_INT_MAX
Definition: vtkType.h:157
virtual char * GetFileName()
Definition: vtkBYUReader.h:51
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
read MOVIE.BYU polygon files
Definition: vtkBYUReader.h:31
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.