BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // 00005 00006 #ifndef BALL_FORMAT_CCP4FILE_H 00007 #define BALL_FORMAT_CCP4FILE_H 00008 00009 #ifndef BALL_SYSTEM_FILE_H 00010 # include <BALL/SYSTEM/file.h> 00011 #endif 00012 00013 #ifndef BALL_DATATYPE_REGULARDATA3D_H 00014 # include <BALL/DATATYPE/regularData3D.h> 00015 #endif 00016 00017 namespace BALL 00018 { 00026 class BALL_EXPORT CCP4File 00027 : public File 00028 { 00029 00030 public: 00031 00035 00037 CCP4File(); 00038 00042 CCP4File(const String& name, File::OpenMode open_mode = std::ios::in); 00043 00045 virtual ~CCP4File(); 00046 00048 00051 00053 virtual void clear(); 00054 00056 00059 00061 bool operator == (const CCP4File& file) const; 00062 00064 00065 00066 00070 virtual bool open(const String& name, File::OpenMode open_mode = std::ios::in); 00071 00075 virtual bool readHeader(); 00076 00080 virtual bool readSymmetryRecords(); 00081 00084 virtual bool read(RegularData3D& map); 00085 00089 virtual bool writeHeader(); 00090 00094 virtual bool write(RegularData3D& map); 00095 00097 00100 00102 00103 private: 00104 const CCP4File& operator = (const CCP4File& file); 00105 00106 protected: 00107 00108 int readBinValueasInt_(char* header, Position pos); 00109 00110 float readBinValueasFloat_(char* header, Position pos); 00111 00113 bool swap_bytes_; 00114 00116 int offset_symops_; 00117 00119 int col_axis_; 00120 int row_axis_; 00121 int sec_axis_; 00122 00124 Vector3 start_; 00125 00127 Vector3 extent_; 00128 00130 Vector3 sampling_rate_; 00131 00133 Vector3 cell_dimension_; 00134 00136 Angle alpha_, beta_, gamma_; 00137 00139 float mean_density_; 00140 00142 float deviation_sigma_; 00143 00145 int space_group_; 00146 00148 Vector3 origin_, xaxis_, yaxis_, zaxis_; 00149 }; 00150 } // namespace BALL 00151 00152 #endif // BALL_FORMAT_DCDFILE_H