mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Import RFT segment data as well log curve (#8449)
Add reader for RFT data using opm-common Extend RFT curve with support for RFT segment data Adjustments related to horizontal well log plots 8581 Well Log Plot : Update of curve appearance does not update plot
This commit is contained in:
@@ -148,6 +148,24 @@ void RimWellLogCurve::setPropertyValuesAndDepths( const std::vector<double>& pro
|
||||
calculateCurveDataPropertyValueRange();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setPropertyAndDepthValuesToPlotCurve( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues )
|
||||
{
|
||||
if ( !m_plotCurve ) return;
|
||||
|
||||
if ( isVerticalCurve() )
|
||||
{
|
||||
m_plotCurve->setSamplesValues( propertyValues, depthValues );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotCurve->setSamplesValues( depthValues, propertyValues );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -234,21 +252,15 @@ QString RimWellLogCurve::wellLogCurveIconName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setOverrideCurveData( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues,
|
||||
const RiaCurveDataTools::CurveIntervals& curveIntervals,
|
||||
bool isVerticalPlot )
|
||||
const RiaCurveDataTools::CurveIntervals& curveIntervals )
|
||||
{
|
||||
auto minmax_it = std::minmax_element( propertyValues.begin(), propertyValues.end() );
|
||||
this->setOverrideCurveDataPropertyValueRange( *( minmax_it.first ), *( minmax_it.second ) );
|
||||
|
||||
if ( m_plotCurve )
|
||||
{
|
||||
if ( isVerticalPlot )
|
||||
{
|
||||
m_plotCurve->setSamplesValues( propertyValues, depthValues );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotCurve->setSamplesValues( depthValues, propertyValues );
|
||||
}
|
||||
setPropertyAndDepthValuesToPlotCurve( propertyValues, depthValues );
|
||||
|
||||
m_plotCurve->setLineSegmentStartStopIndices( curveIntervals );
|
||||
}
|
||||
}
|
||||
@@ -357,9 +369,12 @@ void RimWellLogCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
{
|
||||
RimStackablePlotCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
if ( changedField == &m_showCurve && m_showCurve() )
|
||||
if ( changedField == &m_showCurve )
|
||||
{
|
||||
updateZoomInParentPlot();
|
||||
if ( m_isStacked() || m_showCurve() )
|
||||
{
|
||||
updateZoomInParentPlot();
|
||||
}
|
||||
}
|
||||
|
||||
if ( changedField == &m_isStacked )
|
||||
@@ -367,3 +382,39 @@ void RimWellLogCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
loadDataAndUpdate( true );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellLogCurve::isVerticalCurve() const
|
||||
{
|
||||
RimDepthTrackPlot::DepthOrientation orientation = RimDepthTrackPlot::DepthOrientation::VERTICAL;
|
||||
|
||||
RimDepthTrackPlot* depthTrackPlot = nullptr;
|
||||
firstAncestorOrThisOfType( depthTrackPlot );
|
||||
if ( depthTrackPlot ) orientation = depthTrackPlot->depthOrientation();
|
||||
|
||||
return orientation == RimDepthTrackPlot::DepthOrientation::VERTICAL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimWellLogCurve::depthAxis() const
|
||||
{
|
||||
RimDepthTrackPlot* depthTrackPlot;
|
||||
this->firstAncestorOrThisOfTypeAsserted( depthTrackPlot );
|
||||
|
||||
return depthTrackPlot->depthAxis();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimWellLogCurve::valueAxis() const
|
||||
{
|
||||
RimDepthTrackPlot* depthTrackPlot;
|
||||
this->firstAncestorOrThisOfTypeAsserted( depthTrackPlot );
|
||||
|
||||
return depthTrackPlot->valueAxis();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user