00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkBYUReader_h
00028 #define __vtkBYUReader_h
00029
00030 #include "vtkPolyDataAlgorithm.h"
00031
00032 class VTK_IO_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
00033 {
00034 public:
00035 static vtkBYUReader *New();
00036
00037 vtkTypeRevisionMacro(vtkBYUReader,vtkPolyDataAlgorithm);
00038 void PrintSelf(ostream& os, vtkIndent indent);
00039
00041
00042 vtkSetStringMacro(GeometryFileName);
00043 vtkGetStringMacro(GeometryFileName);
00045
00047
00048 virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
00049 virtual char* GetFileName() { return this->GetGeometryFileName(); }
00051
00053
00054 vtkSetStringMacro(DisplacementFileName);
00055 vtkGetStringMacro(DisplacementFileName);
00057
00059
00060 vtkSetStringMacro(ScalarFileName);
00061 vtkGetStringMacro(ScalarFileName);
00063
00065
00066 vtkSetStringMacro(TextureFileName);
00067 vtkGetStringMacro(TextureFileName);
00069
00071
00072 vtkSetMacro(ReadDisplacement,int);
00073 vtkGetMacro(ReadDisplacement,int);
00074 vtkBooleanMacro(ReadDisplacement,int);
00076
00078
00079 vtkSetMacro(ReadScalar,int);
00080 vtkGetMacro(ReadScalar,int);
00081 vtkBooleanMacro(ReadScalar,int);
00083
00085
00087 vtkSetMacro(ReadTexture,int);
00088 vtkGetMacro(ReadTexture,int);
00089 vtkBooleanMacro(ReadTexture,int);
00091
00093
00094 vtkSetClampMacro(PartNumber,int,1,VTK_LARGE_INTEGER);
00095 vtkGetMacro(PartNumber,int);
00097
00098 protected:
00099 vtkBYUReader();
00100 ~vtkBYUReader();
00101
00102 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00103
00104 int ComputeDivisionExtents(vtkDataObject *output,
00105 int idx, int numDivisions);
00106
00107 char *GeometryFileName;
00108 char *DisplacementFileName;
00109 char *ScalarFileName;
00110 char *TextureFileName;
00111 int ReadDisplacement;
00112 int ReadScalar;
00113 int ReadTexture;
00114 int PartNumber;
00115
00116 void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo);
00117 void ReadDisplacementFile(int numPts, vtkInformation *outInfo);
00118 void ReadScalarFile(int numPts, vtkInformation *outInfo);
00119 void ReadTextureFile(int numPts, vtkInformation *outInfo);
00120 private:
00121 vtkBYUReader(const vtkBYUReader&);
00122 void operator=(const vtkBYUReader&);
00123 };
00124
00125 #endif