28 QFrame* canvas = qobject_cast<QFrame*>(
m_Plot->canvas());
31 canvas->setLineWidth(0);
32 canvas->setContentsMargins(0,0,0,0);
58 if(params !=
nullptr && results !=
nullptr)
60 for(
unsigned int i=0; i<
m_Vals.size(); i++)
70 std::vector<double> *xVals = hist->
GetXVals();
71 std::vector<double> *fiberVals =
new std::vector<double>(results->
GetFiberVals());
72 std::vector<double> *nonFiberVals =
new std::vector<double>(results->
GetNonFiberVals());
73 std::vector<double> *mixedVals =
new std::vector<double>(results->
GetMixedVals());
74 std::vector<double> *combiVals =
new std::vector<double>(results->
GetCombiVals());
80 for(
unsigned int i=0; i<xVals->size(); ++i)
83 fiberFA += xVals->at(i) * fiberVals->at(i);
84 weights += fiberVals->at(i);
87 fiberFA = fiberFA / weights;
89 QPen pen( Qt::SolidLine );
92 QwtText plot_title(
"Compartment Histograms " );
93 plot_title.setFont( QFont(
"Helvetica", 10, QFont::Bold) );
96 pen.setColor(Qt::black);
103 pen.setColor(Qt::blue);
108 m_Vals.push_back(combiVals);
115 this->
SetCurveBrush(curveId, QBrush(QColor::fromRgbF(1,0,0,.5), Qt::SolidPattern));
116 m_Vals.push_back(fiberVals);
122 this->
SetCurveBrush(curveId, QBrush(QColor::fromRgbF(0,1,0,.5), Qt::SolidPattern));
123 m_Vals.push_back(nonFiberVals);
129 this->
SetCurveBrush(curveId, QBrush(QColor::fromRgbF(.7,.7,.7,.5), Qt::SolidPattern));
130 m_Vals.push_back(mixedVals);
132 auto legend =
new QwtLegend();
133 m_Plot->insertLegend( legend, QwtPlot::TopLegend );
std::vector< double > GetNonFiberVals()
std::vector< double > GetCombiVals()
std::vector< double > * GetHVals()
std::vector< double > * GetXVals()
std::vector< double > GetMixedVals()
std::vector< double > GetFiberVals()