Commit 2eb08f98 authored by Xiaoxiao Liu's avatar Xiaoxiao Liu Committed by Code Review

Merge topic 'TreeHeatmapItemFix' into master

156390e9 Another approach to fix this degenerate case
110169fd FIX: for degenerate tree with a single leave.
parents 3eede655 156390e9
...@@ -140,10 +140,16 @@ void vtkTreeHeatmapItem::SetTree(vtkTree *tree) ...@@ -140,10 +140,16 @@ void vtkTreeHeatmapItem::SetTree(vtkTree *tree)
} }
} }
double rangeMinimum = 2.0;
if (numLeavesInBiggestSubTree < rangeMinimum)
{
rangeMinimum = numLeavesInBiggestSubTree;
}
this->TriangleLookupTable->SetNumberOfTableValues(256); this->TriangleLookupTable->SetNumberOfTableValues(256);
this->TriangleLookupTable->SetHueRange(0.5, 0.045); this->TriangleLookupTable->SetHueRange(0.5, 0.045);
this->TriangleLookupTable->SetRange( this->TriangleLookupTable->SetRange(
2.0, static_cast<double>(numLeavesInBiggestSubTree)); rangeMinimum, static_cast<double>(numLeavesInBiggestSubTree));
this->TriangleLookupTable->Build(); this->TriangleLookupTable->Build();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment