2015-10-15 04:27:12 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-10-15 04:27:12 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-10-15 04:27:12 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-10-15 04:27:12 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-06-13 08:41:52 -05:00
|
|
|
#include "RiaDefines.h"
|
2020-01-29 05:52:07 -06:00
|
|
|
#include "RiaWellLogUnitTools.h"
|
2015-12-02 05:19:35 -06:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2020-01-29 05:52:07 -06:00
|
|
|
#include <QString>
|
|
|
|
|
2019-11-19 06:19:56 -06:00
|
|
|
#include <map>
|
|
|
|
#include <set>
|
2015-10-15 04:27:12 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2015-10-15 05:41:12 -05:00
|
|
|
class RigWellLogCurveDataTestInterface;
|
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-10-15 04:27:12 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RigWellLogCurveData : public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigWellLogCurveData();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RigWellLogCurveData() override;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-11-19 06:19:56 -06:00
|
|
|
void setValuesAndDepths( const std::vector<double>& xValues,
|
|
|
|
const std::vector<double>& depths,
|
|
|
|
RiaDefines::DepthTypeEnum depthType,
|
2020-01-08 03:31:01 -06:00
|
|
|
double rkbDiff,
|
2019-11-19 06:19:56 -06:00
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
|
|
|
bool isExtractionCurve );
|
|
|
|
void setValuesAndDepths( const std::vector<double>& xValues,
|
|
|
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
2020-01-08 03:31:01 -06:00
|
|
|
double rkbDiff,
|
2019-11-19 06:19:56 -06:00
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
|
|
|
bool isExtractionCurve );
|
2020-01-29 05:52:07 -06:00
|
|
|
void setXUnits( const QString& xUnitString );
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2020-01-29 05:52:07 -06:00
|
|
|
std::vector<double> xValues() const;
|
|
|
|
std::vector<double> xValues( const QString& units ) const;
|
|
|
|
QString xUnits() const;
|
2019-11-19 06:19:56 -06:00
|
|
|
|
|
|
|
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType ) const;
|
|
|
|
|
|
|
|
std::set<RiaDefines::DepthTypeEnum> availableDepthTypes() const;
|
|
|
|
|
2019-11-29 03:02:34 -06:00
|
|
|
bool calculateDepthRange( RiaDefines::DepthTypeEnum depthType,
|
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
|
|
|
double* minMD,
|
|
|
|
double* maxMD ) const;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaDefines::DepthUnitType depthUnit() const;
|
2015-12-02 05:19:35 -06:00
|
|
|
|
2019-11-19 06:19:56 -06:00
|
|
|
std::vector<double> xPlotValues() const;
|
|
|
|
std::vector<double> depthPlotValues( RiaDefines::DepthTypeEnum depthType,
|
|
|
|
RiaDefines::DepthUnitType destinationDepthUnit ) const;
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<std::pair<size_t, size_t>> polylineStartStopIndices() const;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( double newMeasuredDepthStepSize ) const;
|
2020-06-23 08:35:17 -05:00
|
|
|
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( RiaDefines::DepthTypeEnum resamplingDepthType,
|
|
|
|
const std::vector<double>& depths ) const;
|
|
|
|
void interpolateSegment( RiaDefines::DepthTypeEnum resamplingDepthType,
|
|
|
|
double depthValue,
|
|
|
|
size_t firstIndex,
|
|
|
|
std::vector<double>& xValues,
|
|
|
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& resampledDepths,
|
|
|
|
const double eps ) const;
|
2016-09-19 04:17:36 -05:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void calculateIntervalsOfContinousValidValues();
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static void splitIntervalAtEmptySpace( const std::vector<double>& depthValues,
|
|
|
|
size_t startIdx,
|
|
|
|
size_t stopIdx,
|
|
|
|
std::vector<std::pair<size_t, size_t>>* intervals );
|
2015-12-02 06:39:16 -06:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
private:
|
2019-11-19 06:19:56 -06:00
|
|
|
std::vector<double> m_xValues;
|
|
|
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> m_depths;
|
|
|
|
bool m_isExtractionCurve;
|
2020-01-08 03:31:01 -06:00
|
|
|
double m_rkbDiff;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
std::vector<std::pair<size_t, size_t>> m_intervalsOfContinousValidValues;
|
2015-10-15 05:41:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaDefines::DepthUnitType m_depthUnit;
|
2020-01-29 05:52:07 -06:00
|
|
|
QString m_xUnitString;
|
2019-09-06 03:40:57 -05:00
|
|
|
};
|