///////////////////////////////////////////////////////////////////////////////// // // 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 "RiaWellLogUnitTools.h" #include "cvfObject.h" #include #include #include #include class RigWellLogCurveDataTestInterface; //================================================================================================== /// //================================================================================================== class RigWellLogCurveData : public cvf::Object { public: RigWellLogCurveData(); ~RigWellLogCurveData() override; void setValuesAndDepths( const std::vector& xValues, const std::vector& depths, RiaDefines::DepthTypeEnum depthType, double rkbDiff, RiaDefines::DepthUnitType depthUnit, bool isExtractionCurve ); void setValuesAndDepths( const std::vector& xValues, const std::map>& depths, double rkbDiff, RiaDefines::DepthUnitType depthUnit, bool isExtractionCurve ); void setXUnits( const QString& xUnitString ); std::vector xValues() const; std::vector xValues( const QString& units ) const; QString xUnits() const; std::vector depths( RiaDefines::DepthTypeEnum depthType ) const; std::set availableDepthTypes() const; bool calculateDepthRange( RiaDefines::DepthTypeEnum depthType, RiaDefines::DepthUnitType depthUnit, double* minMD, double* maxMD ) const; RiaDefines::DepthUnitType depthUnit() const; std::vector xPlotValues() const; std::vector depthPlotValues( RiaDefines::DepthTypeEnum depthType, RiaDefines::DepthUnitType destinationDepthUnit ) const; std::vector> polylineStartStopIndices() const; cvf::ref calculateResampledCurveData( double newMeasuredDepthStepSize ) const; cvf::ref calculateResampledCurveData( RiaDefines::DepthTypeEnum resamplingDepthType, const std::vector& depths ) const; void interpolateSegment( RiaDefines::DepthTypeEnum resamplingDepthType, double depthValue, size_t firstIndex, std::vector& xValues, std::map>& resampledDepths, const double eps ) const; private: void calculateIntervalsOfContinousValidValues(); static void splitIntervalAtEmptySpace( const std::vector& depthValues, size_t startIdx, size_t stopIdx, std::vector>* intervals ); private: std::vector m_xValues; std::map> m_depths; bool m_isExtractionCurve; double m_rkbDiff; std::vector> m_intervalsOfContinousValidValues; RiaDefines::DepthUnitType m_depthUnit; QString m_xUnitString; };