------------------------------------------------------------------------------ Override this method because of blanking
| 459 | //------------------------------------------------------------------------------ |
| 460 | // Override this method because of blanking |
| 461 | void vtkStructuredGrid::ComputeScalarRange() |
| 462 | { |
| 463 | if (this->GetMTime() > this->ScalarRangeComputeTime) |
| 464 | { |
| 465 | vtkDataArray* ptScalars = this->PointData->GetScalars(); |
| 466 | vtkDataArray* cellScalars = this->CellData->GetScalars(); |
| 467 | double ptRange[2]; |
| 468 | double cellRange[2]; |
| 469 | double s; |
| 470 | |
| 471 | ptRange[0] = VTK_DOUBLE_MAX; |
| 472 | ptRange[1] = VTK_DOUBLE_MIN; |
| 473 | if (ptScalars) |
| 474 | { |
| 475 | vtkIdType num = this->GetNumberOfPoints(); |
| 476 | for (vtkIdType id = 0; id < num; ++id) |
| 477 | { |
| 478 | if (this->IsPointVisible(id)) |
| 479 | { |
| 480 | s = ptScalars->GetComponent(id, 0); |
| 481 | ptRange[0] = std::min(s, ptRange[0]); |
| 482 | ptRange[1] = std::max(s, ptRange[1]); |
| 483 | } |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | cellRange[0] = ptRange[0]; |
| 488 | cellRange[1] = ptRange[1]; |
| 489 | if (cellScalars) |
| 490 | { |
| 491 | vtkIdType num = this->GetNumberOfCells(); |
| 492 | for (vtkIdType id = 0; id < num; ++id) |
| 493 | { |
| 494 | if (this->IsCellVisible(id)) |
| 495 | { |
| 496 | s = cellScalars->GetComponent(id, 0); |
| 497 | cellRange[0] = std::min(s, cellRange[0]); |
| 498 | cellRange[1] = std::max(s, cellRange[1]); |
| 499 | } |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | this->ScalarRange[0] = (cellRange[0] >= VTK_DOUBLE_MAX ? 0.0 : cellRange[0]); |
| 504 | this->ScalarRange[1] = (cellRange[1] <= VTK_DOUBLE_MIN ? 1.0 : cellRange[1]); |
| 505 | |
| 506 | this->ScalarRangeComputeTime.Modified(); |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | //------------------------------------------------------------------------------ |
| 511 | void vtkStructuredGrid::Crop(const int* updateExtent) |
nothing calls this directly
no test coverage detected