diff --git a/vtkm/cont/CMakeLists.txt b/vtkm/cont/CMakeLists.txt index 9829f2e97..09fc61d9c 100644 --- a/vtkm/cont/CMakeLists.txt +++ b/vtkm/cont/CMakeLists.txt @@ -127,6 +127,7 @@ set(sources CellSet.cxx CellSetStructured.cxx ColorTable.cxx + ColorTablePresets.cxx DataSet.cxx DataSetBuilderExplicit.cxx DataSetBuilderRectilinear.cxx @@ -145,7 +146,6 @@ set(sources internal/VirtualObjectTransfer.cxx Logging.cxx MultiBlock.cxx - PresetColorTables.cxx RuntimeDeviceInformation.cxx RuntimeDeviceTracker.cxx StorageBasic.cxx diff --git a/vtkm/cont/ColorTable.cxx b/vtkm/cont/ColorTable.cxx index 65505f9ed..436f1a819 100644 --- a/vtkm/cont/ColorTable.cxx +++ b/vtkm/cont/ColorTable.cxx @@ -18,6 +18,7 @@ // this software. //============================================================================ #include +#include #include #include @@ -32,12 +33,12 @@ namespace vtkm namespace cont { -namespace detail +namespace internal { -bool loadColorTablePreset(vtkm::cont::ColorTable::Preset preset, vtkm::cont::ColorTable& table); std::set GetPresetNames(); -bool loadColorTablePreset(std::string name, vtkm::cont::ColorTable& table); -} +bool LoadColorTablePreset(vtkm::cont::ColorTable::Preset preset, vtkm::cont::ColorTable& table); +bool LoadColorTablePreset(std::string name, vtkm::cont::ColorTable& table); +} // namespace internal //---------------------------------------------------------------------------- ColorTable::ColorTable(vtkm::cont::ColorTable::Preset preset) @@ -102,27 +103,55 @@ ColorTable::ColorTable(const vtkm::Range& range, this->SetColorSpace(space); } +//---------------------------------------------------------------------------- +ColorTable::ColorTable(const std::string& name, + vtkm::cont::ColorSpace colorSpace, + const vtkm::Vec& nanColor, + const std::vector& rgbPoints, + const std::vector& alphaPoints) + : Impl(std::make_shared()) +{ + this->SetName(name); + this->SetColorSpace(colorSpace); + this->SetNaNColor(nanColor); + this->FillColorTableFromDataPointer(static_cast(rgbPoints.size()), rgbPoints.data()); + this->FillOpacityTableFromDataPointer(static_cast(alphaPoints.size()), + alphaPoints.data()); +} + //---------------------------------------------------------------------------- ColorTable::~ColorTable() { } //---------------------------------------------------------------------------- -bool ColorTable::LoadPreset(vtkm::cont::ColorTable::Preset preset) +const std::string& ColorTable::GetName() const { - return detail::loadColorTablePreset(preset, *this); + return this->Impl->Name; } //---------------------------------------------------------------------------- -std::set ColorTable::GetPresets() const +void ColorTable::SetName(const std::string& name) { - return detail::GetPresetNames(); + this->Impl->Name = name; +} + +//---------------------------------------------------------------------------- +bool ColorTable::LoadPreset(vtkm::cont::ColorTable::Preset preset) +{ + return internal::LoadColorTablePreset(preset, *this); +} + +//---------------------------------------------------------------------------- +std::set ColorTable::GetPresets() +{ + return internal::GetPresetNames(); } //---------------------------------------------------------------------------- bool ColorTable::LoadPreset(const std::string& name) { - return detail::loadColorTablePreset(name, *this); + return internal::LoadColorTablePreset(name, *this); } //---------------------------------------------------------------------------- @@ -358,8 +387,8 @@ vtkm::Int32 ColorTable::AddPoint(double x, const vtkm::Vec& rgb) } else { - this->Impl->ColorNodePos.emplace(pos, x); this->Impl->ColorRGB.emplace(this->Impl->ColorRGB.begin() + std::distance(begin, pos), rgb); + this->Impl->ColorNodePos.emplace(pos, x); } } this->Impl->TableRange.Include(x); //update range to include x @@ -541,11 +570,11 @@ vtkm::Int32 ColorTable::AddPointAlpha(double x, float alpha, float midpoint, flo } else { - this->Impl->OpacityNodePos.emplace(pos, x); this->Impl->OpacityAlpha.emplace(this->Impl->OpacityAlpha.begin() + std::distance(begin, pos), alpha); this->Impl->OpacityMidSharp.emplace( this->Impl->OpacityMidSharp.begin() + std::distance(begin, pos), midsharp); + this->Impl->OpacityNodePos.emplace(pos, x); } } this->Impl->OpacityArraysChanged = true; @@ -749,7 +778,7 @@ bool ColorTable::FillOpacityTableFromDataPointer(vtkm::Int32 n, const double* pt } this->ClearAlpha(); - std::size_t size = static_cast(n / 2); + std::size_t size = static_cast(n / 4); this->Impl->OpacityNodePos.reserve(size); this->Impl->OpacityAlpha.reserve(size); this->Impl->OpacityMidSharp.reserve(size); @@ -774,7 +803,7 @@ bool ColorTable::FillOpacityTableFromDataPointer(vtkm::Int32 n, const float* ptr this->ClearAlpha(); - std::size_t size = static_cast(n / 2); + std::size_t size = static_cast(n / 4); this->Impl->OpacityNodePos.reserve(size); this->Impl->OpacityAlpha.reserve(size); this->Impl->OpacityMidSharp.reserve(size); diff --git a/vtkm/cont/ColorTable.h b/vtkm/cont/ColorTable.h index c9af4a2d4..8785fbb2e 100644 --- a/vtkm/cont/ColorTable.h +++ b/vtkm/cont/ColorTable.h @@ -112,20 +112,23 @@ public: enum struct Preset { DEFAULT, - VIRIDIS, COOL_TO_WARM, - COOL_TO_WARN_EXTENDED, - COLD_AND_HOT, + COOL_TO_WARM_EXTENDED, + VIRIDIS, INFERNO, + PLASMA, BLACK_BODY_RADIATION, - SAMSEL_FIRE, - LINEAR_YGB, - BLACK_BLUE_AND_WHITE, - LINEAR_GREEN, X_RAY, + GREEN, + BLACK_BLUE_WHITE, + BLUE_TO_ORANGE, + GRAY_TO_RED, + COLD_AND_HOT, + BLUE_GREEN_ORANGE, + YELLOW_GRAY_BLUE, + RAINBOW_UNIFORM, JET, - RAINBOW_DESATURATED, - RAINBOW + RAINBOW_DESATURATED }; /// \brief Construct a color table from a preset @@ -145,20 +148,24 @@ public: /// Note: Names are case insensitive /// Currently supports the following color tables: /// + /// "Default" /// "Cool to Warm" - /// "Black-Body Radiation" - /// "Samsel Fire" [ known previously as "Black, Orange and White"] + /// "Cool to Warm Extended" + /// "Viridis" /// "Inferno" - /// "Linear YGB" - /// "Cold and Hot" - /// "Rainbow Desaturated" - /// "Cool to Warm (Extended)" + /// "Plasma" + /// "Black-Body Radiation" /// "X Ray" - /// "Black, Blue and White" - /// "Virdis" - /// "Linear Green" + /// "Green" + /// "Black - Blue - White" + /// "Blue to Orange" + /// "Gray to Red" + /// "Cold and Hot" + /// "Blue - Green - Orange" + /// "Yellow - Gray - Blue" + /// "Rainbow Uniform" /// "Jet" - /// "Rainbow" + /// "Rainbow Desaturated" /// explicit ColorTable(const std::string& name); @@ -192,9 +199,22 @@ public: const vtkm::Vec& rgba2, ColorSpace space = ColorSpace::LAB); + /// Construct a color table with a list of colors and alphas. For this version you must also + /// specify a name. + /// + /// This constructor is mostly used for presets. + ColorTable(const std::string& name, + vtkm::cont::ColorSpace colorSpace, + const vtkm::Vec& nanColor, + const std::vector& rgbPoints, + const std::vector& alphaPoints = { 0.0, 1.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0 }); + ~ColorTable(); + const std::string& GetName() const; + void SetName(const std::string& name); + bool LoadPreset(vtkm::cont::ColorTable::Preset preset); /// Returns the name of all preset color tables @@ -202,7 +222,7 @@ public: /// This list will include all presets defined in vtkm::cont::ColorTable::Preset and could /// include extras as well. /// - std::set GetPresets() const; + static std::set GetPresets(); /// Load a preset color table /// @@ -213,20 +233,25 @@ public: /// Note: Names are case insensitive /// /// Currently supports the following color tables: + /// "Default" /// "Cool to Warm" - /// "Black-Body Radiation" - /// "Samsel Fire" [ known previously as "Black, Orange and White"] + /// "Cool to Warm Extended" + /// "Viridis" /// "Inferno" - /// "Linear YGB" - /// "Cold and Hot" - /// "Rainbow Desaturated" - /// "Cool to Warm (Extended)" + /// "Plasma" + /// "Black-Body Radiation" /// "X Ray" - /// "Black, Blue and White" - /// "Virdis" - /// "Linear Green" + /// "Green" + /// "Black - Blue - White" + /// "Blue to Orange" + /// "Gray to Red" + /// "Cold and Hot" + /// "Blue - Green - Orange" + /// "Yellow - Gray - Blue" + /// "Rainbow Uniform" /// "Jet" - /// "Rainbow" + /// "Rainbow Desaturated" + /// bool LoadPreset(const std::string& name); /// Make a deep copy of the current color table @@ -455,27 +480,31 @@ public: /// Fill the Opacity table from a double pointer /// - /// The double pointer is required to have the layout out of [X1, A1, - /// X2, A2, ..., Xn, An] where n is the number of nodes. The midpoint - /// of each node will be set to 0.5 and the sharpness to 0.0 (linear). + /// The double pointer is required to have the layout out of [X1, A1, M1, S1, X2, A2, M2, S2, + /// ..., Xn, An, Mn, Sn] where n is the number of nodes. The Xi values represent the value to + /// map, the Ai values represent alpha (opacity) value, the Mi values represent midpoints, and + /// the Si values represent sharpness. Use 0.5 for midpoint and 0.0 for sharpness to have linear + /// interpolation of the alpha. + /// /// This will remove any existing opacity control points. /// - /// Note: n represents the length of the array, so ( n/2 == number of control points ) + /// Note: n represents the length of the array, so ( n/4 == number of control points ) /// - /// Note: This is provided as a interoperability method with VTK /// Will return false and not modify anything if n is <= 0 or ptr == nullptr bool FillOpacityTableFromDataPointer(vtkm::Int32 n, const double* ptr); /// Fill the Opacity table from a float pointer /// - /// The double pointer is required to have the layout out of [X1, A1, - /// X2, A2, ..., Xn, An] where n is the number of nodes. The midpoint - /// of each node will be set to 0.5 and the sharpness to 0.0 (linear). + /// The float pointer is required to have the layout out of [X1, A1, M1, S1, X2, A2, M2, S2, + /// ..., Xn, An, Mn, Sn] where n is the number of nodes. The Xi values represent the value to + /// map, the Ai values represent alpha (opacity) value, the Mi values represent midpoints, and + /// the Si values represent sharpness. Use 0.5 for midpoint and 0.0 for sharpness to have linear + /// interpolation of the alpha. + /// /// This will remove any existing opacity control points. /// - /// Note: n represents the length of the array, so ( n/2 == number of control points ) + /// Note: n represents the length of the array, so ( n/4 == number of control points ) /// - /// Note: This is provided as a interoperability method with VTK /// Will return false and not modify anything if n is <= 0 or ptr == nullptr bool FillOpacityTableFromDataPointer(vtkm::Int32 n, const float* ptr); diff --git a/vtkm/cont/ColorTablePresets.cxx b/vtkm/cont/ColorTablePresets.cxx new file mode 100644 index 000000000..486d9c7b7 --- /dev/null +++ b/vtkm/cont/ColorTablePresets.cxx @@ -0,0 +1,1394 @@ + +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS). +// Copyright 2015 UT-Battelle, LLC. +// Copyright 2015 Los Alamos National Security. +// +// Under the terms of Contract DE-NA0003525 with NTESS, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#include + +#include + +#include +#include +#include +#include + +namespace vtkm +{ +namespace cont +{ +namespace internal +{ + +static vtkm::cont::ColorTable::Preset DEFAULT_PRESET = vtkm::cont::ColorTable::Preset::VIRIDIS; + +std::string GetColorSpaceString(vtkm::cont::ColorSpace space) +{ + switch (space) + { + case vtkm::cont::ColorSpace::RGB: + return std::string("RGB"); + case vtkm::cont::ColorSpace::HSV: + return std::string("HSV"); + case vtkm::cont::ColorSpace::HSV_WRAP: + return std::string("HSV_WRAP"); + case vtkm::cont::ColorSpace::LAB: + return std::string("Lab"); + case vtkm::cont::ColorSpace::DIVERGING: + return std::string("Diverging"); + } + + throw vtkm::cont::ErrorBadValue("Encountered invalid color space."); +} + +vtkm::cont::ColorSpace GetColorSpaceEnum(const std::string& colorSpaceString) +{ + std::string spaceString = colorSpaceString; + + //convert to lower case + std::transform(spaceString.begin(), spaceString.end(), spaceString.begin(), [](char c) { + return static_cast(std::tolower(static_cast(c))); + }); + + if (spaceString == "rgb") + { + return vtkm::cont::ColorSpace::RGB; + } + + if (spaceString == "hsv") + { + return vtkm::cont::ColorSpace::HSV; + } + + if ((spaceString == "hsv_wrap") || (spaceString == "hsv-wrap") || (spaceString == "hsvwrap")) + { + return vtkm::cont::ColorSpace::HSV_WRAP; + } + + if (spaceString == "lab") + { + return vtkm::cont::ColorSpace::LAB; + } + + if (spaceString == "diverging") + { + return vtkm::cont::ColorSpace::DIVERGING; + } + + std::stringstream message; + message << "Invalid color space name: '" << colorSpaceString << "'"; + throw vtkm::cont::ErrorBadValue(message.str()); +} +} +} +} // vtkm::cont::internal + +namespace +{ + +bool IStringEqual(const std::string& str1, const std::string& str2) +{ + if (str1.size() != str2.size()) + { + return false; + } + + auto itr1 = str1.begin(); + auto itr2 = str2.begin(); + while ((itr1 != str1.end()) && (itr2 != str2.end())) + { + if (std::tolower(*itr1) != std::tolower(*itr2)) + { + return false; + } + ++itr1; + ++itr2; + } + + return true; +} + +VTKM_CONT const std::vector> +GetColorTablePresetsVector() +{ + using PresetPair = std::pair; + + // clang-format off + static std::vector presets = { + PresetPair{ vtkm::cont::ColorTable::Preset::COOL_TO_WARM, { + "Cool to Warm", + vtkm::cont::ColorSpace::DIVERGING, + { 1, 1, 0 }, + { + 0, 0.23137254902, 0.298039215686, 0.752941176471, + 0.5, 0.865, 0.865, 0.865, + 1, 0.705882352941, 0.0156862745098, 0.149019607843 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::COOL_TO_WARM_EXTENDED, { + "Cool to Warm Extended", + vtkm::cont::ColorSpace::LAB, + { 0.25, 0, 0 }, + { + 0, 0, 0, 0.34902, + 0.03125, 0.039216, 0.062745, 0.380392, + 0.0625, 0.062745, 0.117647, 0.411765, + 0.09375, 0.090196, 0.184314, 0.45098, + 0.125, 0.12549, 0.262745, 0.501961, + 0.15625, 0.160784, 0.337255, 0.541176, + 0.1875, 0.2, 0.396078, 0.568627, + 0.21875, 0.239216, 0.454902, 0.6, + 0.25, 0.286275, 0.5215689999999999, 0.65098, + 0.28125, 0.337255, 0.592157, 0.7019609999999999, + 0.3125, 0.388235, 0.654902, 0.74902, + 0.34375, 0.466667, 0.737255, 0.819608, + 0.375, 0.572549, 0.819608, 0.878431, + 0.40625, 0.654902, 0.866667, 0.9098039999999999, + 0.4375, 0.752941, 0.917647, 0.941176, + 0.46875, 0.823529, 0.956863, 0.968627, + 0.48, 0.988235, 0.960784, 0.901961, + 0.5, 0.941176, 0.984314, 0.988235, + 0.52, 0.988235, 0.945098, 0.85098, + 0.54, 0.980392, 0.898039, 0.784314, + 0.5625, 0.968627, 0.835294, 0.698039, + 0.59375, 0.94902, 0.733333, 0.588235, + 0.625, 0.929412, 0.65098, 0.509804, + 0.65625, 0.9098039999999999, 0.564706, 0.435294, + 0.6875, 0.878431, 0.458824, 0.352941, + 0.71875, 0.839216, 0.388235, 0.286275, + 0.75, 0.760784, 0.294118, 0.211765, + 0.78125, 0.7019609999999999, 0.211765, 0.168627, + 0.8125, 0.65098, 0.156863, 0.129412, + 0.84375, 0.6, 0.09411799999999999, 0.09411799999999999, + 0.875, 0.54902, 0.066667, 0.098039, + 0.90625, 0.501961, 0.05098, 0.12549, + 0.9375, 0.45098, 0.054902, 0.172549, + 0.96875, 0.4, 0.054902, 0.192157, + 1, 0.34902, 0.070588, 0.211765 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::VIRIDIS, { + "Viridis", + vtkm::cont::ColorSpace::LAB, + { 1, 0, 0 }, + { + 0.000000, 0.282365, 0.000000, 0.331010, + 0.003922, 0.284420, 0.000000, 0.337034, + 0.007843, 0.286409, 0.000000, 0.343000, + 0.011765, 0.288328, 0.000000, 0.348901, + 0.015686, 0.290179, 0.002655, 0.354738, + 0.019608, 0.291960, 0.007928, 0.360509, + 0.023529, 0.293673, 0.013524, 0.366211, + 0.027451, 0.295315, 0.019447, 0.371842, + 0.031373, 0.296886, 0.025709, 0.377403, + 0.035294, 0.298386, 0.032320, 0.382889, + 0.039216, 0.299816, 0.039285, 0.388299, + 0.043137, 0.301173, 0.046264, 0.393634, + 0.047059, 0.302457, 0.052924, 0.398888, + 0.050980, 0.303670, 0.059348, 0.404063, + 0.054902, 0.304808, 0.065577, 0.409155, + 0.058824, 0.305873, 0.071647, 0.414162, + 0.062745, 0.306864, 0.077587, 0.419085, + 0.066667, 0.307780, 0.083418, 0.423920, + 0.070588, 0.308622, 0.089155, 0.428668, + 0.074510, 0.309391, 0.094811, 0.433324, + 0.078431, 0.310084, 0.100399, 0.437890, + 0.082353, 0.310702, 0.105925, 0.442363, + 0.086275, 0.311245, 0.111399, 0.446742, + 0.090196, 0.311714, 0.116827, 0.451026, + 0.094118, 0.312107, 0.122211, 0.455214, + 0.098039, 0.312426, 0.127560, 0.459306, + 0.101961, 0.312671, 0.132872, 0.463299, + 0.105882, 0.312843, 0.138154, 0.467195, + 0.109804, 0.312940, 0.143406, 0.470991, + 0.113725, 0.312965, 0.148633, 0.474688, + 0.117647, 0.312917, 0.153833, 0.478285, + 0.121569, 0.312798, 0.159008, 0.481782, + 0.125490, 0.312608, 0.164161, 0.485180, + 0.129412, 0.312348, 0.169292, 0.488476, + 0.133333, 0.312019, 0.174400, 0.491673, + 0.137255, 0.311623, 0.179486, 0.494771, + 0.141176, 0.311160, 0.184552, 0.497771, + 0.145098, 0.310631, 0.189596, 0.500670, + 0.149020, 0.310039, 0.194618, 0.503474, + 0.152941, 0.309384, 0.199620, 0.506180, + 0.156863, 0.308668, 0.204600, 0.508790, + 0.160784, 0.307893, 0.209559, 0.511307, + 0.164706, 0.307059, 0.214495, 0.513729, + 0.168627, 0.306170, 0.219410, 0.516061, + 0.172549, 0.305227, 0.224301, 0.518300, + 0.176471, 0.304231, 0.229170, 0.520452, + 0.180392, 0.303184, 0.234016, 0.522516, + 0.184314, 0.302089, 0.238839, 0.524495, + 0.188235, 0.300947, 0.243638, 0.526391, + 0.192157, 0.299761, 0.248411, 0.528205, + 0.196078, 0.298533, 0.253162, 0.529941, + 0.200000, 0.297265, 0.257887, 0.531597, + 0.203922, 0.295958, 0.262587, 0.533179, + 0.207843, 0.294614, 0.267264, 0.534688, + 0.211765, 0.293235, 0.271914, 0.536125, + 0.215686, 0.291826, 0.276540, 0.537494, + 0.219608, 0.290387, 0.281138, 0.538796, + 0.223529, 0.288920, 0.285713, 0.540035, + 0.227451, 0.287426, 0.290261, 0.541210, + 0.231373, 0.285909, 0.294783, 0.542327, + 0.235294, 0.284368, 0.299280, 0.543386, + 0.239216, 0.282809, 0.303752, 0.544390, + 0.243137, 0.281231, 0.308199, 0.545341, + 0.247059, 0.279638, 0.312619, 0.546241, + 0.250980, 0.278029, 0.317015, 0.547093, + 0.254902, 0.276409, 0.321385, 0.547898, + 0.258824, 0.274776, 0.325732, 0.548659, + 0.262745, 0.273134, 0.330055, 0.549377, + 0.266667, 0.271483, 0.334353, 0.550054, + 0.270588, 0.269825, 0.338628, 0.550693, + 0.274510, 0.268163, 0.342880, 0.551296, + 0.278431, 0.266495, 0.347108, 0.551862, + 0.282353, 0.264825, 0.351315, 0.552396, + 0.286275, 0.263153, 0.355500, 0.552898, + 0.290196, 0.261479, 0.359663, 0.553371, + 0.294118, 0.259807, 0.363805, 0.553816, + 0.298039, 0.258135, 0.367927, 0.554233, + 0.301961, 0.256465, 0.372028, 0.554624, + 0.305882, 0.254797, 0.376110, 0.554992, + 0.309804, 0.253132, 0.380174, 0.555335, + 0.313725, 0.251469, 0.384220, 0.555658, + 0.317647, 0.249809, 0.388247, 0.555959, + 0.321569, 0.248155, 0.392257, 0.556239, + 0.325490, 0.246503, 0.396251, 0.556502, + 0.329412, 0.244855, 0.400228, 0.556746, + 0.333333, 0.243211, 0.404192, 0.556972, + 0.337255, 0.241572, 0.408139, 0.557182, + 0.341176, 0.239935, 0.412074, 0.557375, + 0.345098, 0.238302, 0.415994, 0.557553, + 0.349020, 0.236673, 0.419902, 0.557716, + 0.352941, 0.235045, 0.423797, 0.557863, + 0.356863, 0.233418, 0.427681, 0.557997, + 0.360784, 0.231794, 0.431554, 0.558116, + 0.364706, 0.230171, 0.435415, 0.558221, + 0.368627, 0.228546, 0.439268, 0.558311, + 0.372549, 0.226922, 0.443110, 0.558388, + 0.376471, 0.225295, 0.446944, 0.558451, + 0.380392, 0.223665, 0.450770, 0.558500, + 0.384314, 0.222033, 0.454588, 0.558534, + 0.388235, 0.220396, 0.458399, 0.558554, + 0.392157, 0.218753, 0.462203, 0.558560, + 0.396078, 0.217104, 0.466001, 0.558549, + 0.400000, 0.215446, 0.469793, 0.558524, + 0.403922, 0.213781, 0.473580, 0.558483, + 0.407843, 0.212104, 0.477363, 0.558425, + 0.411765, 0.210417, 0.481140, 0.558349, + 0.415686, 0.208716, 0.484915, 0.558255, + 0.419608, 0.207003, 0.488686, 0.558143, + 0.423529, 0.205274, 0.492454, 0.558012, + 0.427451, 0.203530, 0.496219, 0.557860, + 0.431373, 0.201769, 0.499982, 0.557687, + 0.435294, 0.199991, 0.503743, 0.557493, + 0.439216, 0.198194, 0.507502, 0.557276, + 0.443137, 0.196379, 0.511261, 0.557038, + 0.447059, 0.194544, 0.515016, 0.556774, + 0.450980, 0.192688, 0.518773, 0.556484, + 0.454902, 0.190810, 0.522528, 0.556167, + 0.458824, 0.188910, 0.526283, 0.555823, + 0.462745, 0.186988, 0.530037, 0.555451, + 0.466667, 0.185044, 0.533791, 0.555049, + 0.470588, 0.183077, 0.537546, 0.554615, + 0.474510, 0.181088, 0.541301, 0.554149, + 0.478431, 0.179079, 0.545056, 0.553651, + 0.482353, 0.177049, 0.548812, 0.553119, + 0.486275, 0.174998, 0.552566, 0.552552, + 0.490196, 0.172927, 0.556324, 0.551947, + 0.494118, 0.170840, 0.560080, 0.551306, + 0.498039, 0.168735, 0.563837, 0.550623, + 0.501961, 0.166618, 0.567594, 0.549902, + 0.505882, 0.164487, 0.571352, 0.549138, + 0.509804, 0.162350, 0.575110, 0.548333, + 0.513725, 0.160207, 0.578868, 0.547483, + 0.517647, 0.158063, 0.582626, 0.546589, + 0.521569, 0.155921, 0.586383, 0.545648, + 0.525490, 0.153785, 0.590141, 0.544660, + 0.529412, 0.151663, 0.593898, 0.543623, + 0.533333, 0.149559, 0.597654, 0.542537, + 0.537255, 0.147482, 0.601409, 0.541399, + 0.541176, 0.145437, 0.605164, 0.540211, + 0.545098, 0.143435, 0.608916, 0.538969, + 0.549020, 0.141481, 0.612666, 0.537672, + 0.552941, 0.139587, 0.616416, 0.536320, + 0.556863, 0.137764, 0.620162, 0.534912, + 0.560784, 0.136021, 0.623907, 0.533446, + 0.564706, 0.134373, 0.627646, 0.531922, + 0.568627, 0.132832, 0.631384, 0.530340, + 0.572549, 0.131411, 0.635118, 0.528696, + 0.576471, 0.130126, 0.638847, 0.526991, + 0.580392, 0.128989, 0.642573, 0.525224, + 0.584314, 0.128018, 0.646291, 0.523393, + 0.588235, 0.127226, 0.650007, 0.521498, + 0.592157, 0.126631, 0.653715, 0.519538, + 0.596078, 0.126247, 0.657418, 0.517513, + 0.600000, 0.126090, 0.661113, 0.515421, + 0.603922, 0.126173, 0.664801, 0.513261, + 0.607843, 0.126511, 0.668482, 0.511032, + 0.611765, 0.127115, 0.672154, 0.508735, + 0.615686, 0.127996, 0.675818, 0.506368, + 0.619608, 0.129165, 0.679471, 0.503931, + 0.623529, 0.130627, 0.683115, 0.501422, + 0.627451, 0.132388, 0.686749, 0.498842, + 0.631373, 0.134453, 0.690371, 0.496189, + 0.635294, 0.136823, 0.693984, 0.493462, + 0.639216, 0.139497, 0.697583, 0.490663, + 0.643137, 0.142475, 0.701170, 0.487789, + 0.647059, 0.145750, 0.704743, 0.484839, + 0.650980, 0.149322, 0.708303, 0.481814, + 0.654902, 0.153179, 0.711848, 0.478714, + 0.658824, 0.157319, 0.715379, 0.475537, + 0.662745, 0.161731, 0.718894, 0.472282, + 0.666667, 0.166406, 0.722392, 0.468952, + 0.670588, 0.171339, 0.725874, 0.465543, + 0.674510, 0.176516, 0.729338, 0.462055, + 0.678431, 0.181930, 0.732785, 0.458488, + 0.682353, 0.187571, 0.736212, 0.454843, + 0.686275, 0.193430, 0.739620, 0.451118, + 0.690196, 0.199499, 0.743009, 0.447313, + 0.694118, 0.205768, 0.746376, 0.443429, + 0.698039, 0.212229, 0.749723, 0.439464, + 0.701961, 0.218873, 0.753047, 0.435418, + 0.705882, 0.225697, 0.756350, 0.431288, + 0.709804, 0.232688, 0.759629, 0.427079, + 0.713725, 0.239844, 0.762884, 0.422786, + 0.717647, 0.247154, 0.766113, 0.418413, + 0.721569, 0.254613, 0.769318, 0.413957, + 0.725490, 0.262219, 0.772499, 0.409418, + 0.729412, 0.269963, 0.775651, 0.404798, + 0.733333, 0.277841, 0.778778, 0.400093, + 0.737255, 0.285848, 0.781876, 0.395304, + 0.741176, 0.293982, 0.784946, 0.390430, + 0.745098, 0.302235, 0.787986, 0.385473, + 0.749020, 0.310604, 0.790996, 0.380433, + 0.752941, 0.319087, 0.793977, 0.375306, + 0.756863, 0.327678, 0.796926, 0.370097, + 0.760784, 0.336377, 0.799844, 0.364801, + 0.764706, 0.345176, 0.802729, 0.359421, + 0.768627, 0.354077, 0.805582, 0.353955, + 0.772549, 0.363073, 0.808400, 0.348403, + 0.776471, 0.372164, 0.811185, 0.342764, + 0.780392, 0.381348, 0.813934, 0.337038, + 0.784314, 0.390618, 0.816649, 0.331226, + 0.788235, 0.399977, 0.819328, 0.325327, + 0.792157, 0.409416, 0.821970, 0.319343, + 0.796078, 0.418938, 0.824575, 0.313270, + 0.800000, 0.428536, 0.827143, 0.307111, + 0.803922, 0.438211, 0.829672, 0.300864, + 0.807843, 0.447962, 0.832163, 0.294529, + 0.811765, 0.457781, 0.834615, 0.288107, + 0.815686, 0.467673, 0.837028, 0.281595, + 0.819608, 0.477629, 0.839401, 0.274994, + 0.823529, 0.487652, 0.841734, 0.268302, + 0.827451, 0.497734, 0.844026, 0.261524, + 0.831373, 0.507875, 0.846277, 0.254656, + 0.835294, 0.518075, 0.848489, 0.247699, + 0.839216, 0.528326, 0.850659, 0.240654, + 0.843137, 0.538631, 0.852787, 0.233518, + 0.847059, 0.548980, 0.854874, 0.226296, + 0.850980, 0.559379, 0.856921, 0.218982, + 0.854902, 0.569817, 0.858926, 0.211584, + 0.858824, 0.580295, 0.860890, 0.204098, + 0.862745, 0.590812, 0.862814, 0.196523, + 0.866667, 0.601358, 0.864697, 0.188865, + 0.870588, 0.611937, 0.866540, 0.181121, + 0.874510, 0.622540, 0.868342, 0.173299, + 0.878431, 0.633168, 0.870107, 0.165395, + 0.882353, 0.643813, 0.871833, 0.157419, + 0.886275, 0.654473, 0.873520, 0.149372, + 0.890196, 0.665146, 0.875172, 0.141258, + 0.894118, 0.675826, 0.876787, 0.133092, + 0.898039, 0.686512, 0.878368, 0.124877, + 0.901961, 0.697194, 0.879914, 0.116633, + 0.905882, 0.707875, 0.881428, 0.108374, + 0.909804, 0.718544, 0.882912, 0.100128, + 0.913725, 0.729204, 0.884366, 0.091925, + 0.917647, 0.739843, 0.885791, 0.083809, + 0.921569, 0.750463, 0.887190, 0.075839, + 0.925490, 0.761059, 0.888564, 0.068090, + 0.929412, 0.771623, 0.889915, 0.060670, + 0.933333, 0.782158, 0.891245, 0.053712, + 0.937255, 0.792653, 0.892555, 0.047401, + 0.941176, 0.803110, 0.893849, 0.041954, + 0.945098, 0.813520, 0.895127, 0.037646, + 0.949020, 0.823881, 0.896392, 0.034853, + 0.952941, 0.834195, 0.897645, 0.033643, + 0.956863, 0.844452, 0.898890, 0.034045, + 0.960784, 0.854656, 0.900126, 0.036086, + 0.964706, 0.864796, 0.901358, 0.039789, + 0.968627, 0.874877, 0.902586, 0.044954, + 0.972549, 0.884886, 0.903815, 0.051230, + 0.976471, 0.894827, 0.905045, 0.058381, + 0.980392, 0.904703, 0.906278, 0.066206, + 0.984314, 0.914506, 0.907515, 0.074535, + 0.988235, 0.924240, 0.908760, 0.083251, + 0.992157, 0.933899, 0.910011, 0.092252, + 0.996078, 0.943486, 0.911273, 0.101474, + 1.000000, 0.952999, 0.912545, 0.110859 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::INFERNO, { + "Inferno", + vtkm::cont::ColorSpace::LAB, + { 0, 1, 0 }, + { + 0.000000, 0.002811, 0.000240, 0.013985, + 0.003922, 0.004020, 0.000978, 0.018723, + 0.007843, 0.005536, 0.001879, 0.024433, + 0.011765, 0.007352, 0.002929, 0.031151, + 0.015686, 0.009463, 0.004122, 0.038857, + 0.019608, 0.011875, 0.005444, 0.047160, + 0.023529, 0.014599, 0.006883, 0.055493, + 0.027451, 0.017636, 0.008432, 0.063834, + 0.031373, 0.021018, 0.010066, 0.072261, + 0.035294, 0.024744, 0.011784, 0.080708, + 0.039216, 0.028838, 0.013567, 0.089220, + 0.043137, 0.033326, 0.015396, 0.097809, + 0.047059, 0.038216, 0.017268, 0.106440, + 0.050980, 0.043431, 0.019155, 0.115162, + 0.054902, 0.048694, 0.021041, 0.123968, + 0.058824, 0.054003, 0.022919, 0.132833, + 0.062745, 0.059374, 0.024768, 0.141775, + 0.066667, 0.064826, 0.026549, 0.150830, + 0.070588, 0.070350, 0.028264, 0.159955, + 0.074510, 0.075950, 0.029888, 0.169149, + 0.078431, 0.081638, 0.031404, 0.178413, + 0.082353, 0.087425, 0.032773, 0.187768, + 0.086275, 0.093316, 0.033979, 0.197196, + 0.090196, 0.099308, 0.035007, 0.206680, + 0.094118, 0.105402, 0.035836, 0.216206, + 0.098039, 0.111606, 0.036445, 0.225770, + 0.101961, 0.117917, 0.036814, 0.235353, + 0.105882, 0.124337, 0.036928, 0.244940, + 0.109804, 0.130862, 0.036774, 0.254505, + 0.113725, 0.137489, 0.036346, 0.264028, + 0.117647, 0.144209, 0.035642, 0.273476, + 0.121569, 0.151015, 0.034667, 0.282818, + 0.125490, 0.157897, 0.033434, 0.292024, + 0.129412, 0.164838, 0.031965, 0.301050, + 0.133333, 0.171827, 0.030286, 0.309867, + 0.137255, 0.178847, 0.028428, 0.318436, + 0.141176, 0.185884, 0.026431, 0.326728, + 0.145098, 0.192914, 0.024350, 0.334702, + 0.149020, 0.199922, 0.022234, 0.342333, + 0.152941, 0.206897, 0.020130, 0.349604, + 0.156863, 0.213821, 0.018086, 0.356495, + 0.160784, 0.220686, 0.016148, 0.363003, + 0.164706, 0.227481, 0.014356, 0.369119, + 0.168627, 0.234204, 0.012742, 0.374850, + 0.172549, 0.240846, 0.011335, 0.380201, + 0.176471, 0.247410, 0.010157, 0.385183, + 0.180392, 0.253892, 0.009227, 0.389814, + 0.184314, 0.260296, 0.008549, 0.394106, + 0.188235, 0.266628, 0.008129, 0.398080, + 0.192157, 0.272888, 0.007968, 0.401753, + 0.196078, 0.279083, 0.008063, 0.405142, + 0.200000, 0.285215, 0.008411, 0.408265, + 0.203922, 0.291291, 0.009007, 0.411141, + 0.207843, 0.297313, 0.009846, 0.413787, + 0.211765, 0.303288, 0.010914, 0.416217, + 0.215686, 0.309221, 0.012204, 0.418447, + 0.219608, 0.315115, 0.013705, 0.420488, + 0.223529, 0.320976, 0.015407, 0.422355, + 0.227451, 0.326807, 0.017302, 0.424057, + 0.231373, 0.332610, 0.019380, 0.425607, + 0.235294, 0.338393, 0.021633, 0.427012, + 0.239216, 0.344154, 0.024053, 0.428283, + 0.243137, 0.349899, 0.026629, 0.429427, + 0.247059, 0.355628, 0.029355, 0.430449, + 0.250980, 0.361347, 0.032224, 0.431359, + 0.254902, 0.367053, 0.035231, 0.432159, + 0.258824, 0.372753, 0.038366, 0.432856, + 0.262745, 0.378447, 0.041596, 0.433456, + 0.266667, 0.384136, 0.044789, 0.433960, + 0.270588, 0.389823, 0.047945, 0.434374, + 0.274510, 0.395506, 0.051063, 0.434700, + 0.278431, 0.401190, 0.054146, 0.434944, + 0.282353, 0.406873, 0.057192, 0.435105, + 0.286275, 0.412556, 0.060200, 0.435186, + 0.290196, 0.418244, 0.063171, 0.435189, + 0.294118, 0.423933, 0.066107, 0.435115, + 0.298039, 0.429627, 0.069009, 0.434966, + 0.301961, 0.435324, 0.071876, 0.434744, + 0.305882, 0.441027, 0.074713, 0.434448, + 0.309804, 0.446734, 0.077518, 0.434082, + 0.313725, 0.452446, 0.080294, 0.433643, + 0.317647, 0.458163, 0.083041, 0.433136, + 0.321569, 0.463886, 0.085764, 0.432561, + 0.325490, 0.469615, 0.088461, 0.431915, + 0.329412, 0.475348, 0.091135, 0.431200, + 0.333333, 0.481090, 0.093787, 0.430416, + 0.337255, 0.486835, 0.096419, 0.429563, + 0.341176, 0.492588, 0.099031, 0.428643, + 0.345098, 0.498345, 0.101627, 0.427653, + 0.349020, 0.504107, 0.104208, 0.426596, + 0.352941, 0.509877, 0.106775, 0.425470, + 0.356863, 0.515649, 0.109331, 0.424277, + 0.360784, 0.521427, 0.111876, 0.423015, + 0.364706, 0.527209, 0.114411, 0.421684, + 0.368627, 0.532995, 0.116940, 0.420283, + 0.372549, 0.538784, 0.119463, 0.418815, + 0.376471, 0.544575, 0.121981, 0.417278, + 0.380392, 0.550371, 0.124499, 0.415673, + 0.384314, 0.556168, 0.127015, 0.413999, + 0.388235, 0.561966, 0.129533, 0.412255, + 0.392157, 0.567765, 0.132054, 0.410442, + 0.396078, 0.573565, 0.134579, 0.408560, + 0.400000, 0.579364, 0.137111, 0.406610, + 0.403922, 0.585160, 0.139652, 0.404592, + 0.407843, 0.590957, 0.142202, 0.402505, + 0.411765, 0.596750, 0.144764, 0.400348, + 0.415686, 0.602540, 0.147340, 0.398122, + 0.419608, 0.608325, 0.149932, 0.395828, + 0.423529, 0.614106, 0.152540, 0.393466, + 0.427451, 0.619879, 0.155168, 0.391037, + 0.431373, 0.625645, 0.157816, 0.388541, + 0.435294, 0.631405, 0.160488, 0.385978, + 0.439216, 0.637154, 0.163184, 0.383348, + 0.443137, 0.642895, 0.165908, 0.380651, + 0.447059, 0.648623, 0.168659, 0.377888, + 0.450980, 0.654340, 0.171441, 0.375059, + 0.454902, 0.660043, 0.174256, 0.372167, + 0.458824, 0.665731, 0.177104, 0.369210, + 0.462745, 0.671404, 0.179990, 0.366190, + 0.466667, 0.677059, 0.182912, 0.363108, + 0.470588, 0.682698, 0.185876, 0.359964, + 0.474510, 0.688315, 0.188880, 0.356760, + 0.478431, 0.693913, 0.191930, 0.353495, + 0.482353, 0.699488, 0.195023, 0.350170, + 0.486275, 0.705039, 0.198164, 0.346788, + 0.490196, 0.710566, 0.201354, 0.343346, + 0.494118, 0.716067, 0.204595, 0.339851, + 0.498039, 0.721540, 0.207889, 0.336298, + 0.501961, 0.726982, 0.211236, 0.332694, + 0.505882, 0.732396, 0.214641, 0.329035, + 0.509804, 0.737776, 0.218102, 0.325327, + 0.513725, 0.743124, 0.221622, 0.321566, + 0.517647, 0.748435, 0.225202, 0.317759, + 0.521569, 0.753709, 0.228845, 0.313903, + 0.525490, 0.758947, 0.232551, 0.309999, + 0.529412, 0.764143, 0.236321, 0.306051, + 0.533333, 0.769299, 0.240159, 0.302058, + 0.537255, 0.774410, 0.244061, 0.298022, + 0.541176, 0.779479, 0.248033, 0.293944, + 0.545098, 0.784499, 0.252073, 0.289827, + 0.549020, 0.789472, 0.256184, 0.285671, + 0.552941, 0.794397, 0.260365, 0.281477, + 0.556863, 0.799270, 0.264618, 0.277247, + 0.560784, 0.804091, 0.268943, 0.272981, + 0.564706, 0.808858, 0.273340, 0.268682, + 0.568627, 0.813569, 0.277812, 0.264350, + 0.572549, 0.818223, 0.282356, 0.259986, + 0.576471, 0.822819, 0.286973, 0.255592, + 0.580392, 0.827356, 0.291665, 0.251167, + 0.584314, 0.831831, 0.296431, 0.246714, + 0.588235, 0.836244, 0.301271, 0.242232, + 0.592157, 0.840592, 0.306184, 0.237723, + 0.596078, 0.844875, 0.311172, 0.233186, + 0.600000, 0.849092, 0.316232, 0.228623, + 0.603922, 0.853241, 0.321365, 0.224036, + 0.607843, 0.857322, 0.326571, 0.219421, + 0.611765, 0.861332, 0.331849, 0.214781, + 0.615686, 0.865271, 0.337198, 0.210114, + 0.619608, 0.869139, 0.342617, 0.205424, + 0.623529, 0.872933, 0.348106, 0.200706, + 0.627451, 0.876653, 0.353664, 0.195963, + 0.631373, 0.880298, 0.359289, 0.191193, + 0.635294, 0.883868, 0.364983, 0.186395, + 0.639216, 0.887360, 0.370741, 0.181568, + 0.643137, 0.890777, 0.376566, 0.176712, + 0.647059, 0.894115, 0.382453, 0.171827, + 0.650980, 0.897374, 0.388404, 0.166908, + 0.654902, 0.900554, 0.394415, 0.161957, + 0.658824, 0.903654, 0.400487, 0.156971, + 0.662745, 0.906675, 0.406619, 0.151946, + 0.666667, 0.909613, 0.412807, 0.146884, + 0.670588, 0.912472, 0.419054, 0.141780, + 0.674510, 0.915247, 0.425355, 0.136631, + 0.678431, 0.917942, 0.431711, 0.131436, + 0.682353, 0.920553, 0.438119, 0.126193, + 0.686275, 0.923082, 0.444578, 0.120898, + 0.690196, 0.925528, 0.451090, 0.115546, + 0.694118, 0.927890, 0.457650, 0.110136, + 0.698039, 0.930168, 0.464258, 0.104662, + 0.701961, 0.932363, 0.470913, 0.099123, + 0.705882, 0.934474, 0.477614, 0.093511, + 0.709804, 0.936499, 0.484358, 0.087827, + 0.713725, 0.938441, 0.491147, 0.082061, + 0.717647, 0.940296, 0.497977, 0.076213, + 0.721569, 0.942067, 0.504847, 0.070277, + 0.725490, 0.943753, 0.511761, 0.064247, + 0.729412, 0.945353, 0.518711, 0.058121, + 0.733333, 0.946868, 0.525700, 0.051891, + 0.737255, 0.948296, 0.532725, 0.045561, + 0.741176, 0.949638, 0.539788, 0.039112, + 0.745098, 0.950894, 0.546885, 0.032904, + 0.749020, 0.952063, 0.554014, 0.027232, + 0.752941, 0.953146, 0.561180, 0.022116, + 0.756863, 0.954141, 0.568376, 0.017577, + 0.760784, 0.955050, 0.575606, 0.013637, + 0.764706, 0.955870, 0.582863, 0.010319, + 0.768627, 0.956603, 0.590153, 0.007648, + 0.772549, 0.957248, 0.597469, 0.005654, + 0.776471, 0.957805, 0.604815, 0.004365, + 0.780392, 0.958273, 0.612188, 0.003815, + 0.784314, 0.958652, 0.619587, 0.004038, + 0.788235, 0.958943, 0.627014, 0.005073, + 0.792157, 0.959145, 0.634463, 0.006958, + 0.796078, 0.959257, 0.641939, 0.009737, + 0.800000, 0.959280, 0.649436, 0.013457, + 0.803922, 0.959213, 0.656956, 0.018167, + 0.807843, 0.959056, 0.664501, 0.023921, + 0.811765, 0.958809, 0.672065, 0.030778, + 0.815686, 0.958472, 0.679650, 0.038798, + 0.819608, 0.958045, 0.687253, 0.047546, + 0.823529, 0.957528, 0.694877, 0.056390, + 0.827451, 0.956920, 0.702516, 0.065327, + 0.831373, 0.956222, 0.710173, 0.074363, + 0.835294, 0.955435, 0.717847, 0.083501, + 0.839216, 0.954559, 0.725534, 0.092743, + 0.843137, 0.953590, 0.733239, 0.102098, + 0.847059, 0.952534, 0.740955, 0.111570, + 0.850980, 0.951389, 0.748682, 0.121171, + 0.854902, 0.950158, 0.756420, 0.130905, + 0.858824, 0.948842, 0.764165, 0.140781, + 0.862745, 0.947441, 0.771920, 0.150814, + 0.866667, 0.945960, 0.779677, 0.161006, + 0.870588, 0.944398, 0.787439, 0.171373, + 0.874510, 0.942762, 0.795201, 0.181922, + 0.878431, 0.941050, 0.802964, 0.192670, + 0.882353, 0.939264, 0.810723, 0.203628, + 0.886275, 0.937416, 0.818476, 0.214805, + 0.890196, 0.935511, 0.826218, 0.226217, + 0.894118, 0.933559, 0.833943, 0.237872, + 0.898039, 0.931563, 0.841653, 0.249795, + 0.901961, 0.929530, 0.849339, 0.262002, + 0.905882, 0.927483, 0.856995, 0.274501, + 0.909804, 0.925441, 0.864610, 0.287300, + 0.913725, 0.923403, 0.872186, 0.300443, + 0.917647, 0.921409, 0.879706, 0.313922, + 0.921569, 0.919491, 0.887156, 0.327744, + 0.925490, 0.917657, 0.894536, 0.341961, + 0.929412, 0.915970, 0.901821, 0.356535, + 0.933333, 0.914460, 0.909000, 0.371498, + 0.937255, 0.913186, 0.916052, 0.386828, + 0.941176, 0.912202, 0.922962, 0.402519, + 0.945098, 0.911571, 0.929705, 0.418535, + 0.949020, 0.911359, 0.936266, 0.434835, + 0.952941, 0.911627, 0.942627, 0.451365, + 0.956863, 0.912435, 0.948769, 0.468039, + 0.960784, 0.913828, 0.954687, 0.484788, + 0.964706, 0.915840, 0.960372, 0.501502, + 0.968627, 0.918481, 0.965832, 0.518121, + 0.972549, 0.921750, 0.971071, 0.534539, + 0.976471, 0.925625, 0.976103, 0.550703, + 0.980392, 0.930072, 0.980946, 0.566595, + 0.984314, 0.935053, 0.985619, 0.582103, + 0.988235, 0.940521, 0.990140, 0.597270, + 0.992157, 0.946429, 0.994526, 0.612080, + 0.996078, 0.952737, 0.998796, 0.626535, + 1.000000, 0.959400, 1.002963, 0.640626 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::PLASMA, { + "Plasma", + vtkm::cont::ColorSpace::LAB, + { 0, 1, 0 }, + { + 0.000000, 0.185001, 0.000000, 0.530073, + 0.003922, 0.191119, 0.000000, 0.535244, + 0.007843, 0.197129, 0.000000, 0.540150, + 0.011765, 0.203042, 0.000000, 0.544821, + 0.015686, 0.208873, 0.000000, 0.549286, + 0.019608, 0.214631, 0.000000, 0.553570, + 0.023529, 0.220322, 0.000000, 0.557689, + 0.027451, 0.225958, 0.000000, 0.561661, + 0.031373, 0.231550, 0.000000, 0.565505, + 0.035294, 0.237106, 0.000000, 0.569231, + 0.039216, 0.242629, 0.000000, 0.572851, + 0.043137, 0.248125, 0.000000, 0.576370, + 0.047059, 0.253596, 0.000000, 0.579799, + 0.050980, 0.259047, 0.000000, 0.583143, + 0.054902, 0.264480, 0.000000, 0.586406, + 0.058824, 0.269898, 0.000000, 0.589595, + 0.062745, 0.275304, 0.000000, 0.592712, + 0.066667, 0.280699, 0.000000, 0.595761, + 0.070588, 0.286086, 0.000000, 0.598745, + 0.074510, 0.291464, 0.000000, 0.601665, + 0.078431, 0.296835, 0.000000, 0.604524, + 0.082353, 0.302199, 0.000000, 0.607322, + 0.086275, 0.307559, 0.000000, 0.610060, + 0.090196, 0.312917, 0.000000, 0.612742, + 0.094118, 0.318270, 0.000000, 0.615364, + 0.098039, 0.323623, 0.000000, 0.617929, + 0.101961, 0.328971, 0.000000, 0.620434, + 0.105882, 0.334319, 0.000000, 0.622883, + 0.109804, 0.339664, 0.000000, 0.625272, + 0.113725, 0.345008, 0.000000, 0.627601, + 0.117647, 0.350348, 0.000000, 0.629871, + 0.121569, 0.355687, 0.000000, 0.632079, + 0.125490, 0.361026, 0.000000, 0.634226, + 0.129412, 0.366362, 0.000000, 0.636308, + 0.133333, 0.371696, 0.000000, 0.638327, + 0.137255, 0.377028, 0.000000, 0.640279, + 0.141176, 0.382358, 0.000000, 0.642163, + 0.145098, 0.387684, 0.000000, 0.643979, + 0.149020, 0.393006, 0.000000, 0.645723, + 0.152941, 0.398327, 0.000000, 0.647396, + 0.156863, 0.403643, 0.000000, 0.648995, + 0.160784, 0.408954, 0.000000, 0.650518, + 0.164706, 0.414260, 0.000000, 0.651964, + 0.168627, 0.419562, 0.000000, 0.653331, + 0.172549, 0.424856, 0.000000, 0.654617, + 0.176471, 0.430144, 0.000000, 0.655819, + 0.180392, 0.435427, 0.000000, 0.656938, + 0.184314, 0.440700, 0.000000, 0.657970, + 0.188235, 0.445966, 0.000000, 0.658913, + 0.192157, 0.451222, 0.000000, 0.659767, + 0.196078, 0.456470, 0.000000, 0.660529, + 0.200000, 0.461706, 0.000000, 0.661198, + 0.203922, 0.466931, 0.000000, 0.661772, + 0.207843, 0.472145, 0.000000, 0.662249, + 0.211765, 0.477346, 0.000000, 0.662629, + 0.215686, 0.482535, 0.000000, 0.662909, + 0.219608, 0.487709, 0.000000, 0.663088, + 0.223529, 0.492869, 0.000000, 0.663165, + 0.227451, 0.498013, 0.000000, 0.663138, + 0.231373, 0.503141, 0.000000, 0.663007, + 0.235294, 0.508253, 0.000000, 0.662771, + 0.239216, 0.513346, 0.000000, 0.662429, + 0.243137, 0.518422, 0.000000, 0.661980, + 0.247059, 0.523478, 0.000000, 0.661424, + 0.250980, 0.528514, 0.000000, 0.660760, + 0.254902, 0.533531, 0.000000, 0.659987, + 0.258824, 0.538524, 0.000000, 0.659106, + 0.262745, 0.543498, 0.000000, 0.658116, + 0.266667, 0.548448, 0.000000, 0.657020, + 0.270588, 0.553375, 0.000000, 0.655814, + 0.274510, 0.558277, 0.000000, 0.654502, + 0.278431, 0.563155, 0.000000, 0.653083, + 0.282353, 0.568008, 0.000000, 0.651560, + 0.286275, 0.572833, 0.000000, 0.649932, + 0.290196, 0.577634, 0.000000, 0.648200, + 0.294118, 0.582408, 0.000000, 0.646367, + 0.298039, 0.587153, 0.000000, 0.644433, + 0.301961, 0.591870, 0.000000, 0.642402, + 0.305882, 0.596560, 0.000000, 0.640273, + 0.309804, 0.601220, 0.000000, 0.638050, + 0.313725, 0.605851, 0.000000, 0.635735, + 0.317647, 0.610452, 0.000039, 0.633330, + 0.321569, 0.615023, 0.007472, 0.630837, + 0.325490, 0.619563, 0.015271, 0.628260, + 0.329412, 0.624072, 0.023435, 0.625602, + 0.333333, 0.628551, 0.031974, 0.622864, + 0.337255, 0.632999, 0.040877, 0.620051, + 0.341176, 0.637416, 0.049419, 0.617164, + 0.345098, 0.641800, 0.057377, 0.614209, + 0.349020, 0.646154, 0.064892, 0.611187, + 0.352941, 0.650476, 0.072057, 0.608100, + 0.356863, 0.654765, 0.078935, 0.604956, + 0.360784, 0.659025, 0.085579, 0.601753, + 0.364706, 0.663252, 0.092022, 0.598498, + 0.368627, 0.667448, 0.098296, 0.595192, + 0.372549, 0.671611, 0.104421, 0.591841, + 0.376471, 0.675743, 0.110416, 0.588447, + 0.380392, 0.679845, 0.116300, 0.585012, + 0.384314, 0.683916, 0.122080, 0.581540, + 0.388235, 0.687957, 0.127771, 0.578033, + 0.392157, 0.691965, 0.133378, 0.574497, + 0.396078, 0.695945, 0.138913, 0.570933, + 0.400000, 0.699894, 0.144379, 0.567344, + 0.403922, 0.703814, 0.149783, 0.563734, + 0.407843, 0.707704, 0.155133, 0.560102, + 0.411765, 0.711565, 0.160429, 0.556455, + 0.415686, 0.715397, 0.165678, 0.552792, + 0.419608, 0.719200, 0.170881, 0.549117, + 0.423529, 0.722976, 0.176044, 0.545432, + 0.427451, 0.726724, 0.181168, 0.541741, + 0.431373, 0.730444, 0.186255, 0.538043, + 0.435294, 0.734138, 0.191310, 0.534340, + 0.439216, 0.737804, 0.196333, 0.530637, + 0.443137, 0.741445, 0.201328, 0.526933, + 0.447059, 0.745059, 0.206294, 0.523230, + 0.450980, 0.748648, 0.211235, 0.519527, + 0.454902, 0.752210, 0.216152, 0.515831, + 0.458824, 0.755749, 0.221047, 0.512137, + 0.462745, 0.759263, 0.225921, 0.508450, + 0.466667, 0.762752, 0.230774, 0.504769, + 0.470588, 0.766217, 0.235612, 0.501093, + 0.474510, 0.769658, 0.240430, 0.497427, + 0.478431, 0.773077, 0.245235, 0.493770, + 0.482353, 0.776471, 0.250022, 0.490123, + 0.486275, 0.779843, 0.254797, 0.486487, + 0.490196, 0.783192, 0.259560, 0.482859, + 0.494118, 0.786518, 0.264310, 0.479242, + 0.498039, 0.789823, 0.269051, 0.475635, + 0.501961, 0.793105, 0.273782, 0.472039, + 0.505882, 0.796366, 0.278505, 0.468453, + 0.509804, 0.799603, 0.283218, 0.464878, + 0.513725, 0.802820, 0.287926, 0.461313, + 0.517647, 0.806016, 0.292627, 0.457761, + 0.521569, 0.809188, 0.297322, 0.454218, + 0.525490, 0.812341, 0.302013, 0.450686, + 0.529412, 0.815472, 0.306701, 0.447163, + 0.533333, 0.818583, 0.311387, 0.443650, + 0.537255, 0.821671, 0.316069, 0.440146, + 0.541176, 0.824737, 0.320750, 0.436650, + 0.545098, 0.827782, 0.325431, 0.433164, + 0.549020, 0.830806, 0.330110, 0.429688, + 0.552941, 0.833809, 0.334792, 0.426217, + 0.556863, 0.836790, 0.339474, 0.422755, + 0.560784, 0.839749, 0.344160, 0.419299, + 0.564706, 0.842685, 0.348848, 0.415849, + 0.568627, 0.845601, 0.353540, 0.412405, + 0.572549, 0.848493, 0.358235, 0.408967, + 0.576471, 0.851363, 0.362935, 0.405536, + 0.580392, 0.854210, 0.367641, 0.402107, + 0.584314, 0.857033, 0.372354, 0.398682, + 0.588235, 0.859835, 0.377073, 0.395260, + 0.592157, 0.862611, 0.381799, 0.391842, + 0.596078, 0.865364, 0.386535, 0.388425, + 0.600000, 0.868092, 0.391277, 0.385011, + 0.603922, 0.870795, 0.396030, 0.381598, + 0.607843, 0.873474, 0.400794, 0.378186, + 0.611765, 0.876127, 0.405566, 0.374775, + 0.615686, 0.878754, 0.410351, 0.371363, + 0.619608, 0.881353, 0.415146, 0.367950, + 0.623529, 0.883926, 0.419955, 0.364537, + 0.627451, 0.886471, 0.424776, 0.361122, + 0.631373, 0.888988, 0.429609, 0.357706, + 0.635294, 0.891477, 0.434458, 0.354287, + 0.639216, 0.893936, 0.439321, 0.350865, + 0.643137, 0.896366, 0.444200, 0.347440, + 0.647059, 0.898766, 0.449092, 0.344012, + 0.650980, 0.901135, 0.454002, 0.340580, + 0.654902, 0.903471, 0.458927, 0.337145, + 0.658824, 0.905776, 0.463869, 0.333704, + 0.662745, 0.908048, 0.468830, 0.330259, + 0.666667, 0.910286, 0.473807, 0.326809, + 0.670588, 0.912491, 0.478804, 0.323353, + 0.674510, 0.914661, 0.483819, 0.319892, + 0.678431, 0.916796, 0.488853, 0.316425, + 0.682353, 0.918893, 0.493907, 0.312952, + 0.686275, 0.920954, 0.498980, 0.309474, + 0.690196, 0.922978, 0.504074, 0.305987, + 0.694118, 0.924963, 0.509188, 0.302495, + 0.698039, 0.926910, 0.514324, 0.298996, + 0.701961, 0.928816, 0.519481, 0.295491, + 0.705882, 0.930683, 0.524661, 0.291979, + 0.709804, 0.932507, 0.529861, 0.288458, + 0.713725, 0.934290, 0.535084, 0.284930, + 0.717647, 0.936029, 0.540329, 0.281395, + 0.721569, 0.937724, 0.545597, 0.277854, + 0.725490, 0.939377, 0.550890, 0.274304, + 0.729412, 0.940984, 0.556204, 0.270748, + 0.733333, 0.942546, 0.561543, 0.267185, + 0.737255, 0.944059, 0.566904, 0.263615, + 0.741176, 0.945527, 0.572292, 0.260036, + 0.745098, 0.946945, 0.577702, 0.256450, + 0.749020, 0.948314, 0.583137, 0.252857, + 0.752941, 0.949633, 0.588597, 0.249258, + 0.756863, 0.950901, 0.594080, 0.245652, + 0.760784, 0.952119, 0.599591, 0.242040, + 0.764706, 0.953283, 0.605124, 0.238423, + 0.768627, 0.954396, 0.610684, 0.234800, + 0.772549, 0.955453, 0.616268, 0.231174, + 0.776471, 0.956456, 0.621877, 0.227544, + 0.780392, 0.957404, 0.627513, 0.223910, + 0.784314, 0.958293, 0.633175, 0.220271, + 0.788235, 0.959125, 0.638862, 0.216629, + 0.792157, 0.959898, 0.644575, 0.212987, + 0.796078, 0.960612, 0.650314, 0.209347, + 0.800000, 0.961266, 0.656078, 0.205707, + 0.803922, 0.961859, 0.661869, 0.202071, + 0.807843, 0.962389, 0.667686, 0.198439, + 0.811765, 0.962856, 0.673528, 0.194815, + 0.815686, 0.963259, 0.679397, 0.191199, + 0.819608, 0.963597, 0.685291, 0.187595, + 0.823529, 0.963869, 0.691214, 0.184003, + 0.827451, 0.964073, 0.697160, 0.180430, + 0.831373, 0.964209, 0.703132, 0.176878, + 0.835294, 0.964276, 0.709134, 0.173348, + 0.839216, 0.964272, 0.715159, 0.169847, + 0.843137, 0.964198, 0.721211, 0.166379, + 0.847059, 0.964050, 0.727289, 0.162950, + 0.850980, 0.963829, 0.733394, 0.159563, + 0.854902, 0.963533, 0.739524, 0.156228, + 0.858824, 0.963161, 0.745680, 0.152949, + 0.862745, 0.962713, 0.751862, 0.149735, + 0.866667, 0.962187, 0.758070, 0.146594, + 0.870588, 0.961582, 0.764304, 0.143534, + 0.874510, 0.960894, 0.770564, 0.140564, + 0.878431, 0.960123, 0.776851, 0.137691, + 0.882353, 0.959270, 0.783163, 0.134930, + 0.886275, 0.958333, 0.789499, 0.132294, + 0.890196, 0.957313, 0.795862, 0.129792, + 0.894118, 0.956206, 0.802248, 0.127440, + 0.898039, 0.955014, 0.808659, 0.125248, + 0.901961, 0.953730, 0.815096, 0.123223, + 0.905882, 0.952353, 0.821559, 0.121379, + 0.909804, 0.950887, 0.828044, 0.119731, + 0.913725, 0.949334, 0.834553, 0.118292, + 0.917647, 0.947687, 0.841084, 0.117066, + 0.921569, 0.945941, 0.847643, 0.116054, + 0.925490, 0.944103, 0.854223, 0.115271, + 0.929412, 0.942178, 0.860821, 0.114719, + 0.933333, 0.940143, 0.867449, 0.114377, + 0.937255, 0.938021, 0.874094, 0.114262, + 0.941176, 0.935800, 0.880762, 0.114347, + 0.945098, 0.933482, 0.887450, 0.114618, + 0.949020, 0.931072, 0.894156, 0.115054, + 0.952941, 0.928561, 0.900886, 0.115611, + 0.956863, 0.925959, 0.907631, 0.116256, + 0.960784, 0.923271, 0.914394, 0.116929, + 0.964706, 0.920482, 0.921176, 0.117546, + 0.968627, 0.917616, 0.927973, 0.118027, + 0.972549, 0.914677, 0.934779, 0.118242, + 0.976471, 0.911670, 0.941597, 0.118021, + 0.980392, 0.908607, 0.948424, 0.117125, + 0.984314, 0.905512, 0.955251, 0.115218, + 0.988235, 0.902422, 0.962073, 0.111795, + 0.992157, 0.899408, 0.968866, 0.106073, + 0.996078, 0.896560, 0.975612, 0.096681, + 1.000000, 0.894058, 0.982254, 0.081069 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::BLACK_BODY_RADIATION, { + "Black-Body Radiation", + vtkm::cont::ColorSpace::RGB, + { 0, 0.498039215686, 1 }, + { + 0, 0, 0, 0, + 0.4, 0.901960784314, 0, 0, + 0.8, 0.901960784314, 0.901960784314, 0, + 1, 1, 1, 1 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::X_RAY, { + "X Ray", + vtkm::cont::ColorSpace::RGB, + { 1, 0, 0 }, + { 0, 1, 1, 1, 1, 0, 0, 0 } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::GREEN, { + "Green", + vtkm::cont::ColorSpace::LAB, + { 0.25, 0, 0 }, + { + 0.00, 0.054902, 0.109804, 0.121569, + 0.05, 0.074510, 0.172549, 0.180392, + 0.10, 0.086275, 0.231373, 0.219608, + 0.15, 0.094118, 0.278431, 0.250980, + 0.20, 0.109804, 0.349020, 0.278431, + 0.25, 0.113725, 0.400000, 0.278431, + 0.30, 0.117647, 0.451000, 0.270588, + 0.35, 0.117647, 0.490196, 0.243137, + 0.40, 0.113725, 0.521569, 0.203922, + 0.45, 0.109804, 0.549020, 0.152941, + 0.50, 0.082353, 0.588235, 0.082353, + 0.55, 0.109804, 0.631373, 0.050980, + 0.60, 0.211765, 0.678431, 0.082353, + 0.65, 0.317647, 0.721569, 0.113725, + 0.70, 0.431373, 0.760784, 0.160784, + 0.75, 0.556863, 0.800000, 0.239216, + 0.80, 0.666667, 0.839216, 0.294118, + 0.85, 0.784314, 0.878431, 0.396078, + 0.90, 0.886275, 0.921569, 0.533333, + 0.95, 0.960784, 0.949020, 0.670588, + 1.00, 1.000000, 0.984314, 0.901961 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::BLACK_BLUE_WHITE, { + "Black - Blue - White", + vtkm::cont::ColorSpace::RGB, + { 1, 1, 0 }, + { + 0, 0, 0, 0, + 0.333, 0, 0, 0.501960784314, + 0.666, 0, 0.501960784314, 1, + 1, 1, 1, 1 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::BLUE_TO_ORANGE, { + "Blue to Orange", + vtkm::cont::ColorSpace::LAB, + { 0.25, 0, 0 }, + { + 0.000000, 0.086275, 0.003922, 0.298039, + 0.030334, 0.113725, 0.023529, 0.450980, + 0.055527, 0.105882, 0.050980, 0.509804, + 0.073008, 0.039216, 0.039216, 0.560784, + 0.089974, 0.031372, 0.098039, 0.600000, + 0.106427, 0.043137, 0.164706, 0.639216, + 0.130077, 0.054902, 0.243137, 0.678431, + 0.161440, 0.054902, 0.317647, 0.709804, + 0.200000, 0.050980, 0.396078, 0.741176, + 0.225000, 0.039216, 0.466667, 0.768627, + 0.250000, 0.031372, 0.537255, 0.788235, + 0.276093, 0.031372, 0.615686, 0.811765, + 0.302828, 0.023529, 0.709804, 0.831373, + 0.329563, 0.050980, 0.800000, 0.850980, + 0.351671, 0.070588, 0.854902, 0.870588, + 0.372237, 0.262745, 0.901961, 0.862745, + 0.390231, 0.423529, 0.941176, 0.874510, + 0.417995, 0.572549, 0.964706, 0.835294, + 0.436504, 0.658824, 0.980392, 0.843137, + 0.449871, 0.764706, 0.980392, 0.866667, + 0.464267, 0.827451, 0.980392, 0.886275, + 0.492545, 0.913725, 0.988235, 0.937255, + 0.501285, 1.000000, 1.000000, 0.972549, + 0.510026, 0.988235, 0.980392, 0.870588, + 0.522879, 0.992157, 0.972549, 0.803922, + 0.532648, 0.992157, 0.964706, 0.713725, + 0.549100, 0.988235, 0.956863, 0.643137, + 0.575321, 0.980392, 0.917647, 0.509804, + 0.597429, 0.968627, 0.874510, 0.407843, + 0.620051, 0.949020, 0.823529, 0.321569, + 0.636504, 0.929412, 0.776471, 0.278431, + 0.660668, 0.909804, 0.717647, 0.235294, + 0.682262, 0.890196, 0.658824, 0.196078, + 0.700000, 0.878431, 0.619608, 0.168627, + 0.725000, 0.870588, 0.549020, 0.156863, + 0.750000, 0.850980, 0.474510, 0.145098, + 0.775000, 0.831373, 0.411765, 0.133333, + 0.800000, 0.811765, 0.345098, 0.113725, + 0.825000, 0.788235, 0.266667, 0.094118, + 0.850000, 0.741176, 0.184314, 0.074510, + 0.875000, 0.690196, 0.125490, 0.062745, + 0.900000, 0.619608, 0.062745, 0.043137, + 0.923393, 0.549020, 0.027451, 0.070588, + 0.943959, 0.470588, 0.015686, 0.090196, + 0.967095, 0.400000, 0.003922, 0.101961, + 1.000000, 0.188235, 0.000000, 0.070588 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::GRAY_TO_RED, { + "Gray to Red", + vtkm::cont::ColorSpace::LAB, + { 0, 0.498039215686, 1 }, + { + 0.000000, 0.101961, 0.101961, 0.101961, + 0.062745, 0.227451, 0.227451, 0.227451, + 0.125490, 0.359939, 0.359939, 0.359939, + 0.188236, 0.502653, 0.502653, 0.502653, + 0.250981, 0.631373, 0.631373, 0.631373, + 0.313726, 0.749865, 0.749865, 0.749865, + 0.376471, 0.843368, 0.843368, 0.843368, + 0.439216, 0.926105, 0.926105, 0.926105, + 0.501961, 0.999846, 0.997232, 0.995694, + 0.564706, 0.994925, 0.908651, 0.857901, + 0.627451, 0.982468, 0.800692, 0.706113, + 0.690196, 0.960323, 0.667820, 0.536332, + 0.752941, 0.894579, 0.503806, 0.399769, + 0.815687, 0.817070, 0.332180, 0.281046, + 0.878432, 0.728489, 0.155017, 0.197386, + 0.941177, 0.576932, 0.055363, 0.149250, + 1.000000, 0.403922, 0.000000, 0.121569 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::COLD_AND_HOT, { + "Cold and Hot", + vtkm::cont::ColorSpace::RGB, + { 1, 1, 0 }, + { + 0, 0, 1, 1, + 0.45, 0, 0, 1, + 0.5, 0, 0, 0.501960784314, + 0.55, 1, 0, 0, + 1, 1, 1, 0 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::BLUE_GREEN_ORANGE, { + "Blue - Green - Orange", + vtkm::cont::ColorSpace::LAB, + { 0.25, 0.0, 0.0 }, + { + 0.0,0.831373,0.909804,0.980392, + 0.0125,0.74902,0.862745,0.960784, + 0.025,0.694118,0.827451,0.941176, + 0.05,0.568627,0.760784,0.921569, + 0.075,0.45098,0.705882,0.901961, + 0.1,0.345098,0.643137,0.858824, + 0.125,0.247059,0.572549,0.819608, + 0.15,0.180392,0.521569,0.780392, + 0.16,0.14902,0.490196,0.74902, + 0.18,0.129412,0.447059,0.709804, + 0.2,0.101961,0.427451,0.690196, + 0.21,0.094118,0.403922,0.658824, + 0.22,0.090196,0.392157,0.639216, + 0.23,0.082353,0.368627,0.619608, + 0.24,0.070588,0.352941,0.6, + 0.25,0.066667,0.329412,0.568627, + 0.26,0.07451,0.313725,0.541176, + 0.27,0.086275,0.305882,0.509804, + 0.28,0.094118,0.286275,0.478431, + 0.29,0.101961,0.278431,0.45098, + 0.3,0.109804,0.266667,0.411765, + 0.31,0.113725,0.258824,0.380392, + 0.32,0.113725,0.25098,0.34902, + 0.33,0.109804,0.266667,0.321569, + 0.34,0.105882,0.301961,0.262745, + 0.35,0.094118,0.309804,0.243137, + 0.36,0.082353,0.321569,0.227451, + 0.37,0.07451,0.341176,0.219608, + 0.38,0.070588,0.360784,0.211765, + 0.39,0.066667,0.380392,0.215686, + 0.4,0.062745,0.4,0.176471, + 0.425,0.07451,0.419608,0.145098, + 0.45,0.086275,0.439216,0.117647, + 0.475,0.121569,0.470588,0.117647, + 0.5,0.184314,0.501961,0.14902, + 0.525,0.254902,0.541176,0.188235, + 0.55,0.32549,0.580392,0.231373, + 0.575,0.403922,0.619608,0.278431, + 0.6,0.501961,0.670588,0.333333, + 0.63,0.592157,0.729412,0.4, + 0.65,0.741176,0.788235,0.490196, + 0.67,0.858824,0.858824,0.603922, + 0.7,0.921569,0.835294,0.580392, + 0.75,0.901961,0.729412,0.494118, + 0.8,0.858824,0.584314,0.388235, + 0.85,0.8,0.439216,0.321569, + 0.9,0.678431,0.298039,0.203922, + 0.95,0.54902,0.168627,0.109804, + 0.975,0.478431,0.082353,0.047059, + 1.0,0.45098,0.007843,0.0 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::YELLOW_GRAY_BLUE, { + "Yellow - Gray - Blue", + vtkm::cont::ColorSpace::LAB, + { 0.25, 0, 0 }, + { + 0.000000, 0.301961, 0.047059, 0.090196, + 0.016390, 0.396078, 0.039216, 0.058824, + 0.032780, 0.494118, 0.054902, 0.035294, + 0.049171, 0.588235, 0.113725, 0.023529, + 0.065561, 0.662745, 0.168627, 0.015686, + 0.081951, 0.741176, 0.227451, 0.003922, + 0.098341, 0.788235, 0.290196, 0.000000, + 0.114732, 0.862745, 0.380392, 0.011765, + 0.131122, 0.901961, 0.458824, 0.027451, + 0.147512, 0.917647, 0.521569, 0.047059, + 0.163902, 0.925490, 0.580392, 0.078431, + 0.180293, 0.937255, 0.643137, 0.121569, + 0.196683, 0.945098, 0.709804, 0.184314, + 0.213073, 0.952941, 0.768627, 0.247059, + 0.229463, 0.964706, 0.827451, 0.325490, + 0.245854, 0.968627, 0.878431, 0.423529, + 0.262244, 0.972549, 0.917647, 0.513725, + 0.278634, 0.980392, 0.949020, 0.596078, + 0.295024, 0.980392, 0.972549, 0.670588, + 0.311415, 0.988235, 0.988235, 0.756863, + 0.327149, 0.984314, 0.988235, 0.854902, + 0.327805, 0.988235, 0.988235, 0.858824, + 0.327815, 0.952941, 0.952941, 0.894118, + 0.327815, 0.952941, 0.952941, 0.894118, + 0.344836, 0.890196, 0.890196, 0.807843, + 0.361856, 0.827451, 0.823529, 0.737255, + 0.378877, 0.776471, 0.764706, 0.678431, + 0.395898, 0.725490, 0.713725, 0.627451, + 0.412919, 0.678431, 0.662745, 0.580392, + 0.429940, 0.631373, 0.607843, 0.533333, + 0.446960, 0.580392, 0.556863, 0.486275, + 0.463981, 0.537255, 0.505882, 0.443137, + 0.481002, 0.498039, 0.458824, 0.407843, + 0.498023, 0.462745, 0.419608, 0.372549, + 0.515043, 0.431373, 0.388235, 0.345098, + 0.532064, 0.403922, 0.356863, 0.317647, + 0.549085, 0.372549, 0.321569, 0.294118, + 0.566106, 0.345098, 0.294118, 0.266667, + 0.583127, 0.317647, 0.262745, 0.239216, + 0.600147, 0.286275, 0.231373, 0.211765, + 0.617168, 0.254902, 0.200000, 0.184314, + 0.634189, 0.231373, 0.172549, 0.164706, + 0.651210, 0.200000, 0.145098, 0.137255, + 0.668240, 0.149020, 0.196078, 0.278431, + 0.701416, 0.200000, 0.254902, 0.345098, + 0.734592, 0.247059, 0.317647, 0.415686, + 0.767768, 0.305882, 0.388235, 0.494118, + 0.800944, 0.372549, 0.458824, 0.568627, + 0.834120, 0.443137, 0.533333, 0.643137, + 0.867296, 0.517647, 0.615686, 0.725490, + 0.900472, 0.600000, 0.698039, 0.800000, + 0.933648, 0.686275, 0.784314, 0.870588, + 0.966824, 0.760784, 0.858824, 0.929412, + 0.983412, 0.807843, 0.901961, 0.960784, + 1.000000, 0.890196, 0.956863, 0.984314 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::RAINBOW_UNIFORM, { + "Rainbow Uniform", + vtkm::cont::ColorSpace::RGB, + { 1, 0, 0 }, + { + 0.000000,0.020000,0.381300,0.998100, + 0.023810,0.020000,0.424268,0.969070, + 0.047619,0.020000,0.467234,0.940033, + 0.071429,0.020000,0.510200,0.911000, + 0.095238,0.020000,0.546401,0.872669, + 0.119048,0.020000,0.582600,0.834333, + 0.142857,0.020000,0.618800,0.796000, + 0.166667,0.020000,0.652535,0.749802, + 0.190476,0.020000,0.686267,0.703600, + 0.214286,0.020000,0.720000,0.657400, + 0.238095,0.020000,0.757035,0.603735, + 0.261905,0.020000,0.794067,0.550066, + 0.285714,0.020000,0.831100,0.496400, + 0.309524,0.021354,0.864537,0.428558, + 0.333333,0.023313,0.897999,0.360739, + 0.357143,0.015976,0.931048,0.292563, + 0.380952,0.274211,0.952563,0.153568, + 0.404762,0.493355,0.961904,0.111195, + 0.428571,0.643900,0.977300,0.046900, + 0.452381,0.762402,0.984670,0.034600, + 0.476190,0.880901,0.992033,0.022300, + 0.500000,0.999529,0.999519,0.013488, + 0.523810,0.999403,0.955036,0.079067, + 0.547619,0.999400,0.910666,0.148134, + 0.571429,0.999400,0.866300,0.217200, + 0.595238,0.999270,0.818036,0.217201, + 0.619048,0.999133,0.769766,0.217200, + 0.642857,0.999000,0.721500,0.217200, + 0.666667,0.999136,0.673436,0.217201, + 0.690476,0.999267,0.625366,0.217200, + 0.714286,0.999400,0.577300,0.217200, + 0.738095,0.999403,0.521068,0.217201, + 0.761905,0.999400,0.464833,0.217200, + 0.785714,0.999400,0.408600,0.217200, + 0.809524,0.994760,0.331773,0.211231, + 0.833333,0.986713,0.259518,0.190122, + 0.857143,0.991246,0.147994,0.210789, + 0.880952,0.949903,0.116867,0.252901, + 0.904762,0.903200,0.078433,0.291800, + 0.928571,0.856500,0.040000,0.330700, + 0.952381,0.798903,0.043333,0.358434, + 0.976190,0.741299,0.046667,0.386167, + 1.000000,0.683700,0.050000,0.413900 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::JET, { + "Jet", + vtkm::cont::ColorSpace::RGB, + { 0.25, 0, 0 }, + { + 0, 0, 0, 0.5625, + 0.111111, 0, 0, 1, + 0.3650795, 0, 1, 1, + 0.4920635, 0.5, 1, 0.5, + 0.6190475, 1, 1, 0, + 0.873016, 1, 0, 0, + 1, 0.5, 0, 0 + } + } + }, + PresetPair{vtkm::cont::ColorTable::Preset::RAINBOW_DESATURATED, { + "Rainbow Desaturated", + vtkm::cont::ColorSpace::RGB, + { 1, 1, 0 }, + { + 0, 0.278431372549, 0.278431372549, 0.858823529412, + 0.143, 0, 0, 0.360784313725, + 0.285, 0, 1, 1, + 0.429, 0, 0.501960784314, 0, + 0.571, 1, 1, 0, + 0.714, 1, 0.380392156863, 0, + 0.857, 0.419607843137, 0, 0, + 1, 0.878431372549, 0.301960784314, 0.301960784314 + } + } + } + }; + // clang-format on + + return presets; +} +} // anonymous namespace + +namespace vtkm +{ +namespace cont +{ +namespace internal +{ + +VTKM_CONT_EXPORT +bool LoadColorTablePreset(vtkm::cont::ColorTable::Preset preset, vtkm::cont::ColorTable& table) +{ + if (preset == vtkm::cont::ColorTable::Preset::DEFAULT) + { + preset = DEFAULT_PRESET; + } + for (auto&& presetPair : GetColorTablePresetsVector()) + { + if (presetPair.first == preset) + { + table = presetPair.second; + return true; + } + } + return false; +} + +VTKM_CONT_EXPORT std::set GetPresetNames() +{ + std::set names; + for (auto&& presetPair : GetColorTablePresetsVector()) + { + names.insert(presetPair.second.GetName()); + } + names.insert("Default"); + return names; +} + +VTKM_CONT_EXPORT bool LoadColorTablePreset(std::string name, vtkm::cont::ColorTable& table) +{ + if (IStringEqual(name, "Default")) + { + return LoadColorTablePreset(DEFAULT_PRESET, table); + } + for (auto&& presetPair : GetColorTablePresetsVector()) + { + if (IStringEqual(name, presetPair.second.GetName())) + { + table = presetPair.second; + return true; + } + } + return false; +} +} +} +} // namespace vtkm::cont::internal diff --git a/vtkm/cont/ColorTablePrivate.hxx b/vtkm/cont/ColorTablePrivate.hxx index 19cd30d31..3d38129f3 100644 --- a/vtkm/cont/ColorTablePrivate.hxx +++ b/vtkm/cont/ColorTablePrivate.hxx @@ -35,6 +35,7 @@ namespace detail { struct ColorTableInternals { + std::string Name; ColorSpace CSpace = ColorSpace::LAB; vtkm::Range TableRange = { 1.0, 0.0 }; diff --git a/vtkm/cont/PresetColorTables.cxx b/vtkm/cont/PresetColorTables.cxx deleted file mode 100644 index 5dce009d2..000000000 --- a/vtkm/cont/PresetColorTables.cxx +++ /dev/null @@ -1,632 +0,0 @@ - -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS). -// Copyright 2015 UT-Battelle, LLC. -// Copyright 2015 Los Alamos National Security. -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#include - -#include - -#include -#include -#include - -namespace -{ -template -struct ColorTable -{ - static constexpr int points = Points; - static constexpr int size = points * 4; - const vtkm::cont::ColorSpace space; - const double values[size]; -}; - -// clang-format off -static constexpr ColorTable<3> CoolToWarm = { - vtkm::cont::ColorSpace::DIVERGING, - { 0, 0.23137254902, 0.298039215686, 0.752941176471, - 0.5, 0.865, 0.865, 0.865, - 1, 0.705882352941, 0.0156862745098, 0.149019607843 - } -}; - -static constexpr ColorTable<4> BlackBody = { - vtkm::cont::ColorSpace::RGB, - { 0, 0, 0, 0, - 0.4, 0.901960784314, 0, 0, - 0.8, 0.901960784314, 0.901960784314, 0, - 1, 1, 1, 1 - } -}; - -static constexpr ColorTable<4> SamselFire = { - vtkm::cont::ColorSpace::RGB, - { 0, 0, 0, 0, - 0.333, 0.501960784314, 0, 0, - 0.666, 1, 0.501960784314, 0, - 1, 1, 1, 1 - } -}; - -static constexpr ColorTable<256> Inferno = { - vtkm::cont::ColorSpace::LAB, - { 0.000000, 0.001462, 0.000466, 0.013866, 0.003922, 0.002267, 0.001270, 0.018570, 0.007843, - 0.003299, 0.002249, 0.024239, 0.011765, 0.004547, 0.003392, 0.030909, 0.015686, 0.006006, - 0.004692, 0.038558, 0.019608, 0.007676, 0.006136, 0.046836, 0.023529, 0.009561, 0.007713, - 0.055143, 0.027451, 0.011663, 0.009417, 0.063460, 0.031373, 0.013995, 0.011225, 0.071862, - 0.035294, 0.016561, 0.013136, 0.080282, 0.039216, 0.019373, 0.015133, 0.088767, 0.043137, - 0.022447, 0.017199, 0.097327, 0.047059, 0.025793, 0.019331, 0.105930, 0.050980, 0.029432, - 0.021503, 0.114621, 0.054902, 0.033385, 0.023702, 0.123397, 0.058824, 0.037668, 0.025921, - 0.132232, 0.062745, 0.042253, 0.028139, 0.141141, 0.066667, 0.046915, 0.030324, 0.150164, - 0.070588, 0.051644, 0.032474, 0.159254, 0.074510, 0.056449, 0.034569, 0.168414, 0.078431, - 0.061340, 0.036590, 0.177642, 0.082353, 0.066331, 0.038504, 0.186962, 0.086275, 0.071429, - 0.040294, 0.196354, 0.090196, 0.076637, 0.041905, 0.205799, 0.094118, 0.081962, 0.043328, - 0.215289, 0.098039, 0.087411, 0.044556, 0.224813, 0.101961, 0.092990, 0.045583, 0.234358, - 0.105882, 0.098702, 0.046402, 0.243904, 0.109804, 0.104551, 0.047008, 0.253430, 0.113725, - 0.110536, 0.047399, 0.262912, 0.117647, 0.116656, 0.047574, 0.272321, 0.121569, 0.122908, - 0.047536, 0.281624, 0.125490, 0.129285, 0.047293, 0.290788, 0.129412, 0.135778, 0.046856, - 0.299776, 0.133333, 0.142378, 0.046242, 0.308553, 0.137255, 0.149073, 0.045468, 0.317085, - 0.141176, 0.155850, 0.044559, 0.325338, 0.145098, 0.162689, 0.043554, 0.333277, 0.149020, - 0.169575, 0.042489, 0.340874, 0.152941, 0.176493, 0.041402, 0.348111, 0.156863, 0.183429, - 0.040329, 0.354971, 0.160784, 0.190367, 0.039309, 0.361447, 0.164706, 0.197297, 0.038400, - 0.367535, 0.168627, 0.204209, 0.037632, 0.373238, 0.172549, 0.211095, 0.037030, 0.378563, - 0.176471, 0.217949, 0.036615, 0.383522, 0.180392, 0.224763, 0.036405, 0.388129, 0.184314, - 0.231538, 0.036405, 0.392400, 0.188235, 0.238273, 0.036621, 0.396353, 0.192157, 0.244967, - 0.037055, 0.400007, 0.196078, 0.251620, 0.037705, 0.403378, 0.200000, 0.258234, 0.038571, - 0.406485, 0.203922, 0.264810, 0.039647, 0.409345, 0.207843, 0.271347, 0.040922, 0.411976, - 0.211765, 0.277850, 0.042353, 0.414392, 0.215686, 0.284321, 0.043933, 0.416608, 0.219608, - 0.290763, 0.045644, 0.418637, 0.223529, 0.297178, 0.047470, 0.420491, 0.227451, 0.303568, - 0.049396, 0.422182, 0.231373, 0.309935, 0.051407, 0.423721, 0.235294, 0.316282, 0.053490, - 0.425116, 0.239216, 0.322610, 0.055634, 0.426377, 0.243137, 0.328921, 0.057827, 0.427511, - 0.247059, 0.335217, 0.060060, 0.428524, 0.250980, 0.341500, 0.062325, 0.429425, 0.254902, - 0.347771, 0.064616, 0.430217, 0.258824, 0.354032, 0.066925, 0.430906, 0.262745, 0.360284, - 0.069247, 0.431497, 0.266667, 0.366529, 0.071579, 0.431994, 0.270588, 0.372768, 0.073915, - 0.432400, 0.274510, 0.379001, 0.076253, 0.432719, 0.278431, 0.385228, 0.078591, 0.432955, - 0.282353, 0.391453, 0.080927, 0.433109, 0.286275, 0.397674, 0.083257, 0.433183, 0.290196, - 0.403894, 0.085580, 0.433179, 0.294118, 0.410113, 0.087896, 0.433098, 0.298039, 0.416331, - 0.090203, 0.432943, 0.301961, 0.422549, 0.092501, 0.432714, 0.305882, 0.428768, 0.094790, - 0.432412, 0.309804, 0.434987, 0.097069, 0.432039, 0.313725, 0.441207, 0.099338, 0.431594, - 0.317647, 0.447428, 0.101597, 0.431080, 0.321569, 0.453651, 0.103848, 0.430498, 0.325490, - 0.459875, 0.106089, 0.429846, 0.329412, 0.466100, 0.108322, 0.429125, 0.333333, 0.472328, - 0.110547, 0.428334, 0.337255, 0.478558, 0.112764, 0.427475, 0.341176, 0.484789, 0.114974, - 0.426548, 0.345098, 0.491022, 0.117179, 0.425552, 0.349020, 0.497257, 0.119379, 0.424488, - 0.352941, 0.503493, 0.121575, 0.423356, 0.356863, 0.509730, 0.123769, 0.422156, 0.360784, - 0.515967, 0.125960, 0.420887, 0.364706, 0.522206, 0.128150, 0.419549, 0.368627, 0.528444, - 0.130341, 0.418142, 0.372549, 0.534683, 0.132534, 0.416667, 0.376471, 0.540920, 0.134729, - 0.415123, 0.380392, 0.547157, 0.136929, 0.413511, 0.384314, 0.553392, 0.139134, 0.411829, - 0.388235, 0.559624, 0.141346, 0.410078, 0.392157, 0.565854, 0.143567, 0.408258, 0.396078, - 0.572081, 0.145797, 0.406369, 0.400000, 0.578304, 0.148039, 0.404411, 0.403922, 0.584521, - 0.150294, 0.402385, 0.407843, 0.590734, 0.152563, 0.400290, 0.411765, 0.596940, 0.154848, - 0.398125, 0.415686, 0.603139, 0.157151, 0.395891, 0.419608, 0.609330, 0.159474, 0.393589, - 0.423529, 0.615513, 0.161817, 0.391219, 0.427451, 0.621685, 0.164184, 0.388781, 0.431373, - 0.627847, 0.166575, 0.386276, 0.435294, 0.633998, 0.168992, 0.383704, 0.439216, 0.640135, - 0.171438, 0.381065, 0.443137, 0.646260, 0.173914, 0.378359, 0.447059, 0.652369, 0.176421, - 0.375586, 0.450980, 0.658463, 0.178962, 0.372748, 0.454902, 0.664540, 0.181539, 0.369846, - 0.458824, 0.670599, 0.184153, 0.366879, 0.462745, 0.676638, 0.186807, 0.363849, 0.466667, - 0.682656, 0.189501, 0.360757, 0.470588, 0.688653, 0.192239, 0.357603, 0.474510, 0.694627, - 0.195021, 0.354388, 0.478431, 0.700576, 0.197851, 0.351113, 0.482353, 0.706500, 0.200728, - 0.347777, 0.486275, 0.712396, 0.203656, 0.344383, 0.490196, 0.718264, 0.206636, 0.340931, - 0.494118, 0.724103, 0.209670, 0.337424, 0.498039, 0.729909, 0.212759, 0.333861, 0.501961, - 0.735683, 0.215906, 0.330245, 0.505882, 0.741423, 0.219112, 0.326576, 0.509804, 0.747127, - 0.222378, 0.322856, 0.513725, 0.752794, 0.225706, 0.319085, 0.517647, 0.758422, 0.229097, - 0.315266, 0.521569, 0.764010, 0.232554, 0.311399, 0.525490, 0.769556, 0.236077, 0.307485, - 0.529412, 0.775059, 0.239667, 0.303526, 0.533333, 0.780517, 0.243327, 0.299523, 0.537255, - 0.785929, 0.247056, 0.295477, 0.541176, 0.791293, 0.250856, 0.291390, 0.545098, 0.796607, - 0.254728, 0.287264, 0.549020, 0.801871, 0.258674, 0.283099, 0.552941, 0.807082, 0.262692, - 0.278898, 0.556863, 0.812239, 0.266786, 0.274661, 0.560784, 0.817341, 0.270954, 0.270390, - 0.564706, 0.822386, 0.275197, 0.266085, 0.568627, 0.827372, 0.279517, 0.261750, 0.572549, - 0.832299, 0.283913, 0.257383, 0.576471, 0.837165, 0.288385, 0.252988, 0.580392, 0.841969, - 0.292933, 0.248564, 0.584314, 0.846709, 0.297559, 0.244113, 0.588235, 0.851384, 0.302260, - 0.239636, 0.592157, 0.855992, 0.307038, 0.235133, 0.596078, 0.860533, 0.311892, 0.230606, - 0.600000, 0.865006, 0.316822, 0.226055, 0.603922, 0.869409, 0.321827, 0.221482, 0.607843, - 0.873741, 0.326906, 0.216886, 0.611765, 0.878001, 0.332060, 0.212268, 0.615686, 0.882188, - 0.337287, 0.207628, 0.619608, 0.886302, 0.342586, 0.202968, 0.623529, 0.890341, 0.347957, - 0.198286, 0.627451, 0.894305, 0.353399, 0.193584, 0.631373, 0.898192, 0.358911, 0.188860, - 0.635294, 0.902003, 0.364492, 0.184116, 0.639216, 0.905735, 0.370140, 0.179350, 0.643137, - 0.909390, 0.375856, 0.174563, 0.647059, 0.912966, 0.381636, 0.169755, 0.650980, 0.916462, - 0.387481, 0.164924, 0.654902, 0.919879, 0.393389, 0.160070, 0.658824, 0.923215, 0.399359, - 0.155193, 0.662745, 0.926470, 0.405389, 0.150292, 0.666667, 0.929644, 0.411479, 0.145367, - 0.670588, 0.932737, 0.417627, 0.140417, 0.674510, 0.935747, 0.423831, 0.135440, 0.678431, - 0.938675, 0.430091, 0.130438, 0.682353, 0.941521, 0.436405, 0.125409, 0.686275, 0.944285, - 0.442772, 0.120354, 0.690196, 0.946965, 0.449191, 0.115272, 0.694118, 0.949562, 0.455660, - 0.110164, 0.698039, 0.952075, 0.462178, 0.105031, 0.701961, 0.954506, 0.468744, 0.099874, - 0.705882, 0.956852, 0.475356, 0.094695, 0.709804, 0.959114, 0.482014, 0.089499, 0.713725, - 0.961293, 0.488716, 0.084289, 0.717647, 0.963387, 0.495462, 0.079073, 0.721569, 0.965397, - 0.502249, 0.073859, 0.725490, 0.967322, 0.509078, 0.068659, 0.729412, 0.969163, 0.515946, - 0.063488, 0.733333, 0.970919, 0.522853, 0.058367, 0.737255, 0.972590, 0.529798, 0.053324, - 0.741176, 0.974176, 0.536780, 0.048392, 0.745098, 0.975677, 0.543798, 0.043618, 0.749020, - 0.977092, 0.550850, 0.039050, 0.752941, 0.978422, 0.557937, 0.034931, 0.756863, 0.979666, - 0.565057, 0.031409, 0.760784, 0.980824, 0.572209, 0.028508, 0.764706, 0.981895, 0.579392, - 0.026250, 0.768627, 0.982881, 0.586606, 0.024661, 0.772549, 0.983779, 0.593849, 0.023770, - 0.776471, 0.984591, 0.601122, 0.023606, 0.780392, 0.985315, 0.608422, 0.024202, 0.784314, - 0.985952, 0.615750, 0.025592, 0.788235, 0.986502, 0.623105, 0.027814, 0.792157, 0.986964, - 0.630485, 0.030908, 0.796078, 0.987337, 0.637890, 0.034916, 0.800000, 0.987622, 0.645320, - 0.039886, 0.803922, 0.987819, 0.652773, 0.045581, 0.807843, 0.987926, 0.660250, 0.051750, - 0.811765, 0.987945, 0.667748, 0.058329, 0.815686, 0.987874, 0.675267, 0.065257, 0.819608, - 0.987714, 0.682807, 0.072489, 0.823529, 0.987464, 0.690366, 0.079990, 0.827451, 0.987124, - 0.697944, 0.087731, 0.831373, 0.986694, 0.705540, 0.095694, 0.835294, 0.986175, 0.713153, - 0.103863, 0.839216, 0.985566, 0.720782, 0.112229, 0.843137, 0.984865, 0.728427, 0.120785, - 0.847059, 0.984075, 0.736087, 0.129527, 0.850980, 0.983196, 0.743758, 0.138453, 0.854902, - 0.982228, 0.751442, 0.147565, 0.858824, 0.981173, 0.759135, 0.156863, 0.862745, 0.980032, - 0.766837, 0.166353, 0.866667, 0.978806, 0.774545, 0.176037, 0.870588, 0.977497, 0.782258, - 0.185923, 0.874510, 0.976108, 0.789974, 0.196018, 0.878431, 0.974638, 0.797692, 0.206332, - 0.882353, 0.973088, 0.805409, 0.216877, 0.886275, 0.971468, 0.813122, 0.227658, 0.890196, - 0.969783, 0.820825, 0.238686, 0.894118, 0.968041, 0.828515, 0.249972, 0.898039, 0.966243, - 0.836191, 0.261534, 0.901961, 0.964394, 0.843848, 0.273391, 0.905882, 0.962517, 0.851476, - 0.285546, 0.909804, 0.960626, 0.859069, 0.298010, 0.913725, 0.958720, 0.866624, 0.310820, - 0.917647, 0.956834, 0.874129, 0.323974, 0.921569, 0.954997, 0.881569, 0.337475, 0.925490, - 0.953215, 0.888942, 0.351369, 0.929412, 0.951546, 0.896226, 0.365627, 0.933333, 0.950018, - 0.903409, 0.380271, 0.937255, 0.948683, 0.910473, 0.395289, 0.941176, 0.947594, 0.917399, - 0.410665, 0.945098, 0.946809, 0.924168, 0.426373, 0.949020, 0.946392, 0.930761, 0.442367, - 0.952941, 0.946403, 0.937159, 0.458592, 0.956863, 0.946903, 0.943348, 0.474970, 0.960784, - 0.947937, 0.949318, 0.491426, 0.964706, 0.949545, 0.955063, 0.507860, 0.968627, 0.951740, - 0.960587, 0.524203, 0.972549, 0.954529, 0.965896, 0.540361, 0.976471, 0.957896, 0.971003, - 0.556275, 0.980392, 0.961812, 0.975924, 0.571925, 0.984314, 0.966249, 0.980678, 0.587206, - 0.988235, 0.971162, 0.985282, 0.602154, 0.992157, 0.976511, 0.989753, 0.616760, 0.996078, - 0.982257, 0.994109, 0.631017, 1.000000, 0.988362, 0.998364, 0.644924 - } -}; - -static constexpr ColorTable<22> LinearYGB = { - vtkm::cont::ColorSpace::LAB, - { 0, 1, 0.988235, 0.968627, - 0.02, 1, 0.952941, 0.878431, - 0.05, 0.968627, 0.905882, 0.776471, - 0.1, 0.94902, 0.898039, 0.6470590000000001, - 0.15, 0.901961, 0.878431, 0.556863, - 0.2, 0.847059, 0.858824, 0.482353, - 0.25, 0.690196, 0.819608, 0.435294, - 0.3, 0.513725, 0.7686269999999999, 0.384314, - 0.35, 0.337255, 0.721569, 0.337255, - 0.4, 0.278431, 0.658824, 0.392157, - 0.45, 0.231373, 0.639216, 0.435294, - 0.5, 0.203922, 0.6, 0.486275, - 0.55, 0.172549, 0.568627, 0.537255, - 0.6, 0.141176, 0.517647, 0.54902, - 0.65, 0.133333, 0.458824, 0.541176, - 0.7, 0.12549, 0.396078, 0.529412, - 0.75, 0.117647, 0.321569, 0.5215689999999999, - 0.8, 0.121569, 0.258824, 0.509804, - 0.85, 0.133333, 0.227451, 0.501961, - 0.9, 0.145098, 0.192157, 0.490196, - 0.95, 0.188235, 0.164706, 0.470588, - 1, 0.258824, 0.196078, 0.439216 - } -}; - -static constexpr ColorTable<5> ColdAndHot = { - vtkm::cont::ColorSpace::RGB, - { 0, 0, 1, 1, - 0.45, 0, 0, 1, - 0.5, 0, 0, 0.501960784314, - 0.55, 1, 0, 0, - 1, 1, 1, 0 - } -}; - -static constexpr ColorTable<8> RainbowDesaturated = { - vtkm::cont::ColorSpace::RGB, - { 0, 0.278431372549, 0.278431372549, 0.858823529412, - 0.143, 0, 0, 0.360784313725, - 0.285, 0, 1, 1, - 0.429, 0, 0.501960784314, 0, - 0.571, 1, 1, 0, - 0.714, 1, 0.380392156863, 0, - 0.857, 0.419607843137, 0, 0, - 1, 0.8784313725489999, 0.301960784314, 0.301960784314 - } -}; - -static constexpr ColorTable<35> CoolToWarmExtended = { - vtkm::cont::ColorSpace::LAB, - { 0, 0, 0, 0.34902, - 0.03125, 0.039216, 0.062745, 0.380392, - 0.0625, 0.062745, 0.117647, 0.411765, - 0.09375, 0.090196, 0.184314, 0.45098, - 0.125, 0.12549, 0.262745, 0.501961, - 0.15625, 0.160784, 0.337255, 0.541176, - 0.1875, 0.2, 0.396078, 0.568627, - 0.21875, 0.239216, 0.454902, 0.6, - 0.25, 0.286275, 0.5215689999999999, 0.65098, - 0.28125, 0.337255, 0.592157, 0.7019609999999999, - 0.3125, 0.388235, 0.654902, 0.74902, - 0.34375, 0.466667, 0.737255, 0.819608, - 0.375, 0.572549, 0.819608, 0.878431, - 0.40625, 0.654902, 0.866667, 0.9098039999999999, - 0.4375, 0.752941, 0.917647, 0.941176, - 0.46875, 0.823529, 0.956863, 0.968627, - 0.5, 0.988235, 0.960784, 0.901961, - 0.5, 0.941176, 0.984314, 0.988235, - 0.52, 0.988235, 0.945098, 0.85098, - 0.54, 0.980392, 0.898039, 0.784314, - 0.5625, 0.968627, 0.835294, 0.698039, - 0.59375, 0.94902, 0.733333, 0.588235, - 0.625, 0.929412, 0.65098, 0.509804, - 0.65625, 0.9098039999999999, 0.564706, 0.435294, - 0.6875, 0.878431, 0.458824, 0.352941, - 0.71875, 0.839216, 0.388235, 0.286275, - 0.75, 0.760784, 0.294118, 0.211765, - 0.78125, 0.7019609999999999, 0.211765, 0.168627, - 0.8125, 0.65098, 0.156863, 0.129412, - 0.84375, 0.6, 0.09411799999999999, 0.09411799999999999, - 0.875, 0.54902, 0.066667, 0.098039, - 0.90625, 0.501961, 0.05098, 0.12549, - 0.9375, 0.45098, 0.054902, 0.172549, - 0.96875, 0.4, 0.054902, 0.192157, - 1, 0.34902, 0.070588, 0.211765 - } -}; - -static constexpr ColorTable<2> XRay = { - vtkm::cont::ColorSpace::RGB, - { 0, 1, 1, 1, - 1, 0, 0, 0 - } -}; - -static constexpr ColorTable<4> BlackBlueWhite = { - vtkm::cont::ColorSpace::RGB, - { 0, 0, 0, 0, - 0.333, 0, 0, 0.501960784314, - 0.666, 0, 0.501960784314, 1, - 1, 1, 1, 1 - } -}; - -static constexpr ColorTable<21> LinearGreen = { - vtkm::cont::ColorSpace::LAB, - { 0, 0.054901999999999999, 0.109804, 0.121569, 0.050000000000000003, - 0.074510000000000007, 0.17254900000000001, 0.180392, 0.10000000000000001, - 0.086275000000000004, 0.231373, 0.219608, 0.14999999999999999, - 0.094117999999999993, 0.27843099999999998, 0.25097999999999998, - 0.20000000000000001, 0.109804, 0.34902, 0.27843099999999998, 0.25, - 0.11372500000000001, 0.40000000000000002, 0.27843099999999998, - 0.29999999999999999, 0.117647, 0.45097999999999999, 0.270588, - 0.34999999999999998, 0.117647, 0.49019600000000002, 0.24313699999999999, - 0.40000000000000002, 0.11372500000000001, 0.52156899999999995, - 0.20392199999999999, 0.45000000000000001, 0.109804, 0.54901999999999995, - 0.15294099999999999, 0.5, 0.082352999999999996, 0.58823499999999995, - 0.082352999999999996, 0.55000000000000004, 0.109804, 0.63137299999999996, - 0.050979999999999998, 0.59999999999999998, 0.21176500000000001, - 0.67843100000000001, 0.082352999999999996, 0.65000000000000002, - 0.31764700000000001, 0.72156900000000002, 0.11372500000000001, - 0.69999999999999996, 0.43137300000000001, 0.76078400000000002, - 0.16078400000000001, 0.75, 0.556863, 0.80000000000000004, - 0.23921600000000001, 0.80000000000000004, 0.66666700000000001, - 0.83921599999999996, 0.29411799999999999, 0.84999999999999998, - 0.78431399999999996, 0.87843099999999996, 0.39607799999999999, - 0.90000000000000002, 0.88627500000000003, 0.92156899999999997, - 0.53333299999999995, 0.94999999999999996, 0.96078399999999997, - 0.94901999999999997, 0.67058799999999996, 1, 1, 0.98431400000000002, - 0.90196100000000001 - } -}; - -static constexpr ColorTable<256> Viridis = -{ - vtkm::cont::ColorSpace::LAB, - { 0.000000, 0.267004, 0.004874, 0.329415, 0.003922, 0.268510, 0.009605, 0.335427, 0.007843, - 0.269944, 0.014625, 0.341379, 0.011765, 0.271305, 0.019942, 0.347269, 0.015686, 0.272594, - 0.025563, 0.353093, 0.019608, 0.273809, 0.031497, 0.358853, 0.023529, 0.274952, 0.037752, - 0.364543, 0.027451, 0.276022, 0.044167, 0.370164, 0.031373, 0.277018, 0.050344, 0.375715, - 0.035294, 0.277941, 0.056324, 0.381191, 0.039216, 0.278791, 0.062145, 0.386592, 0.043137, - 0.279566, 0.067836, 0.391917, 0.047059, 0.280267, 0.073417, 0.397163, 0.050980, 0.280894, - 0.078907, 0.402329, 0.054902, 0.281446, 0.084320, 0.407414, 0.058824, 0.281924, 0.089666, - 0.412415, 0.062745, 0.282327, 0.094955, 0.417331, 0.066667, 0.282656, 0.100196, 0.422160, - 0.070588, 0.282910, 0.105393, 0.426902, 0.074510, 0.283091, 0.110553, 0.431554, 0.078431, - 0.283197, 0.115680, 0.436115, 0.082353, 0.283229, 0.120777, 0.440584, 0.086275, 0.283187, - 0.125848, 0.444960, 0.090196, 0.283072, 0.130895, 0.449241, 0.094118, 0.282884, 0.135920, - 0.453427, 0.098039, 0.282623, 0.140926, 0.457517, 0.101961, 0.282290, 0.145912, 0.461510, - 0.105882, 0.281887, 0.150881, 0.465405, 0.109804, 0.281412, 0.155834, 0.469201, 0.113725, - 0.280868, 0.160771, 0.472899, 0.117647, 0.280255, 0.165693, 0.476498, 0.121569, 0.279574, - 0.170599, 0.479997, 0.125490, 0.278826, 0.175490, 0.483397, 0.129412, 0.278012, 0.180367, - 0.486697, 0.133333, 0.277134, 0.185228, 0.489898, 0.137255, 0.276194, 0.190074, 0.493001, - 0.141176, 0.275191, 0.194905, 0.496005, 0.145098, 0.274128, 0.199721, 0.498911, 0.149020, - 0.273006, 0.204520, 0.501721, 0.152941, 0.271828, 0.209303, 0.504434, 0.156863, 0.270595, - 0.214069, 0.507052, 0.160784, 0.269308, 0.218818, 0.509577, 0.164706, 0.267968, 0.223549, - 0.512008, 0.168627, 0.266580, 0.228262, 0.514349, 0.172549, 0.265145, 0.232956, 0.516599, - 0.176471, 0.263663, 0.237631, 0.518762, 0.180392, 0.262138, 0.242286, 0.520837, 0.184314, - 0.260571, 0.246922, 0.522828, 0.188235, 0.258965, 0.251537, 0.524736, 0.192157, 0.257322, - 0.256130, 0.526563, 0.196078, 0.255645, 0.260703, 0.528312, 0.200000, 0.253935, 0.265254, - 0.529983, 0.203922, 0.252194, 0.269783, 0.531579, 0.207843, 0.250425, 0.274290, 0.533103, - 0.211765, 0.248629, 0.278775, 0.534556, 0.215686, 0.246811, 0.283237, 0.535941, 0.219608, - 0.244972, 0.287675, 0.537260, 0.223529, 0.243113, 0.292092, 0.538516, 0.227451, 0.241237, - 0.296485, 0.539709, 0.231373, 0.239346, 0.300855, 0.540844, 0.235294, 0.237441, 0.305202, - 0.541921, 0.239216, 0.235526, 0.309527, 0.542944, 0.243137, 0.233603, 0.313828, 0.543914, - 0.247059, 0.231674, 0.318106, 0.544834, 0.250980, 0.229739, 0.322361, 0.545706, 0.254902, - 0.227802, 0.326594, 0.546532, 0.258824, 0.225863, 0.330805, 0.547314, 0.262745, 0.223925, - 0.334994, 0.548053, 0.266667, 0.221989, 0.339161, 0.548752, 0.270588, 0.220057, 0.343307, - 0.549413, 0.274510, 0.218130, 0.347432, 0.550038, 0.278431, 0.216210, 0.351535, 0.550627, - 0.282353, 0.214298, 0.355619, 0.551184, 0.286275, 0.212395, 0.359683, 0.551710, 0.290196, - 0.210503, 0.363727, 0.552206, 0.294118, 0.208623, 0.367752, 0.552675, 0.298039, 0.206756, - 0.371758, 0.553117, 0.301961, 0.204903, 0.375746, 0.553533, 0.305882, 0.203063, 0.379716, - 0.553925, 0.309804, 0.201239, 0.383670, 0.554294, 0.313725, 0.199430, 0.387607, 0.554642, - 0.317647, 0.197636, 0.391528, 0.554969, 0.321569, 0.195860, 0.395433, 0.555276, 0.325490, - 0.194100, 0.399323, 0.555565, 0.329412, 0.192357, 0.403199, 0.555836, 0.333333, 0.190631, - 0.407061, 0.556089, 0.337255, 0.188923, 0.410910, 0.556326, 0.341176, 0.187231, 0.414746, - 0.556547, 0.345098, 0.185556, 0.418570, 0.556753, 0.349020, 0.183898, 0.422383, 0.556944, - 0.352941, 0.182256, 0.426184, 0.557120, 0.356863, 0.180629, 0.429975, 0.557282, 0.360784, - 0.179019, 0.433756, 0.557430, 0.364706, 0.177423, 0.437527, 0.557565, 0.368627, 0.175841, - 0.441290, 0.557685, 0.372549, 0.174274, 0.445044, 0.557792, 0.376471, 0.172719, 0.448791, - 0.557885, 0.380392, 0.171176, 0.452530, 0.557965, 0.384314, 0.169646, 0.456262, 0.558030, - 0.388235, 0.168126, 0.459988, 0.558082, 0.392157, 0.166617, 0.463708, 0.558119, 0.396078, - 0.165117, 0.467423, 0.558141, 0.400000, 0.163625, 0.471133, 0.558148, 0.403922, 0.162142, - 0.474838, 0.558140, 0.407843, 0.160665, 0.478540, 0.558115, 0.411765, 0.159194, 0.482237, - 0.558073, 0.415686, 0.157729, 0.485932, 0.558013, 0.419608, 0.156270, 0.489624, 0.557936, - 0.423529, 0.154815, 0.493313, 0.557840, 0.427451, 0.153364, 0.497000, 0.557724, 0.431373, - 0.151918, 0.500685, 0.557587, 0.435294, 0.150476, 0.504369, 0.557430, 0.439216, 0.149039, - 0.508051, 0.557250, 0.443137, 0.147607, 0.511733, 0.557049, 0.447059, 0.146180, 0.515413, - 0.556823, 0.450980, 0.144759, 0.519093, 0.556572, 0.454902, 0.143343, 0.522773, 0.556295, - 0.458824, 0.141935, 0.526453, 0.555991, 0.462745, 0.140536, 0.530132, 0.555659, 0.466667, - 0.139147, 0.533812, 0.555298, 0.470588, 0.137770, 0.537492, 0.554906, 0.474510, 0.136408, - 0.541173, 0.554483, 0.478431, 0.135066, 0.544853, 0.554029, 0.482353, 0.133743, 0.548535, - 0.553541, 0.486275, 0.132444, 0.552216, 0.553018, 0.490196, 0.131172, 0.555899, 0.552459, - 0.494118, 0.129933, 0.559582, 0.551864, 0.498039, 0.128729, 0.563265, 0.551229, 0.501961, - 0.127568, 0.566949, 0.550556, 0.505882, 0.126453, 0.570633, 0.549841, 0.509804, 0.125394, - 0.574318, 0.549086, 0.513725, 0.124395, 0.578002, 0.548287, 0.517647, 0.123463, 0.581687, - 0.547445, 0.521569, 0.122606, 0.585371, 0.546557, 0.525490, 0.121831, 0.589055, 0.545623, - 0.529412, 0.121148, 0.592739, 0.544641, 0.533333, 0.120565, 0.596422, 0.543611, 0.537255, - 0.120092, 0.600104, 0.542530, 0.541176, 0.119738, 0.603785, 0.541400, 0.545098, 0.119512, - 0.607464, 0.540218, 0.549020, 0.119423, 0.611141, 0.538982, 0.552941, 0.119483, 0.614817, - 0.537692, 0.556863, 0.119699, 0.618490, 0.536347, 0.560784, 0.120081, 0.622161, 0.534946, - 0.564706, 0.120638, 0.625828, 0.533488, 0.568627, 0.121380, 0.629492, 0.531973, 0.572549, - 0.122312, 0.633153, 0.530398, 0.576471, 0.123444, 0.636809, 0.528763, 0.580392, 0.124780, - 0.640461, 0.527068, 0.584314, 0.126326, 0.644107, 0.525311, 0.588235, 0.128087, 0.647749, - 0.523491, 0.592157, 0.130067, 0.651384, 0.521608, 0.596078, 0.132268, 0.655014, 0.519661, - 0.600000, 0.134692, 0.658636, 0.517649, 0.603922, 0.137339, 0.662252, 0.515571, 0.607843, - 0.140210, 0.665859, 0.513427, 0.611765, 0.143303, 0.669459, 0.511215, 0.615686, 0.146616, - 0.673050, 0.508936, 0.619608, 0.150148, 0.676631, 0.506589, 0.623529, 0.153894, 0.680203, - 0.504172, 0.627451, 0.157851, 0.683765, 0.501686, 0.631373, 0.162016, 0.687316, 0.499129, - 0.635294, 0.166383, 0.690856, 0.496502, 0.639216, 0.170948, 0.694384, 0.493803, 0.643137, - 0.175707, 0.697900, 0.491033, 0.647059, 0.180653, 0.701402, 0.488189, 0.650980, 0.185783, - 0.704891, 0.485273, 0.654902, 0.191090, 0.708366, 0.482284, 0.658824, 0.196571, 0.711827, - 0.479221, 0.662745, 0.202219, 0.715272, 0.476084, 0.666667, 0.208030, 0.718701, 0.472873, - 0.670588, 0.214000, 0.722114, 0.469588, 0.674510, 0.220124, 0.725509, 0.466226, 0.678431, - 0.226397, 0.728888, 0.462789, 0.682353, 0.232815, 0.732247, 0.459277, 0.686275, 0.239374, - 0.735588, 0.455688, 0.690196, 0.246070, 0.738910, 0.452024, 0.694118, 0.252899, 0.742211, - 0.448284, 0.698039, 0.259857, 0.745492, 0.444467, 0.701961, 0.266941, 0.748751, 0.440573, - 0.705882, 0.274149, 0.751988, 0.436601, 0.709804, 0.281477, 0.755203, 0.432552, 0.713725, - 0.288921, 0.758394, 0.428426, 0.717647, 0.296479, 0.761561, 0.424223, 0.721569, 0.304148, - 0.764704, 0.419943, 0.725490, 0.311925, 0.767822, 0.415586, 0.729412, 0.319809, 0.770914, - 0.411152, 0.733333, 0.327796, 0.773980, 0.406640, 0.737255, 0.335885, 0.777018, 0.402049, - 0.741176, 0.344074, 0.780029, 0.397381, 0.745098, 0.352360, 0.783011, 0.392636, 0.749020, - 0.360741, 0.785964, 0.387814, 0.752941, 0.369214, 0.788888, 0.382914, 0.756863, 0.377779, - 0.791781, 0.377939, 0.760784, 0.386433, 0.794644, 0.372886, 0.764706, 0.395174, 0.797475, - 0.367757, 0.768627, 0.404001, 0.800275, 0.362552, 0.772549, 0.412913, 0.803041, 0.357269, - 0.776471, 0.421908, 0.805774, 0.351910, 0.780392, 0.430983, 0.808473, 0.346476, 0.784314, - 0.440137, 0.811138, 0.340967, 0.788235, 0.449368, 0.813768, 0.335384, 0.792157, 0.458674, - 0.816363, 0.329727, 0.796078, 0.468053, 0.818921, 0.323998, 0.800000, 0.477504, 0.821444, - 0.318195, 0.803922, 0.487026, 0.823929, 0.312321, 0.807843, 0.496615, 0.826376, 0.306377, - 0.811765, 0.506271, 0.828786, 0.300362, 0.815686, 0.515992, 0.831158, 0.294279, 0.819608, - 0.525776, 0.833491, 0.288127, 0.823529, 0.535621, 0.835785, 0.281908, 0.827451, 0.545524, - 0.838039, 0.275626, 0.831373, 0.555484, 0.840254, 0.269281, 0.835294, 0.565498, 0.842430, - 0.262877, 0.839216, 0.575563, 0.844566, 0.256415, 0.843137, 0.585678, 0.846661, 0.249897, - 0.847059, 0.595839, 0.848717, 0.243329, 0.850980, 0.606045, 0.850733, 0.236712, 0.854902, - 0.616293, 0.852709, 0.230052, 0.858824, 0.626579, 0.854645, 0.223353, 0.862745, 0.636902, - 0.856542, 0.216620, 0.866667, 0.647257, 0.858400, 0.209861, 0.870588, 0.657642, 0.860219, - 0.203082, 0.874510, 0.668054, 0.861999, 0.196293, 0.878431, 0.678489, 0.863742, 0.189503, - 0.882353, 0.688944, 0.865448, 0.182725, 0.886275, 0.699415, 0.867117, 0.175971, 0.890196, - 0.709898, 0.868751, 0.169257, 0.894118, 0.720391, 0.870350, 0.162603, 0.898039, 0.730889, - 0.871916, 0.156029, 0.901961, 0.741388, 0.873449, 0.149561, 0.905882, 0.751884, 0.874951, - 0.143228, 0.909804, 0.762373, 0.876424, 0.137064, 0.913725, 0.772852, 0.877868, 0.131109, - 0.917647, 0.783315, 0.879285, 0.125405, 0.921569, 0.793760, 0.880678, 0.120005, 0.925490, - 0.804182, 0.882046, 0.114965, 0.929412, 0.814576, 0.883393, 0.110347, 0.933333, 0.824940, - 0.884720, 0.106217, 0.937255, 0.835270, 0.886029, 0.102646, 0.941176, 0.845561, 0.887322, - 0.099702, 0.945098, 0.855810, 0.888601, 0.097452, 0.949020, 0.866013, 0.889868, 0.095953, - 0.952941, 0.876168, 0.891125, 0.095250, 0.956863, 0.886271, 0.892374, 0.095374, 0.960784, - 0.896320, 0.893616, 0.096335, 0.964706, 0.906311, 0.894855, 0.098125, 0.968627, 0.916242, - 0.896091, 0.100717, 0.972549, 0.926106, 0.897330, 0.104071, 0.976471, 0.935904, 0.898570, - 0.108131, 0.980392, 0.945636, 0.899815, 0.112838, 0.984314, 0.955300, 0.901065, 0.118128, - 0.988235, 0.964894, 0.902323, 0.123941, 0.992157, 0.974417, 0.903590, 0.130215, 0.996078, - 0.983868, 0.904867, 0.136897, 1.000000, 0.993248, 0.906157, 0.143936 - } -}; - -static constexpr ColorTable<7> Jet = { - vtkm::cont::ColorSpace::RGB, - { -1, 0, 0, 0.5625, - -0.777778, 0,0,1, - -0.269841, 0, 1, 1, - -0.015873, 0.5, 1, 0.5, - 0.238095, 1, 1, 0, - 0.746032, 1, 0, 0, - 1, 0.5, 0, 0 - } -}; - -static constexpr ColorTable<5> Rainbow = { - vtkm::cont::ColorSpace::RGB, - { -1, 0, 0, 1, - -0.5, 0, 1, 1, - 0, 0, 1, 0, - 0.5, 1, 1, 0, - 1, 1, 0, 0 - } -}; - -// clang-format on -void loadCoolToWarm(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(CoolToWarm.size, CoolToWarm.values); - table.SetColorSpace(CoolToWarm.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 1.0f, 0.0f }); -} -void loadBlackBody(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(BlackBody.size, BlackBody.values); - table.SetColorSpace(BlackBody.space); - table.SetNaNColor(vtkm::Vec{ 0.0f, 0.49803921f, 1.0f }); -} -void loadSamselFire(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(SamselFire.size, SamselFire.values); - table.SetColorSpace(SamselFire.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 1.0f, 0.0f }); -} -void loadInferno(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(Inferno.size, Inferno.values); - table.SetColorSpace(Inferno.space); - table.SetNaNColor(vtkm::Vec{ 0.0f, 1.0f, 0.0f }); -} -void loadLinearYGB(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(LinearYGB.size, LinearYGB.values); - table.SetColorSpace(LinearYGB.space); - table.SetNaNColor(vtkm::Vec{ 0.25f, 0.0f, 0.0f }); -} -void loadColdAndHot(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(ColdAndHot.size, ColdAndHot.values); - table.SetColorSpace(ColdAndHot.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 1.0f, 0.0f }); -} -void loadRainbowDesaturated(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(RainbowDesaturated.size, RainbowDesaturated.values); - table.SetColorSpace(RainbowDesaturated.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 1.0f, 0.0f }); -} -void loadCoolToWarmExtended(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(CoolToWarmExtended.size, CoolToWarmExtended.values); - table.SetColorSpace(CoolToWarmExtended.space); - table.SetNaNColor(vtkm::Vec{ 0.25f, 0.0f, 0.0f }); -} -void loadXRay(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(XRay.size, XRay.values); - table.SetColorSpace(XRay.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 0.0f, 0.0f }); -} -void loadBlackBlueWhite(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(BlackBlueWhite.size, BlackBlueWhite.values); - table.SetColorSpace(BlackBlueWhite.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 1.0f, 0.0f }); -} -void loadViridis(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(Viridis.size, Viridis.values); - table.SetColorSpace(Viridis.space); - table.SetNaNColor(vtkm::Vec{ 1.0f, 0.0f, 0.0f }); -} -void loadLinearGreen(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(LinearGreen.size, LinearGreen.values); - table.SetColorSpace(LinearGreen.space); - table.SetNaNColor(vtkm::Vec{ 0.25f, 0.0f, 0.0f }); -} -void loadJet(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(Jet.size, Jet.values); - table.SetColorSpace(Jet.space); -} -void loadRainbow(vtkm::cont::ColorTable& table) -{ - table.FillColorTableFromDataPointer(Rainbow.size, Rainbow.values); - table.SetColorSpace(Rainbow.space); -} - -struct LoadColorTablePresetCommand -{ - using FunctionType = void (*)(vtkm::cont::ColorTable& table); - - vtkm::cont::ColorTable::Preset id; - std::string name; - FunctionType function; -}; - -constexpr int numberOfPresets = 15; -struct LoadColorTablePresetCommand presets[numberOfPresets] = { - { vtkm::cont::ColorTable::Preset::DEFAULT, "default", loadViridis }, - { vtkm::cont::ColorTable::Preset::VIRIDIS, "viridis", loadViridis }, - { vtkm::cont::ColorTable::Preset::COOL_TO_WARM, "cool to warm", loadCoolToWarm }, - { vtkm::cont::ColorTable::Preset::COOL_TO_WARN_EXTENDED, - "cool to warm (extended)", - loadCoolToWarmExtended }, - { vtkm::cont::ColorTable::Preset::COLD_AND_HOT, "cold and hot", loadColdAndHot }, - { vtkm::cont::ColorTable::Preset::INFERNO, "inferno", loadInferno }, - { vtkm::cont::ColorTable::Preset::BLACK_BODY_RADIATION, "black-body radiation", loadBlackBody }, - { vtkm::cont::ColorTable::Preset::SAMSEL_FIRE, "samsel fire", loadSamselFire }, - { vtkm::cont::ColorTable::Preset::LINEAR_YGB, "linear ygb", loadLinearYGB }, - { vtkm::cont::ColorTable::Preset::BLACK_BLUE_AND_WHITE, - "black, blue and white", - loadBlackBlueWhite }, - { vtkm::cont::ColorTable::Preset::LINEAR_GREEN, "linear green", loadLinearGreen }, - { vtkm::cont::ColorTable::Preset::X_RAY, "x ray", loadXRay }, - { vtkm::cont::ColorTable::Preset::JET, "jet", loadJet }, - { vtkm::cont::ColorTable::Preset::RAINBOW_DESATURATED, - "rainbow desaturated", - loadRainbowDesaturated }, - { vtkm::cont::ColorTable::Preset::RAINBOW, "rainbow", loadRainbow }, -}; -} - -namespace vtkm -{ -namespace cont -{ -namespace detail -{ - -VTKM_CONT_EXPORT -bool loadColorTablePreset(vtkm::cont::ColorTable::Preset preset, vtkm::cont::ColorTable& table) -{ - for (int i = 0; i < numberOfPresets; ++i) - { - if (preset == presets[i].id) - { - presets[i].function(table); - return true; - } - } - return false; -} - -VTKM_CONT_EXPORT std::set GetPresetNames() -{ - std::set names; - for (int i = 0; i < numberOfPresets; ++i) - { - names.insert(presets[i].name); - } - return names; -} - -VTKM_CONT_EXPORT bool loadColorTablePreset(std::string name, vtkm::cont::ColorTable& table) -{ - //convert to lower case - std::transform(name.begin(), name.end(), name.begin(), [](char c) { - return static_cast(std::tolower(static_cast(c))); - }); - - for (int i = 0; i < numberOfPresets; ++i) - { - if (name == presets[i].name) - { - presets[i].function(table); - return true; - } - } - return false; -} -} -} -} diff --git a/vtkm/cont/testing/TestingColorTable.h b/vtkm/cont/testing/TestingColorTable.h index 52cc48309..e7b258ba6 100644 --- a/vtkm/cont/testing/TestingColorTable.h +++ b/vtkm/cont/testing/TestingColorTable.h @@ -88,46 +88,74 @@ public: auto labspace = vtkm::cont::ColorSpace::LAB; auto diverging = vtkm::cont::ColorSpace::DIVERGING; - vtkm::cont::ColorTable table(rgbspace); - VTKM_TEST_ASSERT(table.LoadPreset("Linear YGB"), "failed to find Linear YGB preset"); - VTKM_TEST_ASSERT(table.GetColorSpace() == labspace, - "color space not switched when loading preset"); - VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after loading preset"); - VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 22, - "color range not correct after loading preset"); + { + vtkm::cont::ColorTable table(rgbspace); + VTKM_TEST_ASSERT(table.LoadPreset("Cool to Warm")); + VTKM_TEST_ASSERT(table.GetColorSpace() == diverging, + "color space not switched when loading preset"); + VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after loading preset"); + VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 3); - table.SetColorSpace(diverging); - VTKM_TEST_ASSERT(table.LoadPreset("inferno"), "failed to find inferno"); - VTKM_TEST_ASSERT(table.GetColorSpace() == labspace, - "color space not switched when loading preset"); - VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after loading preset"); - VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 256, - "color range not correct after loading preset"); + VTKM_TEST_ASSERT(table.LoadPreset(vtkm::cont::ColorTable::Preset::COOL_TO_WARM_EXTENDED)); + VTKM_TEST_ASSERT(table.GetColorSpace() == labspace, + "color space not switched when loading preset"); + VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after loading preset"); + VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 35); - - table.SetColorSpace(hsvspace); - VTKM_TEST_ASSERT((table.LoadPreset("no table with this name") == false), - "failed to error out on bad preset table name"); - //verify that after a failure we still have the previous preset loaded - VTKM_TEST_ASSERT(table.GetColorSpace() == hsvspace, - "color space not switched when loading preset"); - VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after loading preset"); - VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 256, - "color range not correct after loading preset"); + table.SetColorSpace(hsvspace); + VTKM_TEST_ASSERT((table.LoadPreset("no table with this name") == false), + "failed to error out on bad preset table name"); + //verify that after a failure we still have the previous preset loaded + VTKM_TEST_ASSERT(table.GetColorSpace() == hsvspace, + "color space not switched when loading preset"); + VTKM_TEST_ASSERT(table.GetRange() == range, "color range not correct after failing preset"); + VTKM_TEST_ASSERT(table.GetNumberOfPoints() == 35); + } //verify that we can get the presets - std::set names = table.GetPresets(); - VTKM_TEST_ASSERT(names.size() == 15, "incorrect number of names in preset set"); + std::set names = vtkm::cont::ColorTable::GetPresets(); + VTKM_TEST_ASSERT(names.size() == 18, "incorrect number of names in preset set"); - VTKM_TEST_ASSERT(names.count("inferno") == 1, "names should contain inferno"); - VTKM_TEST_ASSERT(names.count("black-body radiation") == 1, + VTKM_TEST_ASSERT(names.count("Inferno") == 1, "names should contain inferno"); + VTKM_TEST_ASSERT(names.count("Black-Body Radiation") == 1, "names should contain black-body radiation"); - VTKM_TEST_ASSERT(names.count("viridis") == 1, "names should contain viridis"); - VTKM_TEST_ASSERT(names.count("black, blue and white") == 1, + VTKM_TEST_ASSERT(names.count("Viridis") == 1, "names should contain viridis"); + VTKM_TEST_ASSERT(names.count("Black - Blue - White") == 1, "names should contain black, blue and white"); - VTKM_TEST_ASSERT(names.count("samsel fire") == 1, "names should contain samsel fire"); - VTKM_TEST_ASSERT(names.count("jet") == 1, "names should contain jet"); + VTKM_TEST_ASSERT(names.count("Blue to Orange") == 1, "names should contain samsel fire"); + VTKM_TEST_ASSERT(names.count("Jet") == 1, "names should contain jet"); + + // verify that we can load in all the listed color tables + for (auto&& name : names) + { + vtkm::cont::ColorTable table(name); + VTKM_TEST_ASSERT(table.GetNumberOfPoints() > 0, "Issue loading preset ", name); + } + + auto presetEnum = { vtkm::cont::ColorTable::Preset::DEFAULT, + vtkm::cont::ColorTable::Preset::COOL_TO_WARM, + vtkm::cont::ColorTable::Preset::COOL_TO_WARM_EXTENDED, + vtkm::cont::ColorTable::Preset::VIRIDIS, + vtkm::cont::ColorTable::Preset::INFERNO, + vtkm::cont::ColorTable::Preset::PLASMA, + vtkm::cont::ColorTable::Preset::BLACK_BODY_RADIATION, + vtkm::cont::ColorTable::Preset::X_RAY, + vtkm::cont::ColorTable::Preset::GREEN, + vtkm::cont::ColorTable::Preset::BLACK_BLUE_WHITE, + vtkm::cont::ColorTable::Preset::BLUE_TO_ORANGE, + vtkm::cont::ColorTable::Preset::GRAY_TO_RED, + vtkm::cont::ColorTable::Preset::COLD_AND_HOT, + vtkm::cont::ColorTable::Preset::BLUE_GREEN_ORANGE, + vtkm::cont::ColorTable::Preset::YELLOW_GRAY_BLUE, + vtkm::cont::ColorTable::Preset::RAINBOW_UNIFORM, + vtkm::cont::ColorTable::Preset::JET, + vtkm::cont::ColorTable::Preset::RAINBOW_DESATURATED }; + for (vtkm::cont::ColorTable::Preset preset : presetEnum) + { + vtkm::cont::ColorTable table(preset); + VTKM_TEST_ASSERT(table.GetNumberOfPoints() > 0, "Issue loading preset"); + } } static void TestClamping() @@ -310,7 +338,7 @@ public: //Verify that the opacity points have moved vtkm::Vec opacityData; table.GetPointAlpha(1, opacityData); - VTKM_TEST_ASSERT(opacityData[0] == range.Max, "rescale to range failed on opacity"); + VTKM_TEST_ASSERT(test_equal(opacityData[0], range.Max), "rescale to range failed on opacity"); VTKM_TEST_ASSERT(opacityData[1] == 1.0, "rescale changed opacity values"); VTKM_TEST_ASSERT(opacityData[2] == 0.5, "rescale modified mid/sharp of opacity"); VTKM_TEST_ASSERT(opacityData[3] == 0.0, "rescale modified mid/sharp of opacity"); @@ -449,14 +477,14 @@ public: { using namespace vtkm::worklet::colorconversion; - vtkm::cont::ColorTable table(vtkm::cont::ColorTable::Preset::LINEAR_GREEN); + vtkm::cont::ColorTable table(vtkm::cont::ColorTable::Preset::GREEN); VTKM_TEST_ASSERT((table.GetRange() == vtkm::Range{ 0.0, 1.0 }), "loading linear green table failed with wrong range"); VTKM_TEST_ASSERT((table.GetNumberOfPoints() == 21), "loading linear green table failed with number of control points"); constexpr vtkm::Id nvals = 3; - constexpr double data[3] = { 0.0f, 0.5f, 1.0f }; + constexpr double data[3] = { 0.0, 0.5, 1.0 }; auto samples = vtkm::cont::make_ArrayHandle(data, nvals); vtkm::cont::ArrayHandle> colors; @@ -481,7 +509,7 @@ public: static void TestSampling() { - vtkm::cont::ColorTable table(vtkm::cont::ColorTable::Preset::LINEAR_GREEN); + vtkm::cont::ColorTable table(vtkm::cont::ColorTable::Preset::GREEN); VTKM_TEST_ASSERT((table.GetRange() == vtkm::Range{ 0.0, 1.0 }), "loading linear green table failed with wrong range"); VTKM_TEST_ASSERT((table.GetNumberOfPoints() == 21), @@ -539,7 +567,6 @@ public: } } - struct TestAll { VTKM_CONT void operator()() const