Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkMoleculeReaderBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMoleculeReaderBase.h,v $
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 =========================================================================*/
00037 #ifndef __vtkMoleculeReaderBase_h
00038 #define __vtkMoleculeReaderBase_h
00039 
00040 #include "vtkPolyDataSource.h"
00041 
00042 class vtkCellArray;
00043 class vtkFloatArray;
00044 class vtkDataArray;
00045 class vtkIdTypeArray;
00046 class vtkUnsignedCharArray;
00047 class vtkPoints;
00048 
00049 class VTK_IO_EXPORT vtkMoleculeReaderBase : public vtkPolyDataSource 
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkMoleculeReaderBase,vtkPolyDataSource);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00055   vtkSetStringMacro(FileName);
00056   vtkGetStringMacro(FileName);
00057 
00058   vtkSetMacro(BScale, double);
00059   vtkGetMacro(BScale, double);
00060 
00061   vtkSetMacro(HBScale, double);
00062   vtkGetMacro(HBScale, double);
00063 
00064   vtkGetMacro(NumberOfAtoms, int);
00065 
00066 protected:
00067   vtkMoleculeReaderBase();
00068   ~vtkMoleculeReaderBase();
00069 
00070   char *FileName;
00071   double BScale;  
00072   // a scaling factor to compute bonds between non-hydrogen atoms
00073   double HBScale; 
00074   // a scaling factor to compute bonds with hydrogen atoms
00075   int NumberOfAtoms;
00076 
00077   virtual void Execute();
00078   int ReadMolecule(FILE *fp);
00079   int MakeAtomType(const char *atype);
00080   int MakeBonds(vtkPoints*, vtkIdTypeArray*, vtkCellArray*);
00081 
00082   vtkPoints *Points;
00083   vtkUnsignedCharArray *RGB;
00084   vtkFloatArray *Radii;
00085   vtkIdTypeArray *AtomType;
00086 
00087   virtual void ReadSpecificMolecule(FILE* fp) = 0;
00088   
00089 private:
00090   vtkMoleculeReaderBase(const vtkMoleculeReaderBase&);  // Not implemented.
00091   void operator=(const vtkMoleculeReaderBase&);  // Not implemented.
00092 };
00093 
00094 #endif