BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCP4File.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 //
5 
6 #ifndef BALL_FORMAT_CCP4FILE_H
7 #define BALL_FORMAT_CCP4FILE_H
8 
9 #ifndef BALL_SYSTEM_FILE_H
10 # include <BALL/SYSTEM/file.h>
11 #endif
12 
13 #ifndef BALL_DATATYPE_REGULARDATA3D_H
15 #endif
16 
17 namespace BALL
18 {
27  : public File
28  {
29 
30  public:
31 
35 
37  CCP4File();
38 
42  CCP4File(const String& name, File::OpenMode open_mode = std::ios::in);
43 
45  virtual ~CCP4File();
46 
48 
51 
53  virtual void clear();
54 
56 
59 
61  bool operator == (const CCP4File& file) const;
62 
64 
66 
70  virtual bool open(const String& name, File::OpenMode open_mode = std::ios::in);
71 
75  virtual bool readHeader();
76 
80  virtual bool readSymmetryRecords();
81 
84  virtual bool read(RegularData3D& map);
85 
89  virtual bool writeHeader();
90 
94  virtual bool write(RegularData3D& map);
95 
97 
100 
102 
103  private:
104  const CCP4File& operator = (const CCP4File& file);
105 
106  protected:
107 
108  int readBinValueasInt_(char* header, Position pos);
109 
110  float readBinValueasFloat_(char* header, Position pos);
111 
114 
117 
122 
125 
128 
131 
134 
136  Angle alpha_, beta_, gamma_;
137 
140 
143 
146 
148  Vector3 origin_, xaxis_, yaxis_, zaxis_;
149  };
150 } // namespace BALL
151 
152 #endif // BALL_FORMAT_DCDFILE_H
Size sec_axis_
Definition: CCP4File.h:121
Angle gamma_
Definition: CCP4File.h:136
Vector3 cell_dimension_
dimension of the crystal unit cell in Angstrom/sample
Definition: CCP4File.h:133
Index space_group_
space group number
Definition: CCP4File.h:145
Distance offset_symops_
number of bytes used for storing symmetry operations
Definition: CCP4File.h:116
std::ios::openmode OpenMode
Definition: file.h:168
Vector3 extent_
the extent of the map
Definition: CCP4File.h:127
float deviation_sigma_
rms deviation of whole map from mean density value
Definition: CCP4File.h:142
bool swap_bytes_
flag indicating that we have to swap bytes when reading header values
Definition: CCP4File.h:113
Size row_axis_
Definition: CCP4File.h:120
Vector3 zaxis_
Definition: CCP4File.h:148
BALL_EXPORT bool operator==(const String &s1, const String &s2)
Vector3 sampling_rate_
the sampling rates used for the map
Definition: CCP4File.h:130
float mean_density_
mean density value
Definition: CCP4File.h:139
#define BALL_EXPORT
Definition: COMMON/global.h:50
Size col_axis_
how do columns, rows and sections correspond to specific axes: 0=x, 1=y, 2=z
Definition: CCP4File.h:119
Vector3 start_
the start coordinates in grid coordinates, i.e. indices
Definition: CCP4File.h:124