MCPcopy Create free account
hub / github.com/Kitware/ParaView / GetDecoratedArrayName

Method GetDecoratedArrayName

Remoting/Views/vtkSMColorMapEditorHelper.cxx:1512–1544  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1510
1511//----------------------------------------------------------------------------
1512std::string vtkSMColorMapEditorHelper::GetDecoratedArrayName(
1513 vtkSMProxy* proxy, const std::string& arrayName)
1514{
1515 std::ostringstream ss;
1516 ss << arrayName;
1517 if (proxy->GetProperty("TransferFunction2D"))
1518 {
1519 const bool useGradientAsY =
1520 (vtkSMPropertyHelper(proxy, "UseGradientForTransfer2D", true).GetAsInt() == 1);
1521 if (!useGradientAsY)
1522 {
1523 std::string array2Name;
1524 vtkSMProperty* colorArray2Property = proxy->GetProperty("ColorArray2Name");
1525 if (colorArray2Property)
1526 {
1527 const vtkSMPropertyHelper colorArray2Helper(colorArray2Property);
1528 array2Name = colorArray2Helper.GetInputArrayNameToProcess();
1529 }
1530 if (!array2Name.empty())
1531 {
1532 ss << "_" << array2Name;
1533 }
1534 }
1535 }
1536 if (vtkSMPropertyHelper(proxy, "UseSeparateColorMap", true).GetAsInt())
1537 {
1538 // Use global id for separate color map
1539 std::ostringstream ss1;
1540 ss1 << "Separate_" << proxy->GetGlobalIDAsString() << "_" << ss.str();
1541 return ss1.str();
1542 }
1543 return ss.str();
1544}
1545
1546//----------------------------------------------------------------------------
1547std::vector<std::string> vtkSMColorMapEditorHelper::GetBlocksDecoratedArrayNames(

Callers

nothing calls this directly

Calls 5

GetAsIntMethod · 0.80
GetGlobalIDAsStringMethod · 0.80
GetPropertyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected