(#541) Added feature for export of well log plot curves to a LAS file

Did some refactoring/improvements by introducing new class
RigWellLogCurveData.
This commit is contained in:
Pål Hagen
2015-10-15 11:27:12 +02:00
parent 5f92e87070
commit 08573be64b
16 changed files with 476 additions and 68 deletions

View File

@@ -19,6 +19,9 @@
#include "RiuWellLogPlotCurve.h"
#include "RigWellLogCurveData.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -33,14 +36,6 @@ RiuWellLogPlotCurve::~RiuWellLogPlotCurve()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlotCurve::setPlotIntervals(const std::vector<std::pair<size_t, size_t> >& intervals)
{
m_intervals = intervals;
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -58,3 +53,17 @@ void RiuWellLogPlotCurve::drawCurve(QPainter* p, int style,
}
else QwtPlotCurve::drawCurve(p, style, xMap, yMap, canvasRect, from, to);
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlotCurve::setCurveData(const RigWellLogCurveData* curveData)
{
CVF_ASSERT(curveData);
std::vector<double> validXValues = curveData->validXValues();
std::vector<double> validYValues = curveData->validYValues();
setSamples(validXValues.data(), validYValues.data(), (int) validXValues.size());
m_intervals = curveData->validPointsIntervals();
}

View File

@@ -23,6 +23,8 @@
#include <vector>
class RigWellLogCurveData;
//==================================================================================================
///
///
@@ -30,10 +32,11 @@
class RiuWellLogPlotCurve : public QwtPlotCurve
{
public:
RiuWellLogPlotCurve();
virtual ~RiuWellLogPlotCurve();
void setPlotIntervals(const std::vector<std::pair<size_t, size_t> >& intervals);
void setCurveData(const RigWellLogCurveData* curveData);
protected:
@@ -42,5 +45,5 @@ protected:
const QRectF& canvasRect, int from, int to) const;
private:
std::vector< std::pair<size_t, size_t> > m_intervals;
std::vector< std::pair<size_t, size_t> > m_intervals;
};