diff --git a/vtkm/cont/testing/UnitTestColorTable.cxx b/vtkm/cont/testing/UnitTestColorTable.cxx index e3c476d3e..9a89cf9a8 100644 --- a/vtkm/cont/testing/UnitTestColorTable.cxx +++ b/vtkm/cont/testing/UnitTestColorTable.cxx @@ -466,14 +466,14 @@ void TestLookupTable() const bool ran = vtkm::cont::ColorTableMap(field, samples, colors); VTKM_TEST_ASSERT(ran, "color table failed to execute"); - //values confirmed with ParaView 5.4 + //values confirmed with ParaView 5.11 CheckColors(colors, { { 0, 0, 255 }, { 59, 76, 192 }, - { 122, 157, 248 }, - { 191, 211, 246 }, - { 241, 204, 184 }, - { 238, 134, 105 }, + { 124, 159, 249 }, + { 192, 212, 245 }, + { 242, 203, 183 }, + { 238, 133, 104 }, { 180, 4, 38 }, { 255, 0, 0 } }); } diff --git a/vtkm/filter/field_transform/testing/UnitTestFieldToColors.cxx b/vtkm/filter/field_transform/testing/UnitTestFieldToColors.cxx index cdc68b902..f1eea968f 100644 --- a/vtkm/filter/field_transform/testing/UnitTestFieldToColors.cxx +++ b/vtkm/filter/field_transform/testing/UnitTestFieldToColors.cxx @@ -42,10 +42,10 @@ void TestFieldToColors() vtkm::cont::ArrayHandle resultRGBAHandle; Result.GetData().AsArrayHandle(resultRGBAHandle); - //values confirmed with ParaView 5.4 + //values confirmed with ParaView 5.11 const vtkm::Vec4ui_8 correct_diverging_rgba_values[nvals] = { - { 0, 0, 255, 255 }, { 59, 76, 192, 255 }, { 122, 157, 248, 255 }, { 191, 211, 246, 255 }, - { 241, 204, 184, 255 }, { 238, 134, 105, 255 }, { 180, 4, 38, 255 }, { 255, 0, 0, 255 } + { 0, 0, 255, 255 }, { 59, 76, 192, 255 }, { 124, 159, 249, 255 }, { 192, 212, 245, 255 }, + { 242, 203, 183, 255 }, { 238, 133, 104, 255 }, { 180, 4, 38, 255 }, { 255, 0, 0, 255 } }; auto portalRGBA = resultRGBAHandle.ReadPortal(); for (std::size_t i = 0; i < nvals; ++i) @@ -63,10 +63,10 @@ void TestFieldToColors() vtkm::cont::ArrayHandle resultRGBHandle; Result.GetData().AsArrayHandle(resultRGBHandle); - //values confirmed with ParaView 5.4 + //values confirmed with ParaView 5.11 const vtkm::Vec3ui_8 correct_diverging_rgb_values[nvals] = { { 0, 0, 255 }, { 59, 76, 192 }, - { 122, 157, 248 }, { 191, 211, 246 }, - { 241, 204, 184 }, { 238, 134, 105 }, + { 124, 159, 249 }, { 192, 212, 245 }, + { 242, 203, 183 }, { 238, 133, 104 }, { 180, 4, 38 }, { 255, 0, 0 } }; auto portalRGB = resultRGBHandle.ReadPortal(); for (std::size_t i = 0; i < nvals; ++i) diff --git a/vtkm/worklet/colorconversion/LookupTable.h b/vtkm/worklet/colorconversion/LookupTable.h index b6a6b56d6..76a282e44 100644 --- a/vtkm/worklet/colorconversion/LookupTable.h +++ b/vtkm/worklet/colorconversion/LookupTable.h @@ -94,7 +94,7 @@ struct LookupTable : public vtkm::worklet::WorkletMapField // When v is very close to p.Range[1], the floating point calculation giving // idx may map above the highest value in the lookup table. That is why it // is padded - idx = static_cast(v); + idx = 1 + static_cast(v); } output = lookupTable.Get(idx); }