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"
|
2015-12-02 05:19:35 -06:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
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,
|
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
|
|
|
bool isExtractionCurve );
|
|
|
|
void setValuesAndDepths( const std::vector<double>& xValues,
|
|
|
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
|
|
|
bool isExtractionCurve );
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const std::vector<double>& xValues() const;
|
2019-11-19 06:19:56 -06:00
|
|
|
|
|
|
|
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType ) const;
|
|
|
|
|
|
|
|
std::set<RiaDefines::DepthTypeEnum> availableDepthTypes() const;
|
|
|
|
|
|
|
|
bool calculateDepthRange( RiaDefines::DepthTypeEnum depthType, 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;
|
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
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<double> convertDepthValues( RiaDefines::DepthUnitType destinationDepthUnit,
|
|
|
|
const std::vector<double>& originalValues ) const;
|
2015-12-02 06:39:16 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static std::vector<double> convertFromMeterToFeet( const std::vector<double>& valuesInMeter );
|
|
|
|
static std::vector<double> convertFromFeetToMeter( const std::vector<double>& valuesInFeet );
|
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;
|
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;
|
|
|
|
};
|