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 =========================================================================*/
30 #ifndef __vtkBYUReader_h
31 #define __vtkBYUReader_h
32 
33 #include "vtkPolyDataAlgorithm.h"
34 
36 {
37 public:
38  static vtkBYUReader *New();
39 
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
45  vtkSetStringMacro(GeometryFileName);
46  vtkGetStringMacro(GeometryFileName);
48 
50 
51  virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
52  virtual char* GetFileName() { return this->GetGeometryFileName(); }
54 
56 
57  vtkSetStringMacro(DisplacementFileName);
58  vtkGetStringMacro(DisplacementFileName);
60 
62 
63  vtkSetStringMacro(ScalarFileName);
64  vtkGetStringMacro(ScalarFileName);
66 
68 
69  vtkSetStringMacro(TextureFileName);
70  vtkGetStringMacro(TextureFileName);
72 
74 
75  vtkSetMacro(ReadDisplacement,int);
76  vtkGetMacro(ReadDisplacement,int);
77  vtkBooleanMacro(ReadDisplacement,int);
79 
81 
82  vtkSetMacro(ReadScalar,int);
83  vtkGetMacro(ReadScalar,int);
84  vtkBooleanMacro(ReadScalar,int);
86 
88 
90  vtkSetMacro(ReadTexture,int);
91  vtkGetMacro(ReadTexture,int);
92  vtkBooleanMacro(ReadTexture,int);
94 
96 
97  vtkSetClampMacro(PartNumber,int,1,VTK_LARGE_INTEGER);
98  vtkGetMacro(PartNumber,int);
100 
105  static int CanReadFile(const char *filename);
106 
107 protected:
108  vtkBYUReader();
109  ~vtkBYUReader();
110 
112  // This source does not know how to generate pieces yet.
113  int ComputeDivisionExtents(vtkDataObject *output,
114  int idx, int numDivisions);
115 
124 
125  void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo);
126  void ReadDisplacementFile(int numPts, vtkInformation *outInfo);
127  void ReadScalarFile(int numPts, vtkInformation *outInfo);
128  void ReadTextureFile(int numPts, vtkInformation *outInfo);
129 private:
130  vtkBYUReader(const vtkBYUReader&); // Not implemented.
131  void operator=(const vtkBYUReader&); // Not implemented.
132 };
133 
134 #endif