26 using namespace kome::objects;
31 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
32 #define malloc( s ) _malloc_dbg( s, _NORMAL_BLOCK, __FILE__, __LINE__ )
195 spectra.push_back( spec );
205 double diff = 99999999999.9;
206 for(
int i = 0; i < (int)spectra.size(); i++ ) {
211 if( search == SEARCH_PREV ) {
212 if( spec->
getRt() <= rt ) {
216 else if( search == SEARCH_NEXT ) {
217 if( spec->
getRt() >= rt && idx < 0 ) {
222 double d = fabs( spec->
getRt() - rt );
255 title =
"Processed MC";
269 title.append( FMT(
"[%.2f- ]",
m_minMz ) );
272 title.append( FMT(
"[ -%.2f]",
m_maxMz ) );
292 std::vector< Spectrum* > spectra;
293 std::set< Spectrum* > specSet;
295 for(
unsigned int i = 0; i < spectra.size(); i++ ) {
296 specSet.insert( spectra[ i ] );
305 double rt = spec->
getRt();
309 && specSet.find( spec ) != specSet.end() ) {
311 double intensity = 0.0;
325 for(
unsigned int i=0; i < dps.
getLength(); i++ ){
328 intensity += dps.
getY(i);
330 intensity = std::max( intensity, dps.
getY(i) );
347 const double startRt,
353 std::vector< Spectrum* > specArray;
358 int endIdx = std::min( (
int)specArray.size() - 1,
searchSpectrumIndex( specArray, endRt, endSearch ) );
361 for(
int i = startIdx; i <= endIdx; i++ ) {
abstraction class of two dimention coordinate data
bool isTIC()
judges whether chromatogram mode is TIC (Total Ion SpectraChromatogram)
SpectraChromatogram(DataSet &dataSet, bool bProces=false)
constructor
data points data of profile management class
interfaces of PointsManager class
double getPrecursor(const int stage)
gets precursor
double getRt()
gets retention time
interfaces of PeaksManager class
double getX(const unsigned int index)
gets x coordinate
const char * getName()
gets group name
bool isBPC()
judges whether chromatogram mode is BPC (Base Peak SpectraChromatogram)
virtual ~SpectraChromatogram()
destructor
void setTIC()
sets Total Ion SpectraChromatogram mode
double getMaxMz()
gets maximum value of m/z range
unsigned int getNumberOfSpectra()
gets the number of spectra
double getY(const unsigned int index)
gets y coordinate
interfaces of Spectrum class
static const unsigned char m_msFilters[]
void setMaxRt(const double rt)
sets maximum value of RT range
interfaces of XYDataOperation class
DataSet & getMemberSpectra()
gets spectra
Spectrum * getSpectrum(const unsigned int index)
gets the number of spectra
interfaces of DataGroupNode class
virtual void onGetSpectra(DataSet &spectra, const double startRt, const double endRt, const SearchType startSearch, const SearchType endSearch)
This method is called by searchSpectrum or getDataSet method (overriede method)
int getMsStage()
gets ms stage
double getMinMz()
gets minimum value of m/z range
virtual double onGetPrecursor(const unsigned int index)
This method is called by getPrecursor method (override method)
void setMinMz(const double mz)
sets minimum value of m/z range
interfaces of DataSet class
DataGroupNode * getParentGroup()
get parent spectrum group
interfaces of SpectraChromatogram class
double getTotalIntensity(const double minX=-1.0, const double maxX=-1.0)
gets total intensity in specified range
void setMaxMz(const double mz)
sets maximum value of m/z range
void setMzRange(const double minMz, const double maxMz)
sets m/z range
kome::core::XYData * getXYData()
gets xy data from data manager
void setRtRange(const double minRt, const double maxRt)
sets RT range
void setTitle()
sets title
virtual double onGetMass(const unsigned int index)
This method is called by getMass method (override method)
#define CLAMP(x, low, high)
virtual void onGetXYData(kome::core::XYData *const xyData)
This method is called by getXYData method (override method)
DataGroupNode * getGroup()
gets spectrum group
void setFilter(const unsigned char filter)
sets filter
void deleteXYData()
deletes xy data of data manager
spectrum information management class
unsigned char getFilter()
gets filter
one or more spectra management class
void addPoint(const double x, const double y)
adds point
double getMaxRt()
gets maximum value of RT range
double getMinRt()
gets minimum value of RT range
chromatogram information management class
void setMinRt(const double rt)
sets minimum value of RT range
void setBPC()
sets Base Peak SpectraChromatogram mode
virtual int onGetMsStage(const unsigned int index)
This method is called by getMsStage method (override method)
int searchSpectrumIndex(std::vector< Spectrum * > &spectra, const double rt, SearchType search)
searches spectrum
double getMaxIntensity(const double minX=-1.0, const double maxX=-1.0)
gets max intensity in specified range
double getBasePeakMass()
gets base peak mass
virtual void addSpectrum(Spectrum *spec)
adds spectrum to group
unsigned int getLength()
gets the number of points @return the number of points
bool hasChromatogram()
judges whether this spectrum has chromatogram