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::AlignedChromatogram Class Reference

aligned chromatogram class More...

#include <AlignedChromatogram.h>

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

Public Member Functions

 AlignedChromatogram (kome::objects::Chromatogram &org, Alignment *align)
 constructor More...
 
virtual ~AlignedChromatogram ()
 destructor
 
- Public Member Functions inherited from kome::objects::Chromatogram
 Chromatogram (Sample *sample)
 constructor More...
 
virtual ~Chromatogram ()
 destructor
 
void setOperationFlag (const bool op)
 sets the operation flag value More...
 
bool getOperationFlag ()
 gets the operation flag value More...
 
void setId (int id)
 sets chromatogram id More...
 
int getId ()
 gets chromatogram id More...
 
SamplegetSample ()
 gets sample More...
 
void setName (const char *name)
 sets chromatogram name More...
 
const char * getName ()
 gets chromatogram name More...
 
void setMz (const double mz)
 sets m/z More...
 
double getMz ()
 gets m/z More...
 
void setGroup (DataGroupNode *group)
 sets spectrum group More...
 
DataGroupNodegetGroup ()
 gets spectrum group More...
 
void setIcon (const char *icon)
 sets icon name More...
 
const char * getIcon ()
 gets icon name More...
 
void setTitle (const char *title)
 sets title More...
 
const char * getTitle ()
 gets title More...
 
kome::core::PropertiesgetProperties ()
 gets properties More...
 
kome::core::PropertiesgetUserProperties ()
 gets user properties More...
 
void setAutoCreated (const bool autoCreated=true)
 sets auto created flag More...
 
bool isAutoCreated ()
 gets auto created flag value More...
 
void setVisible (const bool visible)
 sets the visible flag More...
 
bool isVisible ()
 gets the visible flag value More...
 
void setOrgChromatogram (Chromatogram *chrom)
 sets original chromatogram More...
 
ChromatogramgetOrgChromatogram ()
 gets original chromatogram More...
 
void setQ1 (const double q1)
 sets the Q1 Mass More...
 
double getQ1 ()
 gets the Q1 Mass More...
 
void setQ3 (const double q3)
 sets the Q3 Mass More...
 
double getQ3 ()
 gets the Q3 Mass More...
 
kome::core::XYDatagetXYData ()
 gets xy data from data manager More...
 
void deleteXYData ()
 deletes xy data of data manager
 
void getXYData (kome::core::XYData *const xyData, const bool op)
 gets chromatogram data points More...
 
SpectrumsearchSpectrum (const double rt, const SearchType search=SEARCH_NEAR)
 searches spectrum More...
 
void getSpectra (DataSet &dataSet, const double startRt, const double endRt, const SearchType startSearch=SEARCH_NEAR, const SearchType endSearch=SEARCH_NEAR)
 get spectra in specified RT range More...
 
double getMass (const unsigned int index)
 gets mass More...
 
int getMsStage (const unsigned int index)
 gets MS stage More...
 
double getPrecursor (const unsigned int index)
 gets precursor mass More...
 
void getProperties (kome::core::Properties &properties)
 gets spectrum and spectrum group properties More...
 
void getUserProperties (kome::core::Properties &userProperties)
 gets chromatogram and chromatogram group user properties More...
 

Protected Member Functions

virtual void onGetXYData (kome::core::XYData *const xyData)
 This method is called by getXYData method (override method) More...
 
virtual void onGetSpectra (kome::objects::DataSet &spectra, const double startRt, const double endRt, const kome::objects::SearchType startSearch, const kome::objects::SearchType endSearch)
 This method is called by searchSpectrum or getDataSet method (overriede method) More...
 
virtual double onGetMass (const unsigned int index)
 This method is called by getMass method (override method) More...
 
virtual int onGetMsStage (const unsigned int index)
 This method is called by getMsStage method (override method) More...
 
virtual double onGetPrecursor (const unsigned int index)
 This method is called by getPrecursor method (override method) More...
 

Protected Attributes

kome::objects::Chromatogramm_org
 
Alignmentm_align
 
- Protected Attributes inherited from kome::objects::Chromatogram
Samplem_sample
 
DataGroupNodem_group
 
std::string m_name
 
double m_mz
 
std::string m_icon
 
std::string m_title
 
kome::core::Properties m_props
 
kome::core::Properties m_userProps
 
bool m_autoCreated
 
bool m_visible
 
Chromatogramm_orgChrom
 
bool m_op
 
int m_chromId
 
double m_q1
 
double m_q3
 

Additional Inherited Members

- Static Public Member Functions inherited from kome::objects::Chromatogram
static bool isCommonProperty (const char *key)
 check whther the specified property key is common property or not More...
 
- Static Protected Attributes inherited from kome::objects::Chromatogram
static std::vector< std::string > m_commonProps
 

Detailed Description

aligned chromatogram class

Definition at line 26 of file AlignedChromatogram.h.

Constructor & Destructor Documentation

kome::operation::AlignedChromatogram::AlignedChromatogram ( kome::objects::Chromatogram org,
Alignment align 
)

constructor

Parameters
[in]orgoriginal chromatogram
[in]alignalignment

Definition at line 28 of file AlignedChromatogram.cpp.

29  : kome::objects::Chromatogram( org.getSample() ), m_org( org ) {
30  // initialize
31  m_align = align;
32  if( m_align == NULL ) {
34  }
35 
37 }
void setOrgChromatogram(Chromatogram *chrom)
sets original chromatogram
Sample * getSample()
gets sample
#define NULL
Definition: CoreMacros.h:18
kome::objects::Chromatogram & m_org
static Alignment & getDefaultAlignment()
gets default alignment
Definition: Alignment.cpp:119
Chromatogram * getOrgChromatogram()
gets original chromatogram
chromatogram information management class
Definition: Chromatogram.h:33

Here is the call graph for this function:

Member Function Documentation

double kome::operation::AlignedChromatogram::onGetMass ( const unsigned int  index)
protectedvirtual

This method is called by getMass method (override method)

Parameters
[in]indexdata index
Returns
mass

Implements kome::objects::Chromatogram.

Definition at line 97 of file AlignedChromatogram.cpp.

97  {
98  return m_org.getMass( index );
99 }
kome::objects::Chromatogram & m_org
double getMass(const unsigned int index)
gets mass

Here is the call graph for this function:

int kome::operation::AlignedChromatogram::onGetMsStage ( const unsigned int  index)
protectedvirtual

This method is called by getMsStage method (override method)

Parameters
[in]indexdata index
Returns
MS stage.

Implements kome::objects::Chromatogram.

Definition at line 102 of file AlignedChromatogram.cpp.

102  {
103  return m_org.getMsStage( index );
104 }
int getMsStage(const unsigned int index)
gets MS stage
kome::objects::Chromatogram & m_org

Here is the call graph for this function:

double kome::operation::AlignedChromatogram::onGetPrecursor ( const unsigned int  index)
protectedvirtual

This method is called by getPrecursor method (override method)

Parameters
[in]indexdata index
Returns
precursor mass

Implements kome::objects::Chromatogram.

Definition at line 107 of file AlignedChromatogram.cpp.

107  {
108  return m_org.getPrecursor( index );
109 }
kome::objects::Chromatogram & m_org
double getPrecursor(const unsigned int index)
gets precursor mass

Here is the call graph for this function:

void kome::operation::AlignedChromatogram::onGetSpectra ( kome::objects::DataSet spectra,
const double  startRt,
const double  endRt,
const kome::objects::SearchType  startSearch,
const kome::objects::SearchType  endSearch 
)
protectedvirtual

This method is called by searchSpectrum or getDataSet method (overriede method)

Parameters
[out]spectraspectra object to store spectra
[in]startRtstart RT
[in]endRtend RT
[in]startSearchstart search type
[in]endSearchend search type

Implements kome::objects::Chromatogram.

Definition at line 64 of file AlignedChromatogram.cpp.

70  {
71  // get xy data
75 
76  m_org.getXYData( &dps0, false );
77  onGetXYData( &dps1 );
78 
79  // add aligned xy data
80  if( dps0.getLength() > 0 ) {
81  dps2.reserve( dps0.getLength() );
82  }
83 
84  for( unsigned int i = 0; i < dps0.getLength(); i++ ) {
85  dps2.addPoint( dps1.getX( 0 ), dps0.getX( i ) );
86  }
87 
88  // get org RT
89  const double orgStartRt = kome::numeric::Interpolation::linear( dps2, startRt );
90  const double orgEndRt = kome::numeric::Interpolation::linear( dps2, endRt );
91 
92  // get spectra
93  m_org.getSpectra( spectra, orgStartRt, orgEndRt, startSearch, endSearch );
94 }
data points data of profile management class
Definition: DataPoints.h:25
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
kome::core::XYData * getXYData()
gets xy data from data manager
kome::objects::Chromatogram & m_org
void getSpectra(DataSet &dataSet, const double startRt, const double endRt, const SearchType startSearch=SEARCH_NEAR, const SearchType endSearch=SEARCH_NEAR)
get spectra in specified RT range
void reserve(const unsigned int num)
reserves enough contiguous memory of array
Definition: XYData.cpp:262
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
virtual void onGetXYData(kome::core::XYData *const xyData)
This method is called by getXYData method (override method)
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::AlignedChromatogram::onGetXYData ( kome::core::XYData *const  xyData)
protectedvirtual

This method is called by getXYData method (override method)

Parameters
[out]xyDataobject to store data points

Implements kome::objects::Chromatogram.

Definition at line 44 of file AlignedChromatogram.cpp.

44  {
45  // check the parameter
46  if( xyData == NULL ) {
47  return;
48  }
49 
50  // get xy data
52  m_org.getXYData( &dps, false );
53 
54  // add points
55  for( unsigned int i = 0; i < dps.getLength(); i++ ) {
56  const double x = m_align->convertRt( dps.getX( i ), m_org.getMz() );
57  const double y = dps.getY( i );
58 
59  xyData->addPoint( x, y );
60  }
61 }
data points data of profile management class
Definition: DataPoints.h:25
double convertRt(const double rt, const double mz)
gets aligned RT
Definition: Alignment.cpp:71
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
kome::core::XYData * getXYData()
gets xy data from data manager
#define NULL
Definition: CoreMacros.h:18
kome::objects::Chromatogram & m_org
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:

Member Data Documentation

Alignment* kome::operation::AlignedChromatogram::m_align
protected

alignment

Definition at line 47 of file AlignedChromatogram.h.

kome::objects::Chromatogram& kome::operation::AlignedChromatogram::m_org
protected

original chromatogram

Definition at line 44 of file AlignedChromatogram.h.


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