Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kome::operation::MzRangeFilter Class Reference

m/z range filter class More...

#include <Filter.h>

Inheritance diagram for kome::operation::MzRangeFilter:
Inheritance graph
[legend]
Collaboration diagram for kome::operation::MzRangeFilter:
Collaboration graph
[legend]

Public Member Functions

 MzRangeFilter (double startMz, double endMz)
 constructor More...
 
virtual ~MzRangeFilter ()
 destructor
 
- Public Member Functions inherited from kome::objects::XYDataOperation
 XYDataOperation ()
 constructor
 
virtual ~XYDataOperation ()
 destructor
 
void setName (const char *name)
 sets name More...
 
const char * getName ()
 gets name More...
 
void setIndex (int index)
 set index More...
 
int getIndex ()
 get index More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Chromatogram &chrom)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Spectrum &spec)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Sample &sample)
 updates xy data More...
 

Protected Member Functions

virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)
 This method is called by update method. (override method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum &spec)
 This method is called by update method. (override method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Sample &sample)
 This method is called by update method. (override method) More...
 

Protected Attributes

double m_startMz
 
double m_endMz
 
- Protected Attributes inherited from kome::objects::XYDataOperation
std::string m_name
 
int m_index
 

Detailed Description

m/z range filter class

Definition at line 136 of file Filter.h.

Constructor & Destructor Documentation

kome::operation::MzRangeFilter::MzRangeFilter ( double  startMz,
double  endMz 
)

constructor

Parameters
[in]startMzstart m/z
[in]endMzend m/z

Definition at line 151 of file Filter.cpp.

151  {
152  m_startMz = startMz;
153  m_endMz = endMz;
154 }

Member Function Documentation

void kome::operation::MzRangeFilter::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Chromatogram chrom 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]chromchromatogram

Implements kome::objects::XYDataOperation.

Definition at line 161 of file Filter.cpp.

165  {
166 }
void kome::operation::MzRangeFilter::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Spectrum spec 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]specspectrum

Implements kome::objects::XYDataOperation.

Definition at line 169 of file Filter.cpp.

173  {
174 
175  // check the parameter
176  if( src.getLength() == 0 ) {
177  return;
178  }
179 
180  dst.clearPoints();
181 
182  for( unsigned int i=0; i < src.getLength(); i++ ){
183 
184  if( m_startMz < src.getX(i) && src.getX(i) <= m_endMz ){
185 
186  dst.addPoint( src.getX(i), src.getY(i) );
187  }
188  }
189 
190 }
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
void clearPoints()
clear all data points
Definition: XYData.cpp:137
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

void kome::operation::MzRangeFilter::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Sample sample 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]samplesample

Implements kome::objects::XYDataOperation.

Definition at line 193 of file Filter.cpp.

197  {
198 }

Member Data Documentation

double kome::operation::MzRangeFilter::m_endMz
protected

end m/z

Definition at line 158 of file Filter.h.

double kome::operation::MzRangeFilter::m_startMz
protected

start m/z

Definition at line 155 of file Filter.h.


The documentation for this class was generated from the following files: