bruker2DFile.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: bruker2DFile.h,v 1.26 2005/12/23 17:01:46 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_FORMAT_BRUKER2DFILE_H
00008 #define BALL_FORMAT_BRUKER2DFILE_H
00009 
00010 #ifndef BALL_FORMAT_JCAMPFILE_H
00011 # include <BALL/FORMAT/JCAMPFile.h>
00012 #endif
00013 
00014 #ifndef BALL_DATATYPE_REGULARDATA2D_H
00015 # include <BALL/DATATYPE/regularData2D.h>
00016 #endif
00017 
00018 namespace BALL
00019 {
00026   class BALL_EXPORT Bruker2DFile
00027     : public File
00028   {
00029    public:
00030 
00033     Bruker2DFile();
00034 
00038     Bruker2DFile(const String& name, OpenMode open_mode = std::ios::in | std::ios::binary)
00039       throw(Exception::FileNotFound);
00040 
00043     Bruker2DFile(const Bruker2DFile& file)
00044       throw(Exception::FileNotFound);
00045 
00048     virtual ~Bruker2DFile()
00049       ;
00050 
00054     void read();
00055 
00059     void read(const String &name);
00060 
00062     const RegularData2D& getData() const { return spectrum_; }
00064     RegularData2D& getData() { return spectrum_; }
00065 
00068     std::list<std::pair<int, int> > getPeakList() const;
00069 
00072     std::pair<double, double> getShift(Position x, Position y);
00073 
00076     std::pair<Position, Position> getPosition(double x, double y);
00077 
00080     void setShiftRange(double offsetf1, double offsetf2, double swidthf1, double swidthf2, 
00081                        double bfreqf1, double bfreqf2, double spointnumf1, double spointnumf2);
00082 
00084     const Bruker2DFile& operator = (const Bruker2DFile& file) ;
00085 
00086     protected:
00088     JCAMPFile parsf1_;
00089     JCAMPFile parsf2_;
00090 
00091     Size minx_;
00092     Size maxx_;
00093     Size miny_;
00094     Size maxy_;
00095 
00096     // To be replaced by regularData2D
00097     RegularData2D dat_;
00098     double soffsetf1_;
00099     double soffsetf2_;
00100     double swidthf1_;
00101     double swidthf2_;
00102     double bfreqf1_;
00103     double bfreqf2_;
00104     Size spointnumf1_;
00105     Size spointnumf2_;
00106     RegularData2D spectrum_;
00107   };
00108 }
00109 
00110 #endif