| 233 | //---------------------------------------------------------------------------- |
| 234 | template <typename MapType> |
| 235 | inline vtkSmartPointer<vtkSignedCharArray> vtkSelection::Evaluate( |
| 236 | const MapType& values_map, std::array<signed char, 2>& range) const |
| 237 | { |
| 238 | const unsigned int num_nodes = this->GetNumberOfNodes(); |
| 239 | std::vector<vtkSignedCharArray*> values(num_nodes, nullptr); |
| 240 | for (unsigned int cc = 0; cc < num_nodes; ++cc) |
| 241 | { |
| 242 | auto iter = values_map.find(this->GetNodeNameAtIndex(cc)); |
| 243 | values[cc] = iter != values_map.end() ? iter->second : nullptr; |
| 244 | } |
| 245 | return this->Evaluate(values.data(), num_nodes, range); |
| 246 | } |
| 247 | |
| 248 | VTK_ABI_NAMESPACE_END |
| 249 | #endif |