mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2496 Tensor vectors: Two new paletts
This commit is contained in:
parent
f4bae6f796
commit
cbbc9c0f26
@ -197,7 +197,7 @@ const caf::ColorTable& RiaColorTables::tensorWhiteGrayBlackPaletteColors()
|
|||||||
{
|
{
|
||||||
static std::vector<cvf::Color3ub> colors{
|
static std::vector<cvf::Color3ub> colors{
|
||||||
cvf::Color3ub::WHITE,
|
cvf::Color3ub::WHITE,
|
||||||
cvf::Color3ub::GRAY,
|
cvf::Color3ub::LIGHT_GRAY,
|
||||||
cvf::Color3ub::BLACK,
|
cvf::Color3ub::BLACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,12 +208,27 @@ const caf::ColorTable& RiaColorTables::tensorWhiteGrayBlackPaletteColors()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const caf::ColorTable& RiaColorTables::tensorMagentaBrownBlackPaletteColors()
|
const caf::ColorTable& RiaColorTables::tensorOrangeBlueWhitePaletteColors()
|
||||||
{
|
{
|
||||||
static std::vector<cvf::Color3ub> colors{
|
static std::vector<cvf::Color3ub> colors{
|
||||||
cvf::Color3ub::DARK_MAGENTA,
|
cvf::Color3ub(236, 118, 0), // Orange
|
||||||
|
cvf::Color3ub(56, 56, 255), // Vivid Blue
|
||||||
|
cvf::Color3ub(210, 248, 250), // White Turquoiseish
|
||||||
|
};
|
||||||
|
|
||||||
|
static caf::ColorTable colorTable = caf::ColorTable(colors);
|
||||||
|
return colorTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const caf::ColorTable& RiaColorTables::tensorsMagentaBrownGrayPaletteColors()
|
||||||
|
{
|
||||||
|
static std::vector<cvf::Color3ub> colors{
|
||||||
|
cvf::Color3ub(248, 0, 170), // Magenta
|
||||||
cvf::Color3ub::BROWN,
|
cvf::Color3ub::BROWN,
|
||||||
cvf::Color3ub::BLACK,
|
cvf::Color3ub::LIGHT_GRAY,
|
||||||
};
|
};
|
||||||
|
|
||||||
static caf::ColorTable colorTable = caf::ColorTable(colors);
|
static caf::ColorTable colorTable = caf::ColorTable(colors);
|
||||||
|
@ -38,7 +38,8 @@ public:
|
|||||||
static const caf::ColorTable& redWhiteBluePaletteColors();
|
static const caf::ColorTable& redWhiteBluePaletteColors();
|
||||||
static const caf::ColorTable& categoryPaletteColors();
|
static const caf::ColorTable& categoryPaletteColors();
|
||||||
static const caf::ColorTable& tensorWhiteGrayBlackPaletteColors();
|
static const caf::ColorTable& tensorWhiteGrayBlackPaletteColors();
|
||||||
static const caf::ColorTable& tensorMagentaBrownBlackPaletteColors();
|
static const caf::ColorTable& tensorOrangeBlueWhitePaletteColors();
|
||||||
|
static const caf::ColorTable& tensorsMagentaBrownGrayPaletteColors();
|
||||||
static const caf::ColorTable& angularPaletteColors();
|
static const caf::ColorTable& angularPaletteColors();
|
||||||
static const caf::ColorTable& stimPlanPaletteColors();
|
static const caf::ColorTable& stimPlanPaletteColors();
|
||||||
static const caf::ColorTable& faultsPaletteColors();
|
static const caf::ColorTable& faultsPaletteColors();
|
||||||
|
@ -338,19 +338,19 @@ cvf::ref<cvf::Part> RivTensorResultPartMgr::createPart(const std::vector<TensorV
|
|||||||
|
|
||||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||||
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
|
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
|
||||||
if (vectorColors == RimTensorResults::MAGENTA_BROWN_BLACK || vectorColors == RimTensorResults::WHITE_GRAY_BLACK)
|
if (vectorColors == RimTensorResults::RESULT_COLORS)
|
||||||
{
|
|
||||||
activeScalerMapper = discreteScalarMapper.p();
|
|
||||||
|
|
||||||
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
|
|
||||||
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
activeScalerMapper = m_rimReservoirView->tensorResults()->legendConfig()->scalarMapper();
|
activeScalerMapper = m_rimReservoirView->tensorResults()->legendConfig()->scalarMapper();
|
||||||
|
|
||||||
createResultColorTextureCoords(lineTexCoords.p(), tensorVisualizations, activeScalerMapper);
|
createResultColorTextureCoords(lineTexCoords.p(), tensorVisualizations, activeScalerMapper);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
activeScalerMapper = discreteScalarMapper.p();
|
||||||
|
|
||||||
|
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
|
||||||
|
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
|
||||||
|
}
|
||||||
|
|
||||||
caf::ScalarMapperEffectGenerator surfEffGen(activeScalerMapper, caf::PO_1);
|
caf::ScalarMapperEffectGenerator surfEffGen(activeScalerMapper, caf::PO_1);
|
||||||
|
|
||||||
@ -381,14 +381,19 @@ void RivTensorResultPartMgr::createOneColorPerPrincipalScalarMapper(const RimTen
|
|||||||
|
|
||||||
cvf::Color3ubArray arrowColors;
|
cvf::Color3ubArray arrowColors;
|
||||||
arrowColors.resize(3);
|
arrowColors.resize(3);
|
||||||
if (colorSet == RimTensorResults::MAGENTA_BROWN_BLACK)
|
|
||||||
{
|
if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
|
||||||
arrowColors = RiaColorTables::tensorMagentaBrownBlackPaletteColors().color3ubArray();
|
|
||||||
}
|
|
||||||
else if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
|
|
||||||
{
|
{
|
||||||
arrowColors = RiaColorTables::tensorWhiteGrayBlackPaletteColors().color3ubArray();
|
arrowColors = RiaColorTables::tensorWhiteGrayBlackPaletteColors().color3ubArray();
|
||||||
}
|
}
|
||||||
|
else if (colorSet == RimTensorResults::ORANGE_BLUE_WHITE)
|
||||||
|
{
|
||||||
|
arrowColors = RiaColorTables::tensorOrangeBlueWhitePaletteColors().color3ubArray();
|
||||||
|
}
|
||||||
|
else if (colorSet == RimTensorResults::MAGENTA_BROWN_GRAY)
|
||||||
|
{
|
||||||
|
arrowColors = RiaColorTables::tensorsMagentaBrownGrayPaletteColors().color3ubArray();
|
||||||
|
}
|
||||||
|
|
||||||
scalarMapper->setColors(arrowColors);
|
scalarMapper->setColors(arrowColors);
|
||||||
scalarMapper->setRange(0.5, 3.5);
|
scalarMapper->setRange(0.5, 3.5);
|
||||||
|
@ -36,7 +36,8 @@ namespace caf
|
|||||||
void AppEnum< RimTensorResults::TensorColors >::setUp()
|
void AppEnum< RimTensorResults::TensorColors >::setUp()
|
||||||
{
|
{
|
||||||
addItem(RimTensorResults::WHITE_GRAY_BLACK , "WHITE_GRAY_BLACK", "White, Gray, Black");
|
addItem(RimTensorResults::WHITE_GRAY_BLACK , "WHITE_GRAY_BLACK", "White, Gray, Black");
|
||||||
addItem(RimTensorResults::MAGENTA_BROWN_BLACK, "MAGENTA_BROWN_BLACK", "Magenta, Brown, Black");
|
addItem(RimTensorResults::ORANGE_BLUE_WHITE, "ORANGE_BLUE_WHITE", "Orange, Blue, White");
|
||||||
|
addItem(RimTensorResults::MAGENTA_BROWN_GRAY, "MAGENTA_BROWN_GRAY", "Magenta, Brown, Gray");
|
||||||
addItem(RimTensorResults::RESULT_COLORS, "RESULT_COLORS", "Result Colors");
|
addItem(RimTensorResults::RESULT_COLORS, "RESULT_COLORS", "Result Colors");
|
||||||
|
|
||||||
setDefault(RimTensorResults::WHITE_GRAY_BLACK);
|
setDefault(RimTensorResults::WHITE_GRAY_BLACK);
|
||||||
|
@ -43,7 +43,8 @@ public:
|
|||||||
enum TensorColors
|
enum TensorColors
|
||||||
{
|
{
|
||||||
WHITE_GRAY_BLACK,
|
WHITE_GRAY_BLACK,
|
||||||
MAGENTA_BROWN_BLACK,
|
ORANGE_BLUE_WHITE,
|
||||||
|
MAGENTA_BROWN_GRAY,
|
||||||
RESULT_COLORS
|
RESULT_COLORS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user