mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5472 Improve visualisation of water depth
This commit is contained in:
parent
dfe6d0b94e
commit
2949d3458d
@ -491,7 +491,7 @@ const caf::ColorTable& RiaColorTables::waterAndRockPaletteColors()
|
|||||||
{
|
{
|
||||||
static std::vector<cvf::Color3ub> colors{
|
static std::vector<cvf::Color3ub> colors{
|
||||||
cvf::Color3ub( 127, 205, 255 ), // Sea Blue
|
cvf::Color3ub( 127, 205, 255 ), // Sea Blue
|
||||||
cvf::Color3ub( 220, 220, 220 ) // Light Gray
|
cvf::Color3ub( 100, 100, 100 ) // Gray
|
||||||
};
|
};
|
||||||
static caf::ColorTable colorTable = caf::ColorTable( colors );
|
static caf::ColorTable colorTable = caf::ColorTable( colors );
|
||||||
|
|
||||||
|
@ -2324,13 +2324,15 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
const std::vector<std::pair<double, double>> waterAndRockIntervals = waterAndRockRegions( plot->depthType(),
|
const std::vector<std::pair<double, double>> waterAndRockIntervals = waterAndRockRegions( plot->depthType(),
|
||||||
extractor );
|
extractor );
|
||||||
m_annotationTool->attachNamedRegions( m_plotWidget,
|
m_annotationTool->attachNamedRegions( m_plotWidget,
|
||||||
{"Water", ""},
|
{"Surface", "Seabed"},
|
||||||
xRange,
|
xRange,
|
||||||
waterAndRockIntervals,
|
waterAndRockIntervals,
|
||||||
m_regionAnnotationDisplay(),
|
m_regionAnnotationDisplay(),
|
||||||
waterAndRockColors,
|
waterAndRockColors,
|
||||||
( ( 100 - m_colorShadingTransparency ) * 255 ) / 100,
|
( ( 100 - m_colorShadingTransparency ) * 255 ) / 100,
|
||||||
m_showRegionLabels() );
|
m_showRegionLabels(),
|
||||||
|
RiuPlotAnnotationTool::LEFT_COLUMN,
|
||||||
|
{Qt::SolidPattern, Qt::Dense6Pattern} );
|
||||||
|
|
||||||
if ( m_formationSource == CASE )
|
if ( m_formationSource == CASE )
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,8 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
|
|||||||
const caf::ColorTable& colorTable,
|
const caf::ColorTable& colorTable,
|
||||||
int shadingAlphaByte,
|
int shadingAlphaByte,
|
||||||
bool showNames /*= true */,
|
bool showNames /*= true */,
|
||||||
TrackSpan trackSpan /*= FULL_WIDTH*/ )
|
TrackSpan trackSpan /*= FULL_WIDTH*/,
|
||||||
|
const std::vector<Qt::BrushStyle>& brushStyles /* = {}*/ )
|
||||||
{
|
{
|
||||||
if ( names.size() != yPositions.size() ) return;
|
if ( names.size() != yPositions.size() ) return;
|
||||||
m_plot = plot;
|
m_plot = plot;
|
||||||
@ -66,12 +67,10 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
|
|||||||
|
|
||||||
for ( size_t i = 0; i < names.size(); i++ )
|
for ( size_t i = 0; i < names.size(); i++ )
|
||||||
{
|
{
|
||||||
if ( names[i].isEmpty() ) continue;
|
|
||||||
|
|
||||||
QwtPlotMarker* line( new QwtPlotMarker() );
|
QwtPlotMarker* line( new QwtPlotMarker() );
|
||||||
|
|
||||||
QString name;
|
QString name;
|
||||||
if ( showNames )
|
if ( showNames && !names[i].isEmpty() )
|
||||||
{
|
{
|
||||||
name = names[i];
|
name = names[i];
|
||||||
if ( ( regionDisplay & COLOR_SHADING ) == 0 && names[i].toLower().indexOf( "top" ) == -1 )
|
if ( ( regionDisplay & COLOR_SHADING ) == 0 && names[i].toLower().indexOf( "top" ) == -1 )
|
||||||
@ -88,7 +87,12 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
|
|||||||
shading->setOrientation( Qt::Horizontal );
|
shading->setOrientation( Qt::Horizontal );
|
||||||
shading->setInterval( yPositions[i].first, yPositions[i].second );
|
shading->setInterval( yPositions[i].first, yPositions[i].second );
|
||||||
shading->setPen( shadingColor, 0.0, Qt::NoPen );
|
shading->setPen( shadingColor, 0.0, Qt::NoPen );
|
||||||
shading->setBrush( QBrush( shadingColor ) );
|
QBrush brush( shadingColor );
|
||||||
|
if ( i < brushStyles.size() )
|
||||||
|
{
|
||||||
|
brush.setStyle( brushStyles[i] );
|
||||||
|
}
|
||||||
|
shading->setBrush( brush );
|
||||||
shading->attach( m_plot );
|
shading->attach( m_plot );
|
||||||
shading->setZ( -100.0 );
|
shading->setZ( -100.0 );
|
||||||
shading->setXAxis( QwtPlot::xTop );
|
shading->setXAxis( QwtPlot::xTop );
|
||||||
|
@ -66,8 +66,9 @@ public:
|
|||||||
RegionDisplay regionDisplay,
|
RegionDisplay regionDisplay,
|
||||||
const caf::ColorTable& colorTable,
|
const caf::ColorTable& colorTable,
|
||||||
int shadingAlphaByte,
|
int shadingAlphaByte,
|
||||||
bool showNames = true,
|
bool showNames = true,
|
||||||
TrackSpan trackSpan = FULL_WIDTH );
|
TrackSpan trackSpan = FULL_WIDTH,
|
||||||
|
const std::vector<Qt::BrushStyle>& brushStyles = {} );
|
||||||
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions );
|
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions );
|
||||||
|
|
||||||
void attachAnnotationLine( QwtPlot* plot, const QColor& color, const QString& annotationText, const double yPosition );
|
void attachAnnotationLine( QwtPlot* plot, const QColor& color, const QString& annotationText, const double yPosition );
|
||||||
|
Loading…
Reference in New Issue
Block a user