diff --git a/src/charts/colormapchart/colormapchart.pri b/src/charts/colormapchart/colormapchart.pri --- a/src/charts/colormapchart/colormapchart.pri +++ b/src/charts/colormapchart/colormapchart.pri @@ -1,6 +1,9 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD +QMAKE_CXXFLAGS+= -fopenmp +QMAKE_LFLAGS += -fopenmp + SOURCES += \ $$PWD/qcolormapseries.cpp \ $$PWD/colormapchart.cpp \ diff --git a/src/charts/colormapchart/qcolormapseries.cpp b/src/charts/colormapchart/qcolormapseries.cpp --- a/src/charts/colormapchart/qcolormapseries.cpp +++ b/src/charts/colormapchart/qcolormapseries.cpp @@ -8,8 +8,8 @@ #include #include -//#include #include +#include "omp.h" #include "qcolorbaraxis.h" @@ -152,8 +152,8 @@ void QColorMapSeries::setPen(const QPen //bool emitColorChanged = d->m_pen.color() != pen.color(); d->m_pen = pen; emit d->updated(); -// if (emitColorChanged) -// emit colorChanged(pen.color()); + // if (emitColorChanged) + // emit colorChanged(pen.color()); emit penChanged(pen); } } @@ -438,14 +438,18 @@ void QColorMapSeriesPrivate::getUniformG double dx = (m_maxX - m_minX)/(double)width; double dy = (m_maxY - m_minY)/(double)height; - int x=0; - int y=0; + int index=0; -QVector cluster; -cluster.reserve(height*width/1000); + QVector cluster; + cluster.reserve(height*width/1000); + + int x = 0; + int y = 0; for (auto cell= grid.begin();cellbuildCluster(x,y,dx,dy,cluster); if(strategy == QColorMapSeries::LastPixel) @@ -454,16 +458,30 @@ cluster.reserve(height*width/1000); *cell=this->clusterStrategyMean(cluster); else if(strategy == QColorMapSeries::MedianPixel) *cell=this->clusterStrategyMedian(cluster); - if(xbuildCluster(x,y,dx,dy,cluster); +// if(strategy == QColorMapSeries::LastPixel) +// grid[width*y+x] = this->clusterStrategyLast(cluster); +// else if(strategy == QColorMapSeries::MeanPixel) +// grid[width*y+x] = this->clusterStrategyMean(cluster); +// else if(strategy == QColorMapSeries::MedianPixel) +// grid[width*y+x] = this->clusterStrategyMedian(cluster); +// } +// } +} + +double QColorMapSeriesPrivate::computeValuePixel() +{ + + } /*!