Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

IO/vtkBYUReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBYUReader.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00046 #ifndef __vtkBYUReader_h
00047 #define __vtkBYUReader_h
00048 
00049 #include "vtkPolyDataSource.h"
00050 
00051 class VTK_IO_EXPORT vtkBYUReader : public vtkPolyDataSource 
00052 {
00053 public:
00054   static vtkBYUReader *New();
00055 
00056   vtkTypeRevisionMacro(vtkBYUReader,vtkPolyDataSource);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   vtkSetStringMacro(GeometryFileName);
00062   vtkGetStringMacro(GeometryFileName);
00064 
00066 
00067   virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
00068   virtual char* GetFileName() { return this->GetGeometryFileName(); }
00070 
00072 
00073   vtkSetStringMacro(DisplacementFileName);
00074   vtkGetStringMacro(DisplacementFileName);
00076 
00078 
00079   vtkSetStringMacro(ScalarFileName);
00080   vtkGetStringMacro(ScalarFileName);
00082 
00084 
00085   vtkSetStringMacro(TextureFileName);
00086   vtkGetStringMacro(TextureFileName);
00088 
00090 
00091   vtkSetMacro(ReadDisplacement,int);
00092   vtkGetMacro(ReadDisplacement,int);
00093   vtkBooleanMacro(ReadDisplacement,int);
00095   
00097 
00098   vtkSetMacro(ReadScalar,int);
00099   vtkGetMacro(ReadScalar,int);
00100   vtkBooleanMacro(ReadScalar,int);
00102   
00104 
00106   vtkSetMacro(ReadTexture,int);
00107   vtkGetMacro(ReadTexture,int);
00108   vtkBooleanMacro(ReadTexture,int);
00110 
00112 
00113   vtkSetClampMacro(PartNumber,int,1,VTK_LARGE_INTEGER);
00114   vtkGetMacro(PartNumber,int);
00116 
00117 protected:
00118   vtkBYUReader();
00119   ~vtkBYUReader();
00120 
00121   void Execute();
00122   // This source does not know how to generate pieces yet.
00123   int ComputeDivisionExtents(vtkDataObject *output, 
00124                              int idx, int numDivisions);
00125 
00126   char *GeometryFileName;
00127   char *DisplacementFileName;
00128   char *ScalarFileName;
00129   char *TextureFileName;
00130   int ReadDisplacement;
00131   int ReadScalar;
00132   int ReadTexture;
00133   int PartNumber;
00134 
00135   void ReadGeometryFile(FILE *fp, int &numPts);
00136   void ReadDisplacementFile(int numPts);
00137   void ReadScalarFile(int numPts);
00138   void ReadTextureFile(int numPts);
00139 private:
00140   vtkBYUReader(const vtkBYUReader&);  // Not implemented.
00141   void operator=(const vtkBYUReader&);  // Not implemented.
00142 };
00143 
00144 #endif
00145 
00146