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 "vtkPolyDataAlgorithm.h"
29 
30 class vtkCellArray;
31 class vtkFloatArray;
32 class vtkDataArray;
33 class vtkIdTypeArray;
35 class vtkPoints;
36 
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
43  vtkSetStringMacro(FileName);
44  vtkGetStringMacro(FileName);
45 
47 
48  vtkSetMacro(BScale, double);
49  vtkGetMacro(BScale, double);
51 
53 
54  vtkSetMacro(HBScale, double);
55  vtkGetMacro(HBScale, double);
57 
58  vtkGetMacro(NumberOfAtoms, int);
59 
60 protected:
63 
64  char *FileName;
65  double BScale;
66  double HBScale;
68 
70  int ReadMolecule(FILE *fp, vtkPolyData *output);
71  int MakeAtomType(const char *atype);
72  int MakeBonds(vtkPoints*, vtkIdTypeArray*, vtkCellArray*);
73 
78 
79  virtual void ReadSpecificMolecule(FILE* fp) = 0;
80 
81 private:
82  vtkMoleculeReaderBase(const vtkMoleculeReaderBase&); // Not implemented.
83  void operator=(const vtkMoleculeReaderBase&); // Not implemented.
84 };
85 
86 #endif