///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2015- Statoil ASA // Copyright (C) 2015- Ceetron Solutions AS // // 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. // // 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. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RiaDefines.h" #include "cvfBase.h" #include "cvfObject.h" #include class RigWellLogCurveDataTestInterface; //================================================================================================== /// //================================================================================================== class RigWellLogCurveData : public cvf::Object { public: RigWellLogCurveData(); ~RigWellLogCurveData() override; void setValuesAndMD(const std::vector& xValues, const std::vector& measuredDepths, RiaDefines::DepthUnitType depthUnit, bool isExtractionCurve); void setValuesWithTVD(const std::vector& xValues, const std::vector& measuredDepths, const std::vector& tvDepths, RiaDefines::DepthUnitType depthUnit, bool isExtractionCurve); const std::vector& xValues() const; const std::vector& measuredDepths() const; const std::vector& tvDepths() const; bool calculateMDRange(double* minMD, double* maxMD) const; RiaDefines::DepthUnitType depthUnit() const; std::vector xPlotValues() const; std::vector trueDepthPlotValues(RiaDefines::DepthUnitType destinationDepthUnit) const; std::vector measuredDepthPlotValues(RiaDefines::DepthUnitType destinationDepthUnit) const; std::vector< std::pair > polylineStartStopIndices() const; cvf::ref calculateResampledCurveData(double newMeasuredDepthStepSize) const; private: void calculateIntervalsOfContinousValidValues(); static void splitIntervalAtEmptySpace(const std::vector& depthValues, size_t startIdx, size_t stopIdx, std::vector< std::pair >* intervals); std::vector convertDepthValues(RiaDefines::DepthUnitType destinationDepthUnit, const std::vector& originalValues) const; static std::vector convertFromMeterToFeet(const std::vector& valuesInMeter); static std::vector convertFromFeetToMeter(const std::vector& valuesInFeet); private: std::vector m_xValues; std::vector m_measuredDepths; std::vector m_tvDepths; bool m_isExtractionCurve; std::vector< std::pair > m_intervalsOfContinousValidValues; RiaDefines::DepthUnitType m_depthUnit; };