-
David Thompson authored
Determining unique values is the "abstract" (or categorical) equivalent of determining the range of interval-valued array. It only makes sense for arrays with a small number of distinct values, and this also happens to be when it is computationally efficient to compute. This adds methods `GetUniqueComponentValues` and `UpdateDiscreteValueSet` to `vtkAbstractArray`. The `GetUniqueComponentValues` method populates a `vtkVariantArray` you pass with a list of unique values taken on by a component, or, clears it to an empty array if there are more than `vtkAbstractArray::MAX_DISCRETE_VALUES` distinct values present. The unique values are identified by sampling at most log2(n) tuples for large arrays, so obtaining the summary information -- which is cached once computed -- is an inexpensive operation. This does mean that rare observations will go undetected. You may also obtain a list of unique *tuples* instead of unique component values by passing -1 for th...
1df5d6a2