4 #include <QScriptEngine>
10 m_Title(saver, this,
"title",
"",
"Integrated Data Title"),
22 set_Type(
"Integrated Data");
34 return tr(
"%1 Rows").arg(
m_Size);
54 set_ByteSize(2*newSize*
sizeof(
double));
119 double sumn = 0, sumv = 0;
121 for (
int i=0; i<
m_Size; i++) {
122 double x =
m_X.value(i);
123 double y =
m_Y.value(i);
125 if (x == x && y == y) {
126 if (x >= minx && x <= maxx) {
134 double norm = sumn/sumv;
136 for (
int i=0; i<
m_Size; i++) {
137 double x =
m_X.value(i);
138 double y =
m_Y.value(i);
140 if (x == x && y == y) {
179 return engine->newQObject(data.data());
184 QObject *qobj = obj.toQObject();
QcepDoubleImageDataPtr m_Image
static void deallocate(int sz, int width, int height)
virtual QString description() const
void append(double x, double y)
void setValue(int n, double x, double y)
static void fromIntegratedDataScriptValue(const QScriptValue &obj, QcepIntegratedDataPtr &data)
QSharedPointer< QcepIntegratedData > QcepIntegratedDataPtr
QString get_XUnitsLabel() const
QcepDoubleImageDataPtr get_Image() const
void set_Image(QcepDoubleImageDataPtr image)
void set_XUnitsLabel(QString units)
void set_Center(double cx, double cy)
void selfNormalize(double minx, double maxx)
static QcepIntegratedDataPtr newIntegratedData(QcepSettingsSaverWPtr saver, QString name, int sz, QcepObject *parent)
static void allocate(int sz, int width, int height)
QSharedPointer< QcepDataObject > QcepDataObjectPtr
QcepIntegratedData(QcepSettingsSaverWPtr saver, QString name, QcepDoubleImageDataPtr data, int maxSize, QcepObject *parent)
static QScriptValue toIntegratedDataScriptValue(QScriptEngine *engine, const QcepIntegratedDataPtr &data)
void set_Oversample(int ovs)
int get_Oversample() const
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QcepSettingsSaverWPtr saver()
QSharedPointer< QcepDoubleImageData > QcepDoubleImageDataPtr