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

ManipulatedSpectrum class. More...

#include <ManipulatedSpectrum.h>

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

Public Member Functions

 ManipulatedSpectrum (ManipulatedSample *sample, kome::objects::Spectrum &org, const bool op=false)
 constructor More...
 
virtual ~ManipulatedSpectrum ()
 destructor
 
void setSample (ManipulatedSample *sample)
 set sample object More...
 
ManipulatedSamplegetSample ()
 get sample object More...
 
- Public Member Functions inherited from kome::objects::Spectrum
 Spectrum (Sample *sample, const char *name)
 constructor More...
 
virtual ~Spectrum ()
 destructor
 
void setId (int id)
 sets spectrum id More...
 
int getId ()
 gets spectrum id More...
 
void setOperationFlag (const bool op)
 sets the operation flag value More...
 
bool getOperationFlag ()
 gets the operation flag value More...
 
SamplegetSample ()
 gets the sample that has this spectrum More...
 
void setName (const char *name)
 sets spectrum name More...
 
const char * getName ()
 gets spectrum name More...
 
void setRt (const double rt)
 sets retention time More...
 
void setRt (const double startRt, const double endRt)
 gets retention time More...
 
void setStartRt (const double rt)
 sets start retention time More...
 
void setEndRt (const double rt)
 sets end retention time More...
 
double getRt ()
 gets retention time More...
 
double getStartRt ()
 gets the start of retention time More...
 
double getEndRt ()
 gets the end of retention time More...
 
void setSpecType (const char *type)
 sets spectrum type More...
 
const char * getSpecType ()
 gets spectrum type More...
 
void setTitle (const char *title)
 sets spectrum title More...
 
const char * getTitle ()
 gets spectrum title More...
 
void setIcon (const char *icon)
 sets icon name More...
 
const char * getIcon ()
 gets icon name 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 data points More...
 
void getXYData (kome::core::XYData *const xyData, const double minX, const double maxX, const bool zero)
 gets data points that spectrum has More...
 
void setXRange (const double minX, const double maxX)
 sets x range More...
 
void setMinX (const double minX)
 sets min x More...
 
double getMinX ()
 gets min x More...
 
void setMaxX (const double maxX)
 sets max x More...
 
double getMaxX ()
 gets max x More...
 
void setTotalIntensity (const double intensity)
 sets total intensity of spectrum More...
 
double getTotalIntensity (const double minX=-1.0, const double maxX=-1.0)
 gets total intensity in specified range More...
 
void setMaxIntensity (const double intensity)
 sets max intensity of spectrum More...
 
double getMaxIntensity (const double minX=-1.0, const double maxX=-1.0)
 gets max intensity in specified range More...
 
void setBasePeakMass (const double mass)
 sets base peak mass More...
 
double getBasePeakMass ()
 gets base peak mass More...
 
void setMsStage (const int stage)
 sets ms stage More...
 
int getMsStage ()
 gets ms stage More...
 
void setPrecursor (const int stage, const double precursor)
 sets precursor More...
 
void setPrecursor (const double precursor)
 sets precursor More...
 
double getPrecursor (const int stage)
 gets precursor More...
 
double getPrecursor ()
 gets the precursor mass of precursor ion spectrum. More...
 
void setPrecursorIntensity (const int stage, const double intensity)
 sets precursor intensity More...
 
void setPrecursorIntensity (const double intensity)
 sets precursor intensity More...
 
double getPrecursorIntensity (const int stage)
 gets the precursor intensity More...
 
double getPrecursorIntensity ()
 gets the precursor intensity of the precursor ion spectrum. More...
 
void setPrecursorCharge (const int charge)
 sets the precursor charge More...
 
int getPrecursorCharge ()
 gets the precursor charge More...
 
void setParentSpectrum (Spectrum *const parent)
 sets parent spectrum More...
 
SpectrumgetParentSpectrum ()
 gets parent spectrum More...
 
void getChildSpectra (std::vector< Spectrum * > &children)
 gets child spectra More...
 
void setHasChromatogram (const bool chromatogram)
 sets wheher this spectrum has chromatogram More...
 
bool hasChromatogram ()
 judges whether this spectrum has chromatogram More...
 
