------------------------------------------------------------------------------
| 212 | |
| 213 | //------------------------------------------------------------------------------ |
| 214 | void vtkHeatmapItem::GenerateContinuousDataLookupTable() |
| 215 | { |
| 216 | this->ContinuousDataLookupTable->SetNumberOfTableValues(255); |
| 217 | this->ContinuousDataLookupTable->Build(); |
| 218 | this->ContinuousDataLookupTable->SetRange(0, 255); |
| 219 | this->ContinuousDataLookupTable->SetNanColor(0.75, 0.75, 0.75, 1.0); |
| 220 | |
| 221 | // black to red |
| 222 | for (int i = 0; i < 85; ++i) |
| 223 | { |
| 224 | float f = static_cast<float>(i) / 84.0; |
| 225 | this->ContinuousDataLookupTable->SetTableValue(i, f, 0, 0); |
| 226 | } |
| 227 | |
| 228 | // red to yellow |
| 229 | for (int i = 0; i < 85; ++i) |
| 230 | { |
| 231 | float f = static_cast<float>(i) / 84.0; |
| 232 | this->ContinuousDataLookupTable->SetTableValue(85 + i, 1.0, f, 0); |
| 233 | } |
| 234 | |
| 235 | // yellow to white |
| 236 | for (int i = 0; i < 85; ++i) |
| 237 | { |
| 238 | float f = static_cast<float>(i) / 84.0; |
| 239 | this->ContinuousDataLookupTable->SetTableValue(170 + i, 1.0, 1.0, f); |
| 240 | } |
| 241 | |
| 242 | this->ColorLegendLookupTable->DeepCopy(this->ContinuousDataLookupTable); |
| 243 | this->ColorLegend->SetTransferFunction(this->ColorLegendLookupTable); |
| 244 | } |
| 245 | |
| 246 | //------------------------------------------------------------------------------ |
| 247 | void vtkHeatmapItem::AccumulateProminentCategoricalDataValues(vtkIdType column) |
no test coverage detected