11 #include <QtCore/QDebug>
37 setInterval(Qt::XAxis,QwtInterval(xaxis.low,xaxis.up));
39 setInterval(Qt::YAxis,QwtInterval(yaxis.low,yaxis.up));
40 setInterval(Qt::ZAxis,origZInterval(
false));
53 return (QwtInterval(0,0));
55 QwtInterval zRange(1e30,-1e30);
60 if (!std::isfinite(*it))
62 if (log && !std::isfinite(log10(*it)))
64 if (*it < zRange.minValue())
65 zRange.setMinValue(*it);
66 if (zRange.maxValue() < *it)
67 zRange.setMaxValue(*it);
77 const int xSize(_result->shape().first);
78 const int xMin(interval(Qt::XAxis).minValue());
79 const int xWidth(interval(Qt::XAxis).
width());
80 const int binx(xSize * (x - xMin) / xWidth);
81 if (binx < 0 || xSize <= binx)
84 const int ySize(_result->shape().second);
85 const int yMin(interval(Qt::YAxis).minValue());
86 const int yWidth(interval(Qt::YAxis).
width());
87 const int biny(ySize * (y - yMin) / yWidth);
88 if (biny < 0 || ySize <= biny)
91 const int globalbin(biny*xSize + binx);
92 return (*_result)[globalbin];
QwtInterval origZInterval(bool log) const
return the min max values of the values in the data
storage_t::const_iterator const_iterator
a const iterator on the storage
virtual ~TwoDViewerData()
destructor
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
contains the wrappe of the data for the 2d viewer
an axis of a more than 0 dimensional container
void setResult(result_t::shared_pointer result)
set the cass data to be wrapped by this
virtual double value(double x, double y) const
return the value of the data at point x,y
result_t::shared_pointer result()
retrieve the pointer to the data
TwoDViewerData()
default constructor