mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user