// Initialize numbers of colored cells with zero
this->myDistribution->FillComponent(0, 0);
// Create a lookup table to compute a color of a cell
- vtkLookupTable* lut = GetMapperTable();
+ VISU_LookupTable* lut = GetMapperTable();
+ vtkFloatingPointType aMapScale = lut->GetMapScale();
// Get scalar values from the input data to calculate their distribution within cells
vtkDataArray* dataArr;
// Dtermine where we have to take scalars from: cells data or points data.
// For each scalar value
for(vtkIdType aValId = 0; aValId < aNbVals; aValId++){
// Find the color index for this scalar value
- idx = lut->GetIndex(*(dataArr->GetTuple(aValId)));
+ idx = lut->GetIndex(*(dataArr->GetTuple(aValId)) * aMapScale);
// Increment the distribution value for this color index
cnt = this->myDistribution->GetValue(idx);
this->myDistribution->SetValue(idx, cnt + 1);