VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Geometry/vtkBYUReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBYUReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef vtkBYUReader_h
00031 #define vtkBYUReader_h
00032 
00033 #include "vtkIOGeometryModule.h" // For export macro
00034 #include "vtkPolyDataAlgorithm.h"
00035 
00036 class VTKIOGEOMETRY_EXPORT vtkBYUReader : public vtkPolyDataAlgorithm
00037 {
00038 public:
00039   static vtkBYUReader *New();
00040 
00041   vtkTypeMacro(vtkBYUReader,vtkPolyDataAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   vtkSetStringMacro(GeometryFileName);
00047   vtkGetStringMacro(GeometryFileName);
00049 
00051 
00052   virtual void SetFileName(const char* f) { this->SetGeometryFileName(f); }
00053   virtual char* GetFileName() { return this->GetGeometryFileName(); }
00055 
00057 
00058   vtkSetStringMacro(DisplacementFileName);
00059   vtkGetStringMacro(DisplacementFileName);
00061 
00063 
00064   vtkSetStringMacro(ScalarFileName);
00065   vtkGetStringMacro(ScalarFileName);
00067 
00069 
00070   vtkSetStringMacro(TextureFileName);
00071   vtkGetStringMacro(TextureFileName);
00073 
00075 
00076   vtkSetMacro(ReadDisplacement,int);
00077   vtkGetMacro(ReadDisplacement,int);
00078   vtkBooleanMacro(ReadDisplacement,int);
00080 
00082 
00083   vtkSetMacro(ReadScalar,int);
00084   vtkGetMacro(ReadScalar,int);
00085   vtkBooleanMacro(ReadScalar,int);
00087 
00089 
00091   vtkSetMacro(ReadTexture,int);
00092   vtkGetMacro(ReadTexture,int);
00093   vtkBooleanMacro(ReadTexture,int);
00095 
00097 
00098   vtkSetClampMacro(PartNumber,int,1,VTK_INT_MAX);
00099   vtkGetMacro(PartNumber,int);
00101 
00106   static int CanReadFile(const char *filename);
00107 
00108 protected:
00109   vtkBYUReader();
00110   ~vtkBYUReader();
00111 
00112   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00113   // This source does not know how to generate pieces yet.
00114   int ComputeDivisionExtents(vtkDataObject *output,
00115                              int idx, int numDivisions);
00116 
00117   char *GeometryFileName;
00118   char *DisplacementFileName;
00119   char *ScalarFileName;
00120   char *TextureFileName;
00121   int ReadDisplacement;
00122   int ReadScalar;
00123   int ReadTexture;
00124   int PartNumber;
00125 
00126   void ReadGeometryFile(FILE *fp, int &numPts, vtkInformation *outInfo);
00127   void ReadDisplacementFile(int numPts, vtkInformation *outInfo);
00128   void ReadScalarFile(int numPts, vtkInformation *outInfo);
00129   void ReadTextureFile(int numPts, vtkInformation *outInfo);
00130 private:
00131   vtkBYUReader(const vtkBYUReader&);  // Not implemented.
00132   void operator=(const vtkBYUReader&);  // Not implemented.
00133 };
00134 
00135 #endif