BALL 1.5.0
Loading...
Searching...
No Matches
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
16namespace BALL
17{
24 : public File
25 {
26
27 public:
28
32
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
DSN6File()
Default constructor.
short int readHeaderValue_(char *header, Position pos)
Vector3 extent_
the extent of the map
Definition DSN6File.h:106
bool swap_bytes_
a flag indicating that we have to swap bytes when reading header values
Definition DSN6File.h:100
virtual bool read(RegularData3D &map)
Vector3 crystal_dimension_
dimension of the crystal unit cell in Angstrom/sample
Definition DSN6File.h:112
virtual ~DSN6File()
Destructor.
Vector3 start_
the start coordinates in grid coordinates, i.e. indices
Definition DSN6File.h:103
virtual bool readHeader()
float prod_
conversion factors for the density map
Definition DSN6File.h:121
virtual bool writeHeader()
bool isSwappingBytes() const
float cell_scaling_
scaling factor for the cell geometry
Definition DSN6File.h:118
Vector3 origin_
geometry in cartesian coordinates
Definition DSN6File.h:125
DSN6File(const String &name, File::OpenMode open_mode=std::ios::in)
Detailed constructor.
void convertBrick_(char *brick)
virtual bool open(const String &name, File::OpenMode open_mode=std::ios::in)
Vector3 sampling_rate_
the sampling rates used for the map
Definition DSN6File.h:109
virtual void clear()
Clear method.
Angle alpha_
angles of the crystal unit cell
Definition DSN6File.h:115
std::ios::openmode OpenMode
Definition file.h:165
#define BALL_EXPORT