00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkMoleculeReaderBase_h
00026 #define __vtkMoleculeReaderBase_h
00027
00028 #include "vtkPolyDataAlgorithm.h"
00029
00030 class vtkCellArray;
00031 class vtkFloatArray;
00032 class vtkDataArray;
00033 class vtkIdTypeArray;
00034 class vtkUnsignedCharArray;
00035 class vtkPoints;
00036
00037 class VTK_IO_EXPORT vtkMoleculeReaderBase : public vtkPolyDataAlgorithm
00038 {
00039 public:
00040 vtkTypeRevisionMacro(vtkMoleculeReaderBase,vtkPolyDataAlgorithm);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00043 vtkSetStringMacro(FileName);
00044 vtkGetStringMacro(FileName);
00045
00046 vtkSetMacro(BScale, double);
00047 vtkGetMacro(BScale, double);
00048
00049 vtkSetMacro(HBScale, double);
00050 vtkGetMacro(HBScale, double);
00051
00052 vtkGetMacro(NumberOfAtoms, int);
00053
00054 protected:
00055 vtkMoleculeReaderBase();
00056 ~vtkMoleculeReaderBase();
00057
00058 char *FileName;
00059 double BScale;
00060
00061 double HBScale;
00062
00063 int NumberOfAtoms;
00064
00065 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00066 int ReadMolecule(FILE *fp, vtkPolyData *output);
00067 int MakeAtomType(const char *atype);
00068 int MakeBonds(vtkPoints*, vtkIdTypeArray*, vtkCellArray*);
00069
00070 vtkPoints *Points;
00071 vtkUnsignedCharArray *RGB;
00072 vtkFloatArray *Radii;
00073 vtkIdTypeArray *AtomType;
00074
00075 virtual void ReadSpecificMolecule(FILE* fp) = 0;
00076
00077 private:
00078 vtkMoleculeReaderBase(const vtkMoleculeReaderBase&);
00079 void operator=(const vtkMoleculeReaderBase&);
00080 };
00081
00082 #endif