(#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

@@ -72,6 +72,8 @@ void RimWellLogFileCurve::updatePlotData()
if (isCurveVisibile())
{
m_curveData = new RigWellLogCurveData;
if (m_wellPath)
{
RimWellLogFile* logFileInfo = m_wellPath->m_wellLogFile;
@@ -83,25 +85,9 @@ void RimWellLogFileCurve::updatePlotData()
std::vector<double> values = wellLogFile->values(m_wellLogChannnelName);
std::vector<double> depthValues = wellLogFile->depthValues();
if (values.size() > 0 && depthValues.size() > 0)
{
std::vector< std::pair<size_t, size_t> > valuesIntervals;
RimWellLogCurveImpl::calculateIntervalsOfValidValues(values, valuesIntervals);
std::vector<double> filteredValues;
std::vector<double> filteredDepths;
RimWellLogCurveImpl::addValuesFromIntervals(values, valuesIntervals, &filteredValues);
RimWellLogCurveImpl::addValuesFromIntervals(depthValues, valuesIntervals, &filteredDepths);
std::vector< std::pair<size_t, size_t> > fltrIntervals;
RimWellLogCurveImpl::filteredIntervals(valuesIntervals, &fltrIntervals);
m_plotCurve->setSamples(filteredValues.data(), filteredDepths.data(), (int)filteredDepths.size());
m_plotCurve->setPlotIntervals(fltrIntervals);
}
else
if (values.size() == depthValues.size())
{
m_plotCurve->setSamples(NULL, NULL, 0);
m_curveData->setPoints(values, depthValues);
}
}
@@ -111,10 +97,8 @@ void RimWellLogFileCurve::updatePlotData()
}
}
}
else
{
m_plotCurve->setSamples(NULL, NULL, 0);
}
m_plotCurve->setCurveData(m_curveData.p());
updateTrackAndPlotFromCurveData();