------------------------------------------------------------------------------ Override this method because of blanking
| 921 | //------------------------------------------------------------------------------ |
| 922 | // Override this method because of blanking |
| 923 | void vtkExplicitStructuredGrid::ComputeScalarRange() |
| 924 | { |
| 925 | if (this->GetMTime() > this->ScalarRangeComputeTime) |
| 926 | { |
| 927 | vtkDataArray* ptScalars = this->PointData->GetScalars(); |
| 928 | vtkDataArray* cellScalars = this->CellData->GetScalars(); |
| 929 | |
| 930 | double ptRange[2]; |
| 931 | ptRange[0] = VTK_DOUBLE_MAX; |
| 932 | ptRange[1] = VTK_DOUBLE_MIN; |
| 933 | if (ptScalars) |
| 934 | { |
| 935 | int num = this->GetNumberOfPoints(); |
| 936 | for (int id = 0; id < num; id++) |
| 937 | { |
| 938 | double s = ptScalars->GetComponent(id, 0); |
| 939 | ptRange[0] = std::min(s, ptRange[0]); |
| 940 | ptRange[1] = std::max(s, ptRange[1]); |
| 941 | } |
| 942 | } |
| 943 | |
| 944 | double cellRange[2]; |
| 945 | cellRange[0] = ptRange[0]; |
| 946 | cellRange[1] = ptRange[1]; |
| 947 | if (cellScalars) |
| 948 | { |
| 949 | int num = this->GetNumberOfCells(); |
| 950 | for (int id = 0; id < num; id++) |
| 951 | { |
| 952 | double s = cellScalars->GetComponent(id, 0); |
| 953 | cellRange[0] = std::min(s, cellRange[0]); |
| 954 | cellRange[1] = std::max(s, cellRange[1]); |
| 955 | } |
| 956 | } |
| 957 | |
| 958 | this->ScalarRange[0] = (cellRange[0] >= VTK_DOUBLE_MAX ? 0.0 : cellRange[0]); |
| 959 | this->ScalarRange[1] = (cellRange[1] <= VTK_DOUBLE_MIN ? 1.0 : cellRange[1]); |
| 960 | |
| 961 | this->ScalarRangeComputeTime.Modified(); |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | //------------------------------------------------------------------------------ |
| 966 | vtkExplicitStructuredGrid* vtkExplicitStructuredGrid::GetData(vtkInformation* info) |
nothing calls this directly
no test coverage detected