mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Color Legend : Added RAINBOW for better depth visualization (issue #6168)
- Included RAINBOW color legend - RAINBOW set as default when creating a new contour plot
This commit is contained in:
parent
7d45ab4f41
commit
edc4b39acb
@ -216,6 +216,24 @@ const caf::ColorTable& RiaColorTables::angularPaletteColors()
|
||||
return colorTable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const caf::ColorTable& RiaColorTables::rainbowPaletteColors()
|
||||
{
|
||||
static std::vector<cvf::Color3ub> colors{cvf::Color3ub::BLACK,
|
||||
cvf::Color3ub::MAGENTA,
|
||||
cvf::Color3ub::BLUE,
|
||||
cvf::Color3ub::CYAN,
|
||||
cvf::Color3ub::GREEN,
|
||||
cvf::Color3ub::RED,
|
||||
cvf::Color3ub::YELLOW,
|
||||
cvf::Color3ub::WHITE};
|
||||
|
||||
static caf::ColorTable colorTable = caf::ColorTable( colors );
|
||||
return colorTable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
static const caf::ColorTable& tensorOrangeBlueWhitePaletteColors();
|
||||
static const caf::ColorTable& tensorsMagentaBrownGrayPaletteColors();
|
||||
static const caf::ColorTable& angularPaletteColors();
|
||||
static const caf::ColorTable& rainbowPaletteColors();
|
||||
static const caf::ColorTable& stimPlanPaletteColors();
|
||||
static const caf::ColorTable& faultsPaletteColors();
|
||||
static const caf::ColorTable& wellsPaletteColors();
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "RimGeoMechContourMapView.h"
|
||||
#include "RimGeoMechContourMapViewCollection.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
@ -242,6 +243,13 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap(
|
||||
{
|
||||
contourMap->cellResult()->setResultVariable( "SOIL" );
|
||||
}
|
||||
|
||||
RimRegularLegendConfig* legendConfig = contourMap->cellResult()->legendConfig();
|
||||
if ( legendConfig )
|
||||
{
|
||||
RimColorLegend* legend = legendConfig->mapToColorLegend( RimRegularLegendConfig::RAINBOW );
|
||||
legendConfig->setColorLegend( legend );
|
||||
}
|
||||
}
|
||||
|
||||
caf::PdmDocument::updateUiIconStateRecursively( contourMap );
|
||||
|
@ -88,6 +88,7 @@ void RimRegularLegendConfig::ColorRangeEnum::setUp()
|
||||
addItem( RimRegularLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white" );
|
||||
addItem( RimRegularLegendConfig::CATEGORY, "CATEGORY", "Category colors" );
|
||||
addItem( RimRegularLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic" );
|
||||
addItem( RimRegularLegendConfig::RAINBOW, "RAINBOW", "Rainbow Palette" );
|
||||
addItem( RimRegularLegendConfig::STIMPLAN, "STIMPLAN", "StimPlan colors" );
|
||||
addItem( RimRegularLegendConfig::RED_LIGHT_DARK, "RED_DARK_LIGHT", "Red Light to Dark" );
|
||||
addItem( RimRegularLegendConfig::GREEN_LIGHT_DARK, "GREEN_DARK_LIGHT", "Green Light to Dark" );
|
||||
@ -958,6 +959,9 @@ cvf::Color3ubArray RimRegularLegendConfig::colorArrayFromColorType( ColorRangesT
|
||||
case RimRegularLegendConfig::ANGULAR:
|
||||
return RiaColorTables::angularPaletteColors().color3ubArray();
|
||||
break;
|
||||
case RimRegularLegendConfig::RAINBOW:
|
||||
return RiaColorTables::rainbowPaletteColors().color3ubArray();
|
||||
break;
|
||||
case RimRegularLegendConfig::STIMPLAN:
|
||||
return RiaColorTables::stimPlanPaletteColors().color3ubArray();
|
||||
break;
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
RED_WHITE_BLUE,
|
||||
CATEGORY,
|
||||
ANGULAR,
|
||||
RAINBOW,
|
||||
STIMPLAN,
|
||||
|
||||
GREEN_RED,
|
||||
|
2
ThirdParty/qwt
vendored
2
ThirdParty/qwt
vendored
@ -1 +1 @@
|
||||
Subproject commit 0bd598c7008afbaa7216755fb9a4ac0da2e612eb
|
||||
Subproject commit 79e4fc7bde3ebd44c6e1834dff63a2a0eb7d33b2
|
Loading…
Reference in New Issue
Block a user