22 #include <qwt_scale_engine.h>
23 #include <qwt_legend.h>
32 QFrame* canvas = qobject_cast<QFrame*>(
m_Plot->canvas());
35 canvas->setLineWidth(0);
36 canvas->setContentsMargins(0,0,0,0);
39 auto logScale =
new QwtLogScaleEngine();
40 m_Plot->setAxisScaleEngine(0, logScale);
42 m_Plot->setAxisScale( 0, 0.15, 1.0 );
63 std::vector<double> QmitkIVIMWidget::vec(
const vnl_vector<double>& vector)
65 std::vector<double> retval(vector.size());
66 for(
unsigned int i=0; i<vector.size(); i++)
68 retval.at(i) = vector[i];
79 QString s(
"f=%1, D=%2, D*=%3");
83 int curveId = this->
InsertCurve( s.toLatin1(), QColor(Qt::black) );
87 pen.setColor( QColor(Qt::red) );
89 double maxb = snap.
bvalues.max_value();
90 vnl_vector<double> xvals(2);
91 vnl_vector<double> yvals(2);
95 yvals[1] = yvals[0]*exp(-maxb * snap.
currentD);
96 curveId = this->
InsertCurve(
"contribution of D to the signal", pen.color() );
103 pen.setColor(Qt::black);
105 xvals.set_size(nsampling);
106 yvals.set_size(nsampling);
108 for(
int i=0; i<nsampling; i++)
110 xvals[i] = (((1.0)*i)/(1.0*nsampling))*maxb;
113 curveId = this->
InsertCurve(
"resulting fit of the model" );
122 curveId = this->
InsertCurve(
"ignored measurement points" );
125 QwtSymbol* whiteSymbol =
new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::white), QColor(Qt::black), QSize(8,8));
131 QwtSymbol* redSymbol =
new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::red), QColor(Qt::red), QSize(8,8));
136 curveId = this->
InsertCurve(
"additional points second fit" );
139 QwtSymbol* blackSymbol =
new QwtSymbol(QwtSymbol::Diamond, QColor(Qt::black), QColor(Qt::black), QSize(8,8));
143 auto legend =
new QwtLegend();
144 m_Plot->insertLegend(legend, QwtPlot::BottomLegend);
vnl_vector< double > bvals2
vnl_vector< double > bvalues
vnl_vector< double > meas1
vnl_vector< double > meas2
vnl_vector< double > allmeas
vnl_vector< double > bvals1