Commit 01acfa49 authored by Laurent Chapon's avatar Laurent Chapon
Browse files

Include QCustomPlot files in D19 proto. Add interaction with GraphicsItem

parent 0102bbd7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,11 +11,11 @@ COLOUR GetColour(double v,double vmin,double vmax)
      v = vmax;
   dv = vmax - vmin;

   if (v < (vmin + 0.4 * dv)) {
   if (v <= (vmin + 0.4 * dv)) {
      c.r = 2.5*(v-vmin) / dv;
      c.g = 0;
      c.b = 0;
   } else if (v < (vmin + 0.8 * dv)) {
   } else if (v <= (vmin + 0.8 * dv)) {
      c.r = 1;
      c.g = 1 + 2.5 * (-vmin - 0.4 * dv + v) / dv;
      c.b=  0.;
+9 −4
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
#-------------------------------------------------

QT       += core gui
CONFIG   += debug_and_release
QMAKE_CXXFLAGS += -std=c++0x -fopenmp

TARGET = D19Proto
@@ -16,17 +17,22 @@ SOURCES += main.cpp\
    Data.cpp \
    Logger.cpp \
    DetectorView.cpp \
    ColorMap.cpp
    ColorMap.cpp \
    qcustomplot.cpp \
    Plotter1D.cpp

HEADERS  += mainwindow.h \
    DetectorView.h \
    DialogPeakFind.h \
    Data.h \
    Logger.h \
    ColorMap.h
    ColorMap.h \
    qcustomplot.h \
    Plotter1D.h

FORMS    += mainwindow.ui \
    dialog_PeakFind.ui
    dialog_PeakFind.ui \
    plotter1d.ui

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/NSXTool/ -lNSXTool
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/NSXTool/ -lNSXTool
@@ -36,4 +42,3 @@ INCLUDEPATH += $$PWD/ /usr/local/include/NSXTool
INCLUDEPATH += $$PWD/ /usr/local/include/eigen3
DEPENDPATH += $$PWD/ /usr/local/include/NSXTool
CONFIG += qwt
+148 −62

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ void Data::readBlock(int i)
    {
        _currentFrame=_data[i];
    }
    auto it=std::max_element(_currentFrame.begin(),_currentFrame.end());
    _maxCurrentFrame=(*it);
}
void Data::readInMemory()
{
@@ -42,8 +44,6 @@ void Data::readInMemory()

        int count=0;

int counter=0;


#pragma omp parallel for shared(count)
        for (int i=0;i<_nblocks;++i)
@@ -84,7 +84,7 @@ void Data::getCountsHistogram(std::vector<int>& histo)
    for (auto i=0;i<_nblocks;++i)
    {
        std::vector<int>& d=_data[i];
        for (auto j=0;j<d.size();++j)
        for (unsigned int j=0;j<d.size();++j)
        {
            histo[d[j]]++;
        }
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ struct Data
    std::vector<int> _sum;
    bool _inmemory;
    int _maxCount;
    int _maxCurrentFrame;
    std::map<int,SX::Geometry::Ellipsoid<double,3>,std::less<int>, Eigen::aligned_allocator<std::pair<const int, Eigen::Matrix4d> >> _peaks;

};
Loading