00001
00002
00003
00004
00005 #ifndef BALL_FORMAT_DSN6FILE_H
00006 #define BALL_FORMAT_DSN6FILE_H
00007
00008 #ifndef BALL_SYSTEM_FILE_H
00009 # include <BALL/SYSTEM/file.h>
00010 #endif
00011
00012 #ifndef BALL_DATATYPE_REGULARDATA3D_H
00013 # include <BALL/DATATYPE/regularData3D.h>
00014 #endif
00015
00016 namespace BALL
00017 {
00023 class BALL_EXPORT DSN6File
00024 : public File
00025 {
00026
00027 public:
00028
00032
00034 DSN6File();
00035
00037 DSN6File(const String& name, File::OpenMode open_mode = std::ios::in);
00038
00040 virtual ~DSN6File();
00041
00043
00046
00048 virtual void clear();
00049
00051
00054
00056 bool operator == (const DSN6File& file) const;
00057
00059 bool isSwappingBytes() const;
00060
00062
00063
00064
00067 virtual bool open(const String& name, File::OpenMode open_mode = std::ios::in)
00068 throw(Exception::FileNotFound);
00069
00073 virtual bool readHeader();
00074
00076 virtual bool read(RegularData3D& map);
00077
00081 virtual bool writeHeader();
00082
00084
00087
00089
00090 private:
00091 const DSN6File& operator = (const DSN6File& file);
00092
00093 protected:
00094
00095 short int readHeaderValue_(char* header, Position pos);
00096
00097 void convertBrick_(char* brick);
00098
00100 bool swap_bytes_;
00101
00103 Vector3 start_;
00104
00106 Vector3 extent_;
00107
00109 Vector3 sampling_rate_;
00110
00112 Vector3 crystal_dimension_;
00113
00115 Angle alpha_, beta_, gamma_;
00116
00118 float cell_scaling_;
00119
00121 float prod_;
00122 float plus_;
00123
00125 Vector3 origin_, xaxis_, yaxis_, zaxis_;
00126 };
00127 }
00128
00129 #endif // BALL_FORMAT_DCDFILE_H