BALL  1.4.1
bruker2DFile.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_FORMAT_BRUKER2DFILE_H
00006 #define BALL_FORMAT_BRUKER2DFILE_H
00007 
00008 #ifndef BALL_FORMAT_JCAMPFILE_H
00009 # include <BALL/FORMAT/JCAMPFile.h>
00010 #endif
00011 
00012 #ifndef BALL_DATATYPE_REGULARDATA2D_H
00013 # include <BALL/DATATYPE/regularData2D.h>
00014 #endif
00015 
00016 namespace BALL
00017 {
00024   class BALL_EXPORT Bruker2DFile
00025     : public File
00026   {
00027    public:
00028 
00031     Bruker2DFile();
00032 
00037     Bruker2DFile(const String& name, OpenMode open_mode = std::ios::in | std::ios::binary);
00038 
00041     virtual ~Bruker2DFile();
00042 
00046     void read();
00047 
00051     void read(const String &name);
00052 
00054     const RegularData2D& getData() const { return spectrum_; }
00056     RegularData2D& getData() { return spectrum_; }
00057 
00060     std::list<std::pair<int, int> > getPeakList() const;
00061 
00064     std::pair<double, double> getShift(Position x, Position y);
00065 
00068     std::pair<Position, Position> getPosition(double x, double y);
00069 
00072     void setShiftRange(double offsetf1, double offsetf2, double swidthf1, double swidthf2, 
00073                        double bfreqf1, double bfreqf2, double spointnumf1, double spointnumf2);
00074 
00075     private:
00076       const Bruker2DFile& operator = (const Bruker2DFile& file);
00077 
00078     protected:
00080     JCAMPFile parsf1_;
00081     JCAMPFile parsf2_;
00082 
00083     Size minx_;
00084     Size maxx_;
00085     Size miny_;
00086     Size maxy_;
00087 
00088     // To be replaced by regularData2D
00089     RegularData2D dat_;
00090     double soffsetf1_;
00091     double soffsetf2_;
00092     double swidthf1_;
00093     double swidthf2_;
00094     double bfreqf1_;
00095     double bfreqf2_;
00096     Size spointnumf1_;
00097     Size spointnumf2_;
00098     RegularData2D spectrum_;
00099   };
00100 }
00101 
00102 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines