16 using namespace kome::operation;
21 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
22 #define malloc( s ) _malloc_dbg( s, _NORMAL_BLOCK, __FILE__, __LINE__ )
58 if( settings !=
NULL ) {
63 kome::plugin::PluginFunctionItem item;
64 item.setInfo(
m_fun );
67 std::string name = FMT(
"Baseline Subtract[%s", item.getLongName() );
71 if( !paramStr.empty() ) {
72 paramStr.append(
", " );
78 paramStr.append( FMT(
"%s=%s", name.c_str(), value.c_str() ) );
81 if( paramStr.empty() ) {
85 name.append( FMT(
"(%s)]", paramStr.c_str() ) );
100 double* xArray = ( len == 0 ?
NULL :
new double[ len ] );
101 for(
unsigned int i = 0; i < src.
getLength(); i++ ) {
102 xArray[ i ] = src.
getX( i );
106 kome::numeric::Interpolation::linear( baseline, baseline2, xArray, src.
getLength() );
109 if( xArray !=
NULL ) {
116 for(
unsigned int i = 0; i < len; i++ ) {
117 double x = src.
getX( i );
118 double y = src.
getY( i ) - baseline2.
getY( i );
132 LOG_WARN( FMT(
"The baseline function is not assigned." ) );
147 kome::plugin::PluginCallTool::setXYData( params, src );
148 kome::plugin::PluginCallTool::setBaseline( params, baseline );
149 kome::plugin::PluginCallTool::setSettingValues( params,
m_settings );
151 m_fun->invoke( ¶ms );
abstraction class of two dimention coordinate data
data points data of profile management class
double getX(const unsigned int index)
gets x coordinate
sample information management class
setting parameter values management class
virtual ~BaselineSubtract()
destructor
virtual void getUpdatedData(kome::core::XYData &src, kome::core::XYData &dst)
gets updated data points
double getY(const unsigned int index)
gets y coordinate
void setName(const char *name)
sets name
interfaces of BaselineSubtract class
kome::objects::SettingParameterValues m_settings
virtual void onUpdate(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)
This method is called by update method. (override method)
const char * getParameterValue(const unsigned int index)
gets parameter value
const char * getParameterName(const unsigned int index)
gets parameter name
void reserve(const unsigned int num)
reserves enough contiguous memory of array
unsigned int getNumberOfParameters()
gets the number of parameters
parameters of plug-in function management class
void subtractBaseline(kome::core::XYData &src, kome::core::XYData &dst, kome::core::XYData &baseline)
subtracts baseline
BaselineSubtract()
constructor
void clear()
clears parameters
spectrum information management class
kome::plugin::PluginCall * m_fun
void setBaselineInfo(kome::plugin::PluginCall *func, kome::objects::SettingParameterValues *settings)
sets baseline information
void addPoint(const double x, const double y)
adds point
chromatogram information management class
unsigned int getLength()
gets the number of points @return the number of points