24 using namespace kome::objects;
29 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
30 #define malloc( s ) _malloc_dbg( s, _NORMAL_BLOCK, __FILE__, __LINE__ )
118 for(
int i = 0; i < (int)
m_chroms.size(); i++ ) {
138 for(
unsigned int i = 0; i <
m_chroms.size(); i++ ) {
145 double tmpMinX = dps.
getMinX();
146 double tmpMaxX = dps.
getMaxX();
148 if( i == 0 || tmpMinX < minX ) {
152 if( i == 0 || tmpMaxX > maxX ) {
168 double tmpMinX = dps.
getMinX();
169 double tmpMaxX = dps.
getMaxX();
170 double tmpMinY = dps.
getMinY();
171 double tmpMaxY = dps.
getMaxY();
179 for(
unsigned int i = 0; i <
m_chroms.size(); i++ ) {
185 if( i == 0 || tmpMinX < minX ) {
188 if( i == 0 || tmpMaxX > maxX ) {
195 const double spacing = 0.2;
196 const int startIdx = std::max( 0,
roundnum( minX / spacing ) );
197 const int endIdx = std::max( 0,
roundnum( maxX / spacing ) );
200 const int len = endIdx - startIdx + 1;
206 bool* flags =
new bool[ len ];
207 double* ints =
new double[ len ];
209 for(
int i = 0; i < len; i++ ) {
215 for(
unsigned int i = 0; i <
m_chroms.size(); i++ ) {
221 for(
unsigned int j = 0; j < dps.
getLength(); j++ ){
223 const double x = dps.
getX( j );
224 const double y = dps.
getY( j );
227 idx =
CLAMP( idx, startIdx, endIdx ) - startIdx;
230 if( fabs( y ) > fabs( ints[ idx ] ) ) {
237 for(
int i = 0; i < len; i++ ) {
239 double x = spacing * ( i + startIdx );
240 double y = ints[ i ];
253 const double startRt,
262 chrom->
getSpectra( dataSet, startRt, endRt, startSearch, endSearch );
abstraction class of two dimention coordinate data
void addChromatogram(Chromatogram *chrom)
adds chromatogram
data points data of profile management class
virtual int onGetMsStage(const unsigned int index)
This method is called by getMsStage method (override method)
double getMaxX()
gets maximum x
double getX(const unsigned int index)
gets x coordinate
void setGroup(DataGroupNode *group)
sets spectrum group
interfaces of Overlapping Chromatogram class
DataGroupNode * getGroup()
gets spectrum group
std::vector< double > m_dMinY
virtual double onGetMass(const unsigned int index)
This method is called by getMass method (override method)
double getMinY()
gets minimum y
virtual ~OverlappingChromatogram()
destructor
double getY(const unsigned int index)
gets y coordinate
interfaces of Spectrum class
int roundnum(const double v)
gets the closest integer to the argument
std::vector< double > m_dMinX
interfaces of DataGroupNode class
interfaces of DataSet class
virtual void onGetXYData(kome::core::XYData *const xyData)
gets chromatogram data points (override method)
kome::core::XYData * getXYData()
gets xy data from data manager
std::vector< double > m_dMaxY
int searchChromatogram(Chromatogram *chrom)
searches chromatogram
double getMinX()
gets minimum x
std::vector< double > m_dMaxX
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
virtual void onGetSpectra(DataSet &dataSet, const double startRt, const double endRt, const SearchType startSearch, const SearchType endSearch)
This method is called by searchSpectrum or getSpectra method (override method)
#define CLAMP(x, low, high)
bool getOperationFlag()
gets the operation flag value
std::vector< Chromatogram * > m_chroms
virtual double onGetPrecursor(const unsigned int index)
This method is called by getPrecursor method (override method)
one or more spectra management class
void addPoint(const double x, const double y)
adds point
OverlappingChromatogram()
constructor
chromatogram information management class
double getMaxY()
gets maximum y
void removeChromatogram(Chromatogram *chrom)
removes chromatogram
void clearChromatograms()
clears chromatograms
unsigned int getLength()
gets the number of points @return the number of points