00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // -------------------------------------------------------------------------- 00005 // OpenMS Mass Spectrometry Framework 00006 // -------------------------------------------------------------------------- 00007 // Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert 00008 // 00009 // This library is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 // 00023 // -------------------------------------------------------------------------- 00024 // $Maintainer: Eva Lange$ 00025 // -------------------------------------------------------------------------- 00026 00027 00028 #ifndef OPENMS_ANALYSIS_MAPMATCHING_BASESUPERIMPOSER_H 00029 #define OPENMS_ANALYSIS_MAPMATCHING_BASESUPERIMPOSER_H 00030 00031 #include <OpenMS/ANALYSIS/MAPMATCHING/LinearMapping.h> 00032 #include <OpenMS/KERNEL/FeatureMap.h> 00033 00034 #include <utility> 00035 #include <fstream> 00036 00037 namespace OpenMS 00038 { 00039 00054 template <typename MapT = FeatureMap<> > 00055 class BaseSuperimposer 00056 : public FactoryProduct 00057 { 00058 public: 00059 00062 enum LCMS 00063 { 00064 RT = 0, 00065 MZ = 1 00066 }; 00067 00071 enum Maps 00072 { 00073 MODEL = 0, 00074 SCENE = 1 00075 }; 00076 00078 typedef MapT PointMapType; 00079 00081 typedef typename PointMapType::value_type PointType; 00082 00084 typedef DoubleReal QualityType; 00085 00087 typedef DPosition < 2 > PositionType; 00088 00090 typedef DoubleReal IntensityType; 00091 00093 typedef LinearMapping TransformationType; 00094 00096 BaseSuperimposer() 00097 : FactoryProduct("BaseSuperimposer"), 00098 final_transformation_() 00099 { 00100 element_map_[MODEL] = 0; 00101 element_map_[SCENE] = 0; 00102 } 00103 00105 virtual ~BaseSuperimposer() 00106 { 00107 } 00108 00110 void setElementMap(UInt const index, const PointMapType& element_map) 00111 { 00112 element_map_[index] = &element_map; 00113 } 00114 00116 const PointMapType& getElementMap(UInt index) 00117 { 00118 return *element_map_[index]; 00119 } 00120 00122 const PointMapType& getElementMap(UInt index) const 00123 { 00124 return *element_map_[index]; 00125 } 00126 00128 void setTransformation(UInt dim, const TransformationType& trafo) 00129 { 00130 final_transformation_[dim] = trafo; 00131 } 00132 00134 const TransformationType& getTransformation(UInt dim) const 00135 { 00136 return final_transformation_[dim]; 00137 } 00138 00140 virtual void run() = 0; 00141 00142 00144 static void registerChildren(); 00145 00146 protected: 00148 PointMapType const * element_map_[2]; 00149 00151 TransformationType final_transformation_[2]; 00152 } 00153 ; // BaseSuperimposer 00154 00155 } // namespace OpenMS 00156 00157 #endif // OPENMS_ANALYSIS_MAPMATCHING_BASESUPERIMPOSER_H
Generated Tue Apr 1 15:36:33 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |