MCPcopy Create free account
hub / github.com/Kitware/VTK / ComputeRangeInternal

Method ComputeRangeInternal

Common/DataModel/vtkCellGrid.cxx:845–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843}
844
845bool vtkCellGrid::ComputeRangeInternal(
846 vtkCellAttribute* attribute, int component, bool finiteRange) const
847{
848 auto* self = const_cast<vtkCellGrid*>(this);
849 auto& cache = this->RangeCache[attribute]; // This inserts a blank entry if none exists.
850 // Ensure the range vectors are the proper size:
851 if (cache.size() != static_cast<std::size_t>(attribute->GetNumberOfComponents() + 2))
852 {
853 cache.resize(attribute->GetNumberOfComponents() + 2);
854 }
855 vtkNew<vtkCellGridRangeQuery> rangeQuery;
856 rangeQuery->SetComponent(component);
857 rangeQuery->SetFiniteRange(finiteRange);
858 rangeQuery->SetCellGrid(self);
859 rangeQuery->SetCellAttribute(attribute);
860 if (!self->Query(rangeQuery))
861 {
862 vtkWarningMacro("Range computation for \"" << attribute->GetName().Data() << "\" "
863 << "(" << component << ") was partial at best.");
864 }
865 return true;
866}
867
868VTK_ABI_NAMESPACE_END

Callers 1

GetCellAttributeRangeMethod · 0.95

Calls 9

QueryMethod · 0.95
SetCellGridMethod · 0.80
SetCellAttributeMethod · 0.80
sizeMethod · 0.45
GetNumberOfComponentsMethod · 0.45
resizeMethod · 0.45
SetComponentMethod · 0.45
DataMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected