VTK
vtkXYZMolReader2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYZMolReader2.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 =========================================================================*/
26 #ifndef vtkXYZMolReader2_h
27 #define vtkXYZMolReader2_h
28 
29 #include "vtkDomainsChemistryModule.h" // For export macro
30 #include "vtkMoleculeAlgorithm.h"
31 
32 #include <vector>
33 #include <fstream>
34 #include <iostream>
35 
36 class vtkMolecule;
37 
38 class VTKDOMAINSCHEMISTRY_EXPORT vtkXYZMolReader2 : public vtkMoleculeAlgorithm
39 {
40 public:
41  static vtkXYZMolReader2 *New();
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
46 
50  void SetOutput(vtkMolecule *) VTK_OVERRIDE;
52 
54 
57  vtkSetStringMacro(FileName);
58  vtkGetStringMacro(FileName);
60 
61 protected:
63  ~vtkXYZMolReader2() VTK_OVERRIDE;
64 
65  int RequestData(vtkInformation *, vtkInformationVector **,
66  vtkInformationVector *) VTK_OVERRIDE;
67  int RequestInformation(vtkInformation *, vtkInformationVector **,
68  vtkInformationVector *) VTK_OVERRIDE;
69 
70  char *FileName;
71  std::vector<istream::pos_type> file_positions; // to store beginning of each tstep
72  std::vector<double> TimeSteps;
73 
74  int NumberOfTimeSteps;
75  int NumberOfAtoms;
76 
77 private:
78  vtkXYZMolReader2(const vtkXYZMolReader2&) VTK_DELETE_FUNCTION;
79  void operator=(const vtkXYZMolReader2&) VTK_DELETE_FUNCTION;
80 };
81 
82 #endif
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:87
static vtkMoleculeAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetOutput(vtkMolecule *d)
Get the output data object for a port on this algorithm.
Superclass for algorithms that operate on vtkMolecules.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Store zero or more vtkInformation instances.
vtkMolecule * GetOutput()
Get the output data object for a port on this algorithm.
read Molecular Data files