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
00047
00048 vtkSetMacro(BScale, double);
00049 vtkGetMacro(BScale, double);
00051
00053
00054 vtkSetMacro(HBScale, double);
00055 vtkGetMacro(HBScale, double);
00057
00058 vtkGetMacro(NumberOfAtoms, int);
00059
00060 protected:
00061 vtkMoleculeReaderBase();
00062 ~vtkMoleculeReaderBase();
00063
00064 char *FileName;
00065 double BScale;
00066 double HBScale;
00067 int NumberOfAtoms;
00068
00069 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00070 int ReadMolecule(FILE *fp, vtkPolyData *output);
00071 int MakeAtomType(const char *atype);
00072 int MakeBonds(vtkPoints*, vtkIdTypeArray*, vtkCellArray*);
00073
00074 vtkPoints *Points;
00075 vtkUnsignedCharArray *RGB;
00076 vtkFloatArray *Radii;
00077 vtkIdTypeArray *AtomType;
00078
00079 virtual void ReadSpecificMolecule(FILE* fp) = 0;
00080
00081 private:
00082 vtkMoleculeReaderBase(const vtkMoleculeReaderBase&);
00083 void operator=(const vtkMoleculeReaderBase&);
00084 };
00085
00086 #endif