BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DSN6File.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_FORMAT_DSN6FILE_H
6 #define BALL_FORMAT_DSN6FILE_H
7 
8 #ifndef BALL_SYSTEM_FILE_H
9 # include <BALL/SYSTEM/file.h>
10 #endif
11 
12 #ifndef BALL_DATATYPE_REGULARDATA3D_H
14 #endif
15 
16 namespace BALL
17 {
24  : public File
25  {
26 
27  public:
28 
32 
34  DSN6File();
35 
37  DSN6File(const String& name, File::OpenMode open_mode = std::ios::in);
38 
40  virtual ~DSN6File();
41 
43 
46 
48  virtual void clear();
49 
51 
54 
56  bool operator == (const DSN6File& file) const;
57 
59  bool isSwappingBytes() const;
60 
62 
64 
68  virtual bool open(const String& name, File::OpenMode open_mode = std::ios::in);
69 
73  virtual bool readHeader();
74 
76  virtual bool read(RegularData3D& map);
77 
81  virtual bool writeHeader();
82 
84 
87 
89 
90  private:
91  const DSN6File& operator = (const DSN6File& file);
92 
93  protected:
94 
95  short int readHeaderValue_(char* header, Position pos);
96 
97  void convertBrick_(char* brick);
98 
101 
104 
107 
110 
113 
115  Angle alpha_, beta_, gamma_;
116 
119 
121  float prod_;
122  float plus_;
123 
125  Vector3 origin_, xaxis_, yaxis_, zaxis_;
126  };
127 } // namespace BALL
128 
129 #endif // BALL_FORMAT_DCDFILE_H
Vector3 extent_
the extent of the map
Definition: DSN6File.h:106
Vector3 start_
the start coordinates in grid coordinates, i.e. indices
Definition: DSN6File.h:103
float cell_scaling_
scaling factor for the cell geometry
Definition: DSN6File.h:118
std::ios::openmode OpenMode
Definition: file.h:168
Vector3 sampling_rate_
the sampling rates used for the map
Definition: DSN6File.h:109
Vector3 zaxis_
Definition: DSN6File.h:125
BALL_EXPORT bool operator==(const String &s1, const String &s2)
Vector3 crystal_dimension_
dimension of the crystal unit cell in Angstrom/sample
Definition: DSN6File.h:112
Angle gamma_
Definition: DSN6File.h:115
bool swap_bytes_
a flag indicating that we have to swap bytes when reading header values
Definition: DSN6File.h:100
#define BALL_EXPORT
Definition: COMMON/global.h:50
float prod_
conversion factors for the density map
Definition: DSN6File.h:121