void setGroup (DataGroupNode *group)
 sets spectrum group More...
 
DataGroupNodegetGroup ()
 gets spectrum group More...
 
void setScanNumber (const int scan)
 sets scan number More...
 
int getScanNumber ()
 gets scan number More...
 
void setPolarity (Polarity polarity)
 sets polarity More...
 
Polarity getPolarity ()
 gets polarity More...
 
void setCentroidMode (const bool centroidMode)
 sets centroid mode or not More...
 
bool isCentroidMode ()
 judget wheter this spectrum is centroid mode More...
 
void setResolution (const double resolution)
 sets resolution More...
 
double getResolution ()
 gets resolution More...
 
void setCollisionEnergy (const char *collisionEnergy)
 sets the collision energy More...
 
const char * getCollisionEnergy ()
 gets the collision energy More...
 
void setVisible (const bool visible)
 sets the visible flag More...
 
bool isVisible ()
 gets the visible flag value More...
 
void setAutoZeroPoints (const bool autoZero)
 sets auto zero points flag value More...
 
bool isAutoZeroPoints ()
 gets auto zero points flag value More...
 
kome::core::PropertiesgetProperties ()
 gets properties More...
 
kome::core::PropertiesgetUserProperties ()
 gets user properties More...
 
void setOrgSpectrum (Spectrum *spec)
 sets original spectrum More...
 
SpectrumgetOrgSpectrum ()
 gets original spectrum More...
 
void getProperties (kome::core::Properties &properties)
 gets spectrum and spectrum group properties More...
 
void getUserProperties (kome::core::Properties &userProperties)
 gets spectrum and spectrum group user properties More...
 
void setSpotId (const char *pcSpotId)
 set spot id param[in] pcSpotId SpotId information
 
const char * getSpotId (void)
 get spot id More...
 
void setRequestLoadData (void)
 set the flag of request load data More...
 
void resetRequestLoadData (void)
 
bool isRequestLoadData (void)
 check the flag of request load data More...
 
void setFirstAccess (void)
 set the flag of first access
 
void resetFirstAccess (void)
 reset the flag of first access
 
bool isFirstAccess (void)
 check the flag of first access More...
 
bool loadData (void)
 load data More...
 

Protected Member Functions

virtual void onGetXYData (kome::core::XYData *const xyData, const double minX, const double maxX)
 This method is called by getXYData method. (override method) More...
 
virtual void onGetXRange (double *minX, double *maxX)
 This method is called by getMinX or getMaxX method. (override method) More...
 
virtual double onGetTotalIntensity (const double minX, const double maxX)
 This method is called by getTotalIntensity method. (override method) More...
 
virtual double onGetMaxIntensity (const double minX, const double maxX)
 This method is called by getMaxIntensity method. (override method) More...
 
virtual void onSetRequestLoadData (void)
 This method is called by setRequestLoadData method. (abstract method)
 
virtual void onResetRequestLoadData (void)
 This method is called by resetRequestLoadData method. (abstract method)
 
virtual bool onIsRequestLoadData (void)
 This method is called by isRequestLoadData method. (abstract method) More...
 
virtual void onSetFirstAccess (void)
 This method is called by setFirstAccess method. (abstract method)
 
virtual void onResetFirstAccess (void)
 This method is called by resetFirstAccess method. (abstract method)
 
virtual bool onIsFirstAccess (void)
 This method is called by isFirstAccess method. (abstract method) More...
 
virtual bool onLoadData (void)
 This method is called by loadData method. (abstract method) More...
 
- Protected Member Functions inherited from kome::objects::Spectrum
bool firstAccessProcess (void)
 method for processing when accessing the first item of this class More...
 

Protected Attributes

kome::objects::Spectrumm_org
 
ManipulatedSamplem_sample
 
- Protected Attributes inherited from kome::objects::Spectrum
Spectrumm_orgSpec
 
bool m_op
 
int m_specId
 

Additional Inherited Members

- Public Types inherited from kome::objects::Spectrum
enum  Polarity { POLARITY_UNKNOWN = 0, POLARITY_POSITIVE = 1, POLARITY_NEGATIVE = 2 }
 polarity definition
 
- Static Public Member Functions inherited from kome::objects::Spectrum
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::Spectrum
static std::vector< std::string > m_commonProps
 

Detailed Description

ManipulatedSpectrum class.

Definition at line 22 of file ManipulatedSpectrum.h.

Constructor & Destructor Documentation

kome::operation::ManipulatedSpectrum::ManipulatedSpectrum ( ManipulatedSample sample,
kome::objects::Spectrum org,
const bool  op = false 
)

constructor

Parameters
sample
org
op

Definition at line 26 of file ManipulatedSpectrum.cpp.

27  : kome::objects::Spectrum( org.getSample(), org.getName() ), m_org( org ){
28  m_op = op;
29 
30  setName( org.getName() );
31  setRt( org.getRt() );
32  setStartRt( org.getStartRt() );
33  setEndRt( org.getEndRt() );
34  setSpecType( org.getSpecType() );
35  setTitle( org.getTitle() );
36  setIcon( org.getIcon() );
37  setMinX( org.getMinX() );
38  setMaxX( org.getMaxX() );
41  setMsStage( org.getMsStage() );
42  setPrecursor( org.getPrecursor() );
46  setGroup( org.getGroup() );
48  setPolarity( org.getPolarity() );
52 
53  m_sample = sample;
54 }
double getStartRt()
gets the start of retention time
Definition: Spectrum.cpp:191
void setTotalIntensity(const double intensity)
sets total intensity of spectrum
Definition: Spectrum.cpp:505
Sample * getSample()
gets the sample that has this spectrum
Definition: Spectrum.cpp:108
double getPrecursor(const int stage)
gets precursor
Definition: Spectrum.cpp:683
double getRt()
gets retention time
Definition: Spectrum.cpp:184
void setMinX(const double minX)
sets min x
Definition: Spectrum.cpp:449
const char * getName()
gets spectrum name
Definition: Spectrum.cpp:123
void setRt(const double rt)
sets retention time
Definition: Spectrum.cpp:129
void setPrecursor(const int stage, const double precursor)
sets precursor
Definition: Spectrum.cpp:640
void setPolarity(Polarity polarity)
sets polarity
Definition: Spectrum.cpp:920
void setPrecursorIntensity(const int stage, const double intensity)
sets precursor intensity
Definition: Spectrum.cpp:702
void setMaxX(const double maxX)
sets max x
Definition: Spectrum.cpp:477
const char * getIcon()
gets icon name
Definition: Spectrum.cpp:273
void setIcon(const char *icon)
sets icon name
Definition: Spectrum.cpp:268
void setEndRt(const double rt)
sets end retention time
Definition: Spectrum.cpp:172
void setName(const char *name)
sets spectrum name
Definition: Spectrum.cpp:113
void setParentSpectrum(Spectrum *const parent)
sets parent spectrum
Definition: Spectrum.cpp:821
void setCentroidMode(const bool centroidMode)
sets centroid mode or not
Definition: Spectrum.cpp:935
Spectrum * getOrgSpectrum()
gets original spectrum
Definition: Spectrum.cpp:1003
double getResolution()
gets resolution
Definition: Spectrum.cpp:952
double getMinX()
gets min x
Definition: Spectrum.cpp:461
int getMsStage()
gets ms stage
Definition: Spectrum.cpp:634
double getMaxX()
gets max x
Definition: Spectrum.cpp:489
void setHasChromatogram(const bool chromatogram)
sets wheher this spectrum has chromatogram
Definition: Spectrum.cpp:883
int getScanNumber()
gets scan number
Definition: Spectrum.cpp:915
double getTotalIntensity(const double minX=-1.0, const double maxX=-1.0)
gets total intensity in specified range
Definition: Spectrum.cpp:516
void setMsStage(const int stage)
sets ms stage
Definition: Spectrum.cpp:587
DataGroupNode * getGroup()
gets spectrum group
Definition: Spectrum.cpp:898
void setStartRt(const double rt)
sets start retention time
Definition: Spectrum.cpp:160
void setScanNumber(const int scan)
sets scan number
Definition: Spectrum.cpp:903
void setBasePeakMass(const double mass)
sets base peak mass
Definition: Spectrum.cpp:569
const char * getTitle()
gets spectrum title
Definition: Spectrum.cpp:222
void setOrgSpectrum(Spectrum *spec)
sets original spectrum
Definition: Spectrum.cpp:998
Spectrum * getParentSpectrum()
gets parent spectrum
Definition: Spectrum.cpp:850
spectrum information management class
Definition: Spectrum.h:30
double getEndRt()
gets the end of retention time
Definition: Spectrum.cpp:197
void setSpecType(const char *type)
sets spectrum type
Definition: Spectrum.cpp:203
const char * getSpecType()
gets spectrum type
Definition: Spectrum.cpp:209
double getPrecursorIntensity(const int stage)
gets the precursor intensity
Definition: Spectrum.cpp:749
void setGroup(DataGroupNode *group)
sets spectrum group
Definition: Spectrum.cpp:893
void setTitle(const char *title)
sets spectrum title
Definition: Spectrum.cpp:215
bool isCentroidMode()
judget wheter this spectrum is centroid mode
Definition: Spectrum.cpp:941
void setResolution(const double resolution)
sets resolution
Definition: Spectrum.cpp:946
Polarity getPolarity()
gets polarity
Definition: Spectrum.cpp:930
double getBasePeakMass()
gets base peak mass
Definition: Spectrum.cpp:581
bool hasChromatogram()
judges whether this spectrum has chromatogram
Definition: Spectrum.cpp:888

Here is the call graph for this function:

Member Function Documentation

ManipulatedSample * kome::operation::ManipulatedSpectrum::getSample ( )
inline

get sample object

Returns
sample

Definition at line 60 of file ManipulatedSpectrum.h.

60 { return m_sample; }
double kome::operation::ManipulatedSpectrum::onGetMaxIntensity ( const double  minX,
const double  maxX 
)
protectedvirtual

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

Parameters
[in]minXminimum x of range (If minX is negative number, minimum x value is unbounded.)
[in]maxXmaximum x of range (If maxX is negative number, maximum x value is unbounded.)
Returns
max intensity

Implements kome::objects::Spectrum.

Definition at line 128 of file ManipulatedSpectrum.cpp.

128  {
129  // get data points
131  onGetXYData( &pt, minX, maxX );
132 
133  // get main intensity
134  double intensity = 0.0;
135  for( unsigned int i = 0; i < pt.getLength(); i++ ) {
136  double y = pt.getY( i );
137  intensity = MAX( y, intensity );
138  }
139 
140  return intensity;
141 }
data points data of profile management class
Definition: DataPoints.h:25
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
#define MAX(x, y)
Definition: CoreMacros.h:27
virtual void onGetXYData(kome::core::XYData *const xyData, const double minX, const double maxX)
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:

double kome::operation::ManipulatedSpectrum::onGetTotalIntensity ( const double  minX,
const double  maxX 
)
protectedvirtual

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

Parameters
[in]minXminimum x of range (If minX is negative number, minimum x value is unbounded.)
[in]maxXmaximum x of range (If maxX is negative number, maximum x value is unbounded.)
Returns
total intensity

Implements kome::objects::Spectrum.

Definition at line 113 of file ManipulatedSpectrum.cpp.

113  {
114  // get data points
116  onGetXYData( &pt, minX, maxX );
117 
118  // get total intensity
119  double intensity = 0.0;
120  for( unsigned int i = 0; i < pt.getLength(); i++ ) {
121  intensity += pt.getY( i );
122  }
123 
124  return intensity;
125 }
data points data of profile management class
Definition: DataPoints.h:25
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
virtual void onGetXYData(kome::core::XYData *const xyData, const double minX, const double maxX)
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::ManipulatedSpectrum::onGetXRange ( double *  minX,
double *  maxX 
)
protectedvirtual

This method is called by getMinX or getMaxX method. (override method)

Parameters
[out]minXthe pointer to store minimum x value
[out]maxXthe pointer to store maximum x value

Implements kome::objects::Spectrum.

Definition at line 109 of file ManipulatedSpectrum.cpp.

109  {
110 }
void kome::operation::ManipulatedSpectrum::onGetXYData ( kome::core::XYData *const  xyData,
const double  minX,
const double  maxX 
)
protectedvirtual

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

Parameters
[out]xyDatathe object to store data points
[in]minXminimum x value. (If minX is negative number, minimum x value is not unbounded.)
[in]maxXmaximum x value. (If maxX is negative number, maximum x value is not unbounded.)

Implements kome::objects::Spectrum.

Definition at line 61 of file ManipulatedSpectrum.cpp.

65  {
66  // manipulate
67  ManipulatedSample* sample = getSample();
68 
69  // operaiton list
70  std::vector< kome::objects::XYDataOperation* > operations;
71  if( sample != NULL ) {
72  for( unsigned int i = 0; i < sample->getNumberOfOperation(); i++ ) {
73  operations.push_back( sample->getOperation( i ) );
74  }
75  }
76 
77  // points
78  if( operations.size() == 0 ) {
79  m_org.getXYData( xyData, minX, maxX, false );
80  }
81  else {
83  m_org.getXYData( &dps, -1.0, -1.0, false );
84 
85  for( unsigned int i = 0; i < operations.size(); i++ ) {
86  kome::objects::XYDataOperation* opt = operations[ i ];
87 
89  opt->update( dps, tmp, *this );
90 
91  dps.clearPoints();
92  for( unsigned int i = 0; i < tmp.getLength(); i++ ) {
93  dps.addPoint( tmp.getX( i ), tmp.getY( i ) );
94  }
95  }
96 
97  // copy
98  for( unsigned int i = 0; i < dps.getLength(); i++ ) {
99  const double x = dps.getX( i );
100  const double y = dps.getY( i );
101  if( ( minX < 0.0 || x >= minX ) && ( maxX < 0.0 || x <= maxX ) ) {
102  xyData->addPoint( x, y );
103  }
104  }
105  }
106 }
unsigned int getNumberOfOperation()
get number of operation
data points data of profile management class
Definition: DataPoints.h:25
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 update(kome::core::XYData &src, kome::core::XYData &dst, Chromatogram &chrom)
updates xy data
#define NULL
Definition: CoreMacros.h:18
kome::core::XYData * getXYData()
gets xy data from data manager
Definition: Spectrum.cpp:279
ManipulatedSample * getSample()
get sample object
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
xy data operation class
kome::objects::XYDataOperation * getOperation(int index)
get operation
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:

bool kome::operation::ManipulatedSpectrum::onIsFirstAccess ( void  )
protectedvirtual

This method is called by isFirstAccess method. (abstract method)

Returns
If true, the first accessing.

Reimplemented from kome::objects::Spectrum.

Definition at line 176 of file ManipulatedSpectrum.cpp.

177 {
179 }
virtual bool onIsFirstAccess(void)
This method is called by isFirstAccess method. (abstract method)
Definition: Spectrum.cpp:1240

Here is the call graph for this function:

bool kome::operation::ManipulatedSpectrum::onIsRequestLoadData ( void  )
protectedvirtual

This method is called by isRequestLoadData method. (abstract method)

Returns
If true, file read request is valid.

Reimplemented from kome::objects::Spectrum.

Definition at line 158 of file ManipulatedSpectrum.cpp.

159 {
161 }
virtual bool onIsRequestLoadData(void)
This method is called by isRequestLoadData method. (abstract method)
Definition: Spectrum.cpp:1222

Here is the call graph for this function:

bool kome::operation::ManipulatedSpectrum::onLoadData ( void  )
protectedvirtual

This method is called by loadData method. (abstract method)

Returns
If true, file reading success.

Reimplemented from kome::objects::Spectrum.

Definition at line 182 of file ManipulatedSpectrum.cpp.

183 {
185 }
virtual bool onLoadData(void)
This method is called by loadData method. (abstract method)
Definition: Spectrum.cpp:1246

Here is the call graph for this function:

void kome::operation::ManipulatedSpectrum::setSample ( ManipulatedSample sample)
inline

set sample object

Parameters
sample

Definition at line 53 of file ManipulatedSpectrum.h.

53 { m_sample = sample; }

Member Data Documentation

kome::objects::Spectrum& kome::operation::ManipulatedSpectrum::m_org
protected

original spectrum

Definition at line 41 of file ManipulatedSpectrum.h.

ManipulatedSample* kome::operation::ManipulatedSpectrum::m_sample
protected

sample object

Definition at line 45 of file ManipulatedSpectrum.h.


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