------------------------------------------------------------------------------ Override this method because of blanking
| 1834 | //------------------------------------------------------------------------------ |
| 1835 | // Override this method because of blanking |
| 1836 | void vtkImageData::ComputeScalarRange() |
| 1837 | { |
| 1838 | if (this->GetMTime() > this->ScalarRangeComputeTime) |
| 1839 | { |
| 1840 | vtkDataArray* ptScalars = this->PointData->GetScalars(); |
| 1841 | vtkDataArray* cellScalars = this->CellData->GetScalars(); |
| 1842 | double ptRange[2]; |
| 1843 | double cellRange[2]; |
| 1844 | double s; |
| 1845 | |
| 1846 | ptRange[0] = VTK_DOUBLE_MAX; |
| 1847 | ptRange[1] = VTK_DOUBLE_MIN; |
| 1848 | if (ptScalars) |
| 1849 | { |
| 1850 | vtkIdType num = this->GetNumberOfPoints(); |
| 1851 | for (vtkIdType id = 0; id < num; ++id) |
| 1852 | { |
| 1853 | if (this->IsPointVisible(id)) |
| 1854 | { |
| 1855 | s = ptScalars->GetComponent(id, 0); |
| 1856 | if (!std::isnan(s)) |
| 1857 | { |
| 1858 | ptRange[0] = std::min(s, ptRange[0]); |
| 1859 | ptRange[1] = std::max(s, ptRange[1]); |
| 1860 | } |
| 1861 | } |
| 1862 | } |
| 1863 | } |
| 1864 | |
| 1865 | cellRange[0] = ptRange[0]; |
| 1866 | cellRange[1] = ptRange[1]; |
| 1867 | if (cellScalars) |
| 1868 | { |
| 1869 | vtkIdType num = this->GetNumberOfCells(); |
| 1870 | for (vtkIdType id = 0; id < num; ++id) |
| 1871 | { |
| 1872 | if (this->IsCellVisible(id)) |
| 1873 | { |
| 1874 | s = cellScalars->GetComponent(id, 0); |
| 1875 | if (!std::isnan(s)) |
| 1876 | { |
| 1877 | cellRange[0] = std::min(s, cellRange[0]); |
| 1878 | cellRange[1] = std::max(s, cellRange[1]); |
| 1879 | } |
| 1880 | } |
| 1881 | } |
| 1882 | } |
| 1883 | |
| 1884 | this->ScalarRange[0] = (cellRange[0] >= VTK_DOUBLE_MAX ? 0.0 : cellRange[0]); |
| 1885 | this->ScalarRange[1] = (cellRange[1] <= VTK_DOUBLE_MIN ? 1.0 : cellRange[1]); |
| 1886 | this->ScalarRangeComputeTime.Modified(); |
| 1887 | } |
| 1888 | } |
| 1889 | |
| 1890 | VTK_ABI_NAMESPACE_END |
nothing calls this directly
no test coverage detected