Commit e23ee756 authored by Edlira Nano's avatar Edlira Nano
Browse files

clean-up

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2245 e4b6dbb4-9209-464b-83f7-6257456c460c
parent 2d57610b
/**
* \file msrunSelectionXic.cpp
* \date October 28, 2011
* \author Edlira Nano
*/
#include "msrunSelectionXic.h"
MsrunSelectionXic::MsrunSelectionXic(const Msrun * msrun,
const XicExtractionMethodBase * extraction_method,
const mcq_xic_type xic_type,
const QPen * style) :
XicTreatment(style),
_msrun(msrun),
_xic_extraction_method(extraction_method),
_xic_type(xic_type)
{
_quanti_item = new QuantiItemBase(_xic_extraction_method);
}
MsrunSelectionXic::~MsrunSelectionXic() {
if (_quanti_item != 0) {
delete _quanti_item;
_quanti_item = 0;
}
}
XicProfile *
MsrunSelectionXic::applyTreatment(XicProfile * xic_profile) {
// extract XIC
_msrun->prepareSpectraForQuantification(_xic_extraction_method);
xicBase * current_xic = _msrun->extractXic(_xic_type, _quanti_item);
if (current_xic == 0) {
qDebug() << "MsrunSelectionXic null xic ";
}
XicProfile * result_xic_profile = new XicProfile();
result_xic_profile->setRtVector(*(current_xic->getRetentionTimes()));
result_xic_profile->setIntensityVector(*(current_xic->getIntensities()));
delete (current_xic);
_msrun.doneWithSpectra();
return result_xic_profile;
}
/*
*
* MassChroQ: Mass Chromatogram Quantification software.
* Copyright (C) 2010 Olivier Langella, Edlira Nano, Benoit Valot, Michel Zivy.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file msrunSelectionXic.h
* \date October 28, 2011
* \author Edlira Nano
*/
#ifndef MSRUN_SELECTION_XIC_H_
#define MSRUN_SELECTION_XIC_H_ 1
#include
/**
* \class MsrunSelectionXic
* \brief Xic treatment corresponding to a XIC selection
*
*
*/
class MsrunSelectionXic : public XicTreatment {
public :
MsrunSelectionXic(const Msrun * msrun,
const XicExtractionMethodBase & extraction_method,
const mcq_xic_type xic_type,
const QPen * style);
virtual ~MsrunSelectionXic();
virtual XicProfile * applyTreatment(XicProfile * xic_profile);
private :
const MsRun * _msrun;
// type of the Xic : MAX_XIC_TYPE ou SUM_XIC_TYPE
const mcq_xic_type _xic_type;
const XicExtractionMethodBase * _xic_extraction_method;
QuantiItemBase * _quanti_item;
};
#endif /* MSRUN_SELECTION_XIC_H_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment