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

Function GetRangeOfAllComponents

IO/NetCDF/vtkNetCDFCFReader.cxx:62–78  ·  view source on GitHub ↗

============================================================================= Convenience function for getting the text attribute on a variable. Returns true if the attribute exists, false otherwise.

Source from the content-addressed store, hash-verified

60// Convenience function for getting the text attribute on a variable. Returns
61// true if the attribute exists, false otherwise.
62VTK_ABI_NAMESPACE_BEGIN
63
64//------------------------------------------------------------------------------
65// Convenience function for getting the range of all values in all components of
66// a vtkDoubleArray.
67static void GetRangeOfAllComponents(vtkDoubleArray* array, double range[2])
68{
69 range[0] = VTK_DOUBLE_MAX;
70 range[1] = VTK_DOUBLE_MIN;
71 for (int component = 0; component < array->GetNumberOfComponents(); component++)
72 {
73 double componentRange[2];
74 array->GetRange(componentRange, component);
75 range[0] = std::min(componentRange[0], range[0]);
76 range[1] = std::max(componentRange[1], range[1]);
77 }
78}
79
80//=============================================================================
81vtkNetCDFCFReader::vtkDimensionInfo::vtkDimensionInfo(

Calls 4

minFunction · 0.50
maxFunction · 0.50
GetNumberOfComponentsMethod · 0.45
GetRangeMethod · 0.45

Tested by

no test coverage detected