MCPcopy Create free account
hub / github.com/Kitware/VTK / RebuildBuffers

Method RebuildBuffers

Views/Infovis/vtkDendrogramItem.cxx:226–276  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

224
225//------------------------------------------------------------------------------
226void vtkDendrogramItem::RebuildBuffers()
227{
228 if (this->Tree->GetNumberOfVertices() == 0)
229 {
230 return;
231 }
232
233 // Special case where our input tree has been modified. Refresh PrunedTree
234 // to be an up-to-date full copy of it.
235 if (this->Tree->GetMTime() > this->PrunedTree->GetMTime())
236 {
237 this->PrunedTree->DeepCopy(this->Tree);
238 }
239
240 int orientation = this->GetOrientation();
241
242 vtkNew<vtkTreeLayoutStrategy> strategy;
243
244 if (this->PrunedTree->GetVertexData()->GetAbstractArray(this->DistanceArrayName.c_str()) !=
245 nullptr)
246 {
247 strategy->SetDistanceArrayName(this->DistanceArrayName.c_str());
248 }
249
250 strategy->SetLeafSpacing(1.0);
251
252 strategy->SetRotation(this->GetAngleForOrientation(orientation));
253
254 this->Layout->SetLayoutStrategy(strategy);
255 this->Layout->SetInputData(this->PrunedTree);
256 this->Layout->Update();
257 this->LayoutTree = vtkTree::SafeDownCast(this->Layout->GetOutput());
258
259 this->CountLeafNodes();
260 this->ComputeMultipliers();
261 this->ComputeBounds();
262
263 if (this->ColorTree && !this->LegendPositionSet)
264 {
265 this->PositionColorLegend();
266 }
267
268 if (this->PrunedTree->GetMTime() > this->MTime)
269 {
270 this->DendrogramBuildTime = this->PrunedTree->GetMTime();
271 }
272 else
273 {
274 this->DendrogramBuildTime = this->MTime;
275 }
276}
277
278//------------------------------------------------------------------------------
279void vtkDendrogramItem::ComputeMultipliers()

Callers 1

PrepareToPaintMethod · 0.95

Calls 15

GetOrientationMethod · 0.95
CountLeafNodesMethod · 0.95
ComputeMultipliersMethod · 0.95
ComputeBoundsMethod · 0.95
PositionColorLegendMethod · 0.95
GetNumberOfVerticesMethod · 0.80
GetAbstractArrayMethod · 0.80
GetVertexDataMethod · 0.80
SetRotationMethod · 0.80
GetMTimeMethod · 0.45
DeepCopyMethod · 0.45

Tested by

no test coverage detected