Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
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   // a scaling factor to compute bonds between non-hydrogen atoms
00061   double HBScale; 
00062   // a scaling factor to compute bonds with hydrogen atoms
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&);  // Not implemented.
00079   void operator=(const vtkMoleculeReaderBase&);  // Not implemented.
00080 };
00081 
00082 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530