VTK
vtkMoleculeReaderBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMoleculeReaderBase.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef __vtkMoleculeReaderBase_h
26 #define __vtkMoleculeReaderBase_h
27 
28 #include "vtkIOGeometryModule.h" // For export macro
29 #include "vtkPolyDataAlgorithm.h"
30 
31 class vtkCellArray;
32 class vtkFloatArray;
33 class vtkDataArray;
34 class vtkIdTypeArray;
36 class vtkPoints;
37 
38 class VTKIOGEOMETRY_EXPORT vtkMoleculeReaderBase : public vtkPolyDataAlgorithm
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
44  vtkSetStringMacro(FileName);
45  vtkGetStringMacro(FileName);
46 
48 
49  vtkSetMacro(BScale, double);
50  vtkGetMacro(BScale, double);
52 
54 
55  vtkSetMacro(HBScale, double);
56  vtkGetMacro(HBScale, double);
58 
59  vtkGetMacro(NumberOfAtoms, int);
60 
61 protected:
64 
65  char *FileName;
66  double BScale;
67  double HBScale;
69 
71  int ReadMolecule(FILE *fp, vtkPolyData *output);
72  int MakeAtomType(const char *atype);
73  int MakeBonds(vtkPoints*, vtkIdTypeArray*, vtkCellArray*);
74 
79 
80  virtual void ReadSpecificMolecule(FILE* fp) = 0;
81 
82 private:
83  vtkMoleculeReaderBase(const vtkMoleculeReaderBase&); // Not implemented.
84  void operator=(const vtkMoleculeReaderBase&); // Not implemented.
85 };
86 
87 #endif