aboutsummaryrefslogtreecommitdiff
path: root/manipulationhandler.h
blob: 8bb8a983178a7de5ffabc6046ea316ccbb5ea636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef MANIPULATIONHANDLER_H
#define MANIPULATIONHANDLER_H

#include <QObject>
#include <armadillo>

#include "projectionhistory.h"

class ManipulationHandler
    : public QObject
{
    Q_OBJECT
public:
    Q_ENUMS(Technique)
    enum Technique {
        TECHNIQUE_PLMP,
        TECHNIQUE_LAMP,
        TECHNIQUE_LSP,
        TECHNIQUE_PEKALSKA
    };

    ManipulationHandler(const arma::mat &X,
                        const arma::uvec &cpIndices,
                        ProjectionHistory *history);

    void setTechnique(Technique technique) { m_technique = technique; }

signals:
    void cpChanged(const arma::mat &cpY) const;
    void rpChanged(const arma::mat &rpY) const;
    void mapChanged(const arma::mat &Y) const;
    void cpRewound(const arma::mat &cpY) const;
    void rpRewound(const arma::mat &rpY) const;
    void mapRewound(const arma::mat &Y) const;

public slots:
    void setCP(const arma::mat &Ys);
    void setRewind(double t);

private:
    arma::mat m_X;
    arma::uvec m_cpIndices, m_rpIndices;
    ProjectionHistory *m_history;
    Technique m_technique;
};

#endif // MANIPULATIONHANDLER_H