forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkTreeHeatmapItem.cxx
638 lines (551 loc) · 19.8 KB
/
vtkTreeHeatmapItem.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
/*=========================================================================
Program: Visualization Toolkit
Module: vtkTreeHeatmapItem.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkTreeHeatmapItem.h"
#include "vtkDendrogramItem.h"
#include "vtkHeatmapItem.h"
#include "vtkDataSetAttributes.h"
#include "vtkBitArray.h"
#include "vtkObjectFactory.h"
#include "vtkStringArray.h"
#include "vtkTable.h"
#include "vtkTree.h"
#include <algorithm>
vtkStandardNewMacro(vtkTreeHeatmapItem);
//-----------------------------------------------------------------------------
vtkTreeHeatmapItem::vtkTreeHeatmapItem()
{
this->Interactive = true;
this->Orientation = vtkDendrogramItem::LEFT_TO_RIGHT;
this->TreeHeatmapBuildTime = 0;
this->Dendrogram = vtkSmartPointer<vtkDendrogramItem>::New();
this->Dendrogram->ExtendLeafNodesOn();
this->Dendrogram->SetVisible(false);
this->AddItem(this->Dendrogram);
this->ColumnDendrogram = vtkSmartPointer<vtkDendrogramItem>::New();
this->ColumnDendrogram->ExtendLeafNodesOn();
this->ColumnDendrogram->SetVisible(false);
this->ColumnDendrogram->SetDrawLabels(false);
this->AddItem(this->ColumnDendrogram);
this->Heatmap = vtkSmartPointer<vtkHeatmapItem>::New();
this->Heatmap->SetVisible(false);
this->AddItem(this->Heatmap);
this->ColumnDendrogram->SetLeafSpacing(this->Heatmap->GetCellWidth());
}
//-----------------------------------------------------------------------------
vtkTreeHeatmapItem::~vtkTreeHeatmapItem()
{
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetTree(vtkTree *tree)
{
this->Dendrogram->SetTree(tree);
if (tree == NULL)
{
return;
}
if (this->GetTable() != NULL &&
this->GetTable()->GetNumberOfRows() != 0)
{
this->Dendrogram->SetDrawLabels(false);
}
this->Dendrogram->SetVisible(true);
// rearrange our table to match the order of the leaf nodes in this tree.
if (this->GetTable() != NULL && this->GetTable()->GetNumberOfRows() != 0)
{
this->ReorderTable();
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetTable(vtkTable *table)
{
this->Heatmap->SetTable(table);
if (table == NULL)
{
return;
}
if (this->Dendrogram->GetTree() != NULL &&
this->Dendrogram->GetTree()->GetNumberOfVertices() != 0)
{
this->Dendrogram->SetDrawLabels(false);
}
this->Heatmap->SetVisible(true);
// rearrange our table to match the order of the leaf nodes in this tree.
if (this->GetTree() != NULL && this->GetTree()->GetNumberOfVertices() != 0)
{
this->ReorderTable();
}
// add an array to this table's field data to keep track of collapsed rows
// (unless it already has the array)
vtkBitArray *existingRowsArray = vtkBitArray::SafeDownCast(
this->GetTable()->GetFieldData()->GetArray("collapsed rows"));
if (existingRowsArray)
{
for(vtkIdType row = 0; row < this->GetTable()->GetNumberOfRows(); ++row)
{
existingRowsArray->SetValue(row, 0);
}
}
else
{
vtkSmartPointer<vtkBitArray> collapsedRowsArray =
vtkSmartPointer<vtkBitArray>::New();
collapsedRowsArray->SetNumberOfComponents(1);
collapsedRowsArray->SetName("collapsed rows");
for(vtkIdType row = 0; row < this->GetTable()->GetNumberOfRows(); ++row)
{
collapsedRowsArray->InsertNextValue(0);
}
this->GetTable()->GetFieldData()->AddArray(collapsedRowsArray);
}
// add an array to this table's field data to keep track of collapsed columns
// (unless it already has the array)
vtkBitArray *existingColumnsArray = vtkBitArray::SafeDownCast(
this->GetTable()->GetFieldData()->GetArray("collapsed columns"));
if (existingColumnsArray)
{
for(vtkIdType col = 0; col < this->GetTable()->GetNumberOfColumns(); ++col)
{
existingColumnsArray->SetValue(col, 0);
}
}
else
{
vtkSmartPointer<vtkBitArray> collapsedColumnsArray =
vtkSmartPointer<vtkBitArray>::New();
collapsedColumnsArray->SetNumberOfComponents(1);
collapsedColumnsArray->SetName("collapsed columns");
for(vtkIdType col = 0; col < this->GetTable()->GetNumberOfColumns(); ++col)
{
collapsedColumnsArray->InsertNextValue(0);
}
this->GetTable()->GetFieldData()->AddArray(collapsedColumnsArray);
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetColumnTree(vtkTree *tree)
{
this->ColumnDendrogram->SetTree(tree);
if (tree == NULL)
{
return;
}
if (this->Orientation == vtkDendrogramItem::LEFT_TO_RIGHT ||
this->Orientation == vtkDendrogramItem::RIGHT_TO_LEFT)
{
this->ColumnDendrogram->SetOrientation(vtkDendrogramItem::UP_TO_DOWN);
}
else
{
this->ColumnDendrogram->SetOrientation(vtkDendrogramItem::RIGHT_TO_LEFT);
}
this->ColumnDendrogram->SetVisible(true);
}
//-----------------------------------------------------------------------------
vtkTree * vtkTreeHeatmapItem::GetColumnTree()
{
return this->ColumnDendrogram->GetTree();
}
//-----------------------------------------------------------------------------
vtkDendrogramItem * vtkTreeHeatmapItem::GetDendrogram()
{
return this->Dendrogram.GetPointer();
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetDendrogram(vtkDendrogramItem *dendrogram)
{
this->Dendrogram = dendrogram;
}
//-----------------------------------------------------------------------------
vtkHeatmapItem * vtkTreeHeatmapItem::GetHeatmap()
{
return this->Heatmap.GetPointer();
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetHeatmap(vtkHeatmapItem *heatmap)
{
this->Heatmap = heatmap;
}
//-----------------------------------------------------------------------------
vtkTree * vtkTreeHeatmapItem::GetTree()
{
return this->Dendrogram->GetTree();
}
//-----------------------------------------------------------------------------
vtkTable * vtkTreeHeatmapItem::GetTable()
{
return this->Heatmap->GetTable();
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::ReorderTable()
{
// make a copy of our table.
vtkNew<vtkTable> tableCopy;
tableCopy->DeepCopy(this->GetTable());
// grab a separate copy of the row names column.
vtkNew<vtkStringArray> rowNames;
rowNames->DeepCopy(this->Heatmap->GetRowNames());
// we also need to know which number column it is
vtkIdType rowNamesColNum = 0;
for (vtkIdType col = 0; col < this->GetTable()->GetNumberOfColumns(); ++col)
{
if (this->GetTable()->GetColumn(col) == this->Heatmap->GetRowNames())
{
rowNamesColNum = col;
break;
}
}
// empty out our original table.
for (vtkIdType row = this->GetTable()->GetNumberOfRows() - 1; row > -1; --row)
{
this->GetTable()->RemoveRow(row);
}
// get the names of the vertices in our tree.
vtkStringArray *vertexNames = vtkStringArray::SafeDownCast(
this->GetTree()->GetVertexData()->GetAbstractArray("node name"));
for (vtkIdType vertex = 0; vertex < this->GetTree()->GetNumberOfVertices();
++vertex)
{
if (!this->GetTree()->IsLeaf(vertex))
{
continue;
}
// find the row in the table that corresponds to this vertex
std::string vertexName = vertexNames->GetValue(vertex);
vtkIdType tableRow = rowNames->LookupValue(vertexName);
if (tableRow < 0)
{
vtkIdType newRowNum = this->GetTable()->InsertNextBlankRow();
this->GetTable()->SetValue(newRowNum, rowNamesColNum,
vtkVariant(vertexName));
this->Heatmap->MarkRowAsBlank(vertexName);
continue;
}
// copy it back into our original table
this->GetTable()->InsertNextRow(tableCopy->GetRow(tableRow));
}
if (this->Orientation == vtkDendrogramItem::DOWN_TO_UP ||
this->Orientation == vtkDendrogramItem::UP_TO_DOWN)
{
this->ReverseTableColumns();
}
if (this->Orientation == vtkDendrogramItem::RIGHT_TO_LEFT ||
this->Orientation == vtkDendrogramItem::DOWN_TO_UP)
{
this->ReverseTableRows();
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::ReverseTableRows()
{
// make a copy of our table and then empty out the original.
vtkNew<vtkTable> tableCopy;
tableCopy->DeepCopy(this->GetTable());
for (vtkIdType row = 0; row < tableCopy->GetNumberOfRows(); ++row)
{
this->GetTable()->RemoveRow(row);
}
// re-insert the rows back into our original table in reverse order
for (vtkIdType tableRow = tableCopy->GetNumberOfRows() - 1; tableRow >= 0;
--tableRow)
{
this->GetTable()->InsertNextRow(tableCopy->GetRow(tableRow));
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::ReverseTableColumns()
{
// make a copy of our table and then empty out the original.
vtkNew<vtkTable> tableCopy;
tableCopy->DeepCopy(this->GetTable());
for (vtkIdType col = tableCopy->GetNumberOfColumns() - 1; col > 0; --col)
{
this->GetTable()->RemoveColumn(col);
}
// re-insert the columns back into our original table in reverse order
for (vtkIdType col = tableCopy->GetNumberOfColumns() - 1; col >= 1; --col)
{
this->GetTable()->AddColumn(tableCopy->GetColumn(col));
}
}
//-----------------------------------------------------------------------------
bool vtkTreeHeatmapItem::Paint(vtkContext2D *painter)
{
this->Dendrogram->Paint(painter);
double treeBounds[4];
this->Dendrogram->GetBounds(treeBounds);
double spacing = this->Dendrogram->GetLeafSpacing() / 2.0;
double heatmapStartX, heatmapStartY;
switch (this->Orientation)
{
case vtkDendrogramItem::UP_TO_DOWN:
heatmapStartX = treeBounds[0] - spacing;
heatmapStartY = treeBounds[2] - (this->GetTable()->GetNumberOfColumns() - 1) *
this->Heatmap->GetCellWidth() - spacing;
break;
case vtkDendrogramItem::DOWN_TO_UP:
heatmapStartX = treeBounds[0] - spacing;
heatmapStartY = treeBounds[3] + spacing;
break;
case vtkDendrogramItem::RIGHT_TO_LEFT:
heatmapStartX = treeBounds[0] - (this->GetTable()->GetNumberOfColumns() - 1) *
this->Heatmap->GetCellWidth() - spacing;
heatmapStartY = treeBounds[2] - spacing;
break;
case vtkDendrogramItem::LEFT_TO_RIGHT:
default:
heatmapStartX = treeBounds[1] + spacing;
heatmapStartY = treeBounds[2] - spacing;
break;
}
this->Heatmap->SetPosition(heatmapStartX, heatmapStartY);
this->Heatmap->Paint(painter);
if (this->ColumnDendrogram->GetVisible())
{
double columnTreeStartX, columnTreeStartY;
double heatmapBounds[4];
this->Heatmap->GetBounds(heatmapBounds);
this->ColumnDendrogram->PrepareToPaint(painter);
this->ColumnDendrogram->GetBounds(treeBounds);
float offset = 0.0;
if (this->Heatmap->GetRowLabelWidth() > 0.0)
{
offset = this->Heatmap->GetRowLabelWidth() + spacing;
}
switch (this->Orientation)
{
case vtkDendrogramItem::UP_TO_DOWN:
columnTreeStartX = heatmapBounds[1] + (treeBounds[1] - treeBounds[0]) +
spacing;
columnTreeStartY = heatmapBounds[3] -
this->ColumnDendrogram->GetLeafSpacing() / 2.0;
break;
case vtkDendrogramItem::DOWN_TO_UP:
columnTreeStartX = heatmapBounds[1] + (treeBounds[1] - treeBounds[0]) +
spacing;
columnTreeStartY = heatmapBounds[3] - offset -
this->ColumnDendrogram->GetLeafSpacing() / 2.0;
break;
case vtkDendrogramItem::RIGHT_TO_LEFT:
columnTreeStartX = heatmapBounds[0] + offset +
this->ColumnDendrogram->GetLeafSpacing() / 2.0;
columnTreeStartY = heatmapBounds[3] + spacing +
(treeBounds[3] - treeBounds[2]);
break;
case vtkDendrogramItem::LEFT_TO_RIGHT:
default:
columnTreeStartX = heatmapBounds[0] +
this->ColumnDendrogram->GetLeafSpacing() / 2.0;
columnTreeStartY = heatmapBounds[3] + spacing +
(treeBounds[3] - treeBounds[2]);
break;
}
this->ColumnDendrogram->SetPosition(columnTreeStartX, columnTreeStartY);
this->ColumnDendrogram->Paint(painter);
}
return true;
}
//-----------------------------------------------------------------------------
bool vtkTreeHeatmapItem::MouseDoubleClickEvent(
const vtkContextMouseEvent &event)
{
bool treeChanged = this->Dendrogram->MouseDoubleClickEvent(event);
// update the heatmap if a subtree just collapsed or expanded.
if (treeChanged)
{
this->CollapseHeatmapRows();
}
else
{
treeChanged = this->ColumnDendrogram->MouseDoubleClickEvent(event);
if (treeChanged)
{
this->CollapseHeatmapColumns();
}
}
return treeChanged;
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::CollapseHeatmapRows()
{
vtkBitArray *collapsedRowsArray = vtkBitArray::SafeDownCast(
this->GetTable()->GetFieldData()->GetArray("collapsed rows"));
vtkStringArray *vertexNames = vtkStringArray::SafeDownCast(
this->Dendrogram->GetPrunedTree()->GetVertexData()
->GetAbstractArray("node name"));
vtkStringArray *rowNames = this->Heatmap->GetRowNames();
if (!rowNames)
{
return;
}
for (vtkIdType row = 0; row < this->GetTable()->GetNumberOfRows(); ++row)
{
std::string name = rowNames->GetValue(row);
// if we can't find this name in the layout tree, then the corresponding
// row in the heatmap should be marked as collapsed.
if (vertexNames->LookupValue(name) == -1)
{
collapsedRowsArray->SetValue(row, 1);
}
else
{
collapsedRowsArray->SetValue(row, 0);
}
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::CollapseHeatmapColumns()
{
vtkBitArray *collapsedColumnsArray = vtkBitArray::SafeDownCast(
this->GetTable()->GetFieldData()->GetArray("collapsed columns"));
vtkStringArray *vertexNames = vtkStringArray::SafeDownCast(
this->ColumnDendrogram->GetPrunedTree()->GetVertexData()
->GetAbstractArray("node name"));
for (vtkIdType col = 1; col < this->GetTable()->GetNumberOfColumns(); ++col)
{
std::string name = this->GetTable()->GetColumn(col)->GetName();
// if we can't find this name in the layout tree, then the corresponding
// column in the heatmap should be marked as collapsed.
if (vertexNames->LookupValue(name) == -1)
{
collapsedColumnsArray->SetValue(col, 1);
}
else
{
collapsedColumnsArray->SetValue(col, 0);
}
}
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetOrientation(int orientation)
{
int previousOrientation = this->Orientation;
this->Orientation = orientation;
this->Dendrogram->SetOrientation(this->Orientation);
this->Heatmap->SetOrientation(this->Orientation);
if (this->Orientation == vtkDendrogramItem::LEFT_TO_RIGHT ||
this->Orientation == vtkDendrogramItem::RIGHT_TO_LEFT)
{
this->ColumnDendrogram->SetOrientation(vtkDendrogramItem::UP_TO_DOWN);
}
else
{
this->ColumnDendrogram->SetOrientation(vtkDendrogramItem::RIGHT_TO_LEFT);
}
// reverse our table if we're changing from a "not backwards" orientation
// to one that it backwards.
if ( (this->Orientation == vtkDendrogramItem::UP_TO_DOWN ||
this->Orientation == vtkDendrogramItem::DOWN_TO_UP) &&
(previousOrientation != vtkDendrogramItem::UP_TO_DOWN &&
previousOrientation != vtkDendrogramItem::DOWN_TO_UP) )
{
this->ReverseTableColumns();
}
if ( (this->Orientation == vtkDendrogramItem::RIGHT_TO_LEFT ||
this->Orientation == vtkDendrogramItem::DOWN_TO_UP) &&
(previousOrientation != vtkDendrogramItem::RIGHT_TO_LEFT &&
previousOrientation != vtkDendrogramItem::DOWN_TO_UP) )
{
this->ReverseTableRows();
}
}
//-----------------------------------------------------------------------------
int vtkTreeHeatmapItem::GetOrientation()
{
return this->Orientation;
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::GetBounds(double bounds[4])
{
double treeBounds[4] =
{VTK_DOUBLE_MAX, VTK_DOUBLE_MIN, VTK_DOUBLE_MAX, VTK_DOUBLE_MIN};
if (this->GetTree()->GetNumberOfVertices() > 0)
{
this->Dendrogram->GetBounds(treeBounds);
}
double tableBounds[4] =
{VTK_DOUBLE_MAX, VTK_DOUBLE_MIN, VTK_DOUBLE_MAX, VTK_DOUBLE_MIN};
if (this->GetTable()->GetNumberOfRows() > 0)
{
this->Heatmap->GetBounds(tableBounds);
}
double columnTreeBounds[4] =
{VTK_DOUBLE_MAX, VTK_DOUBLE_MIN, VTK_DOUBLE_MAX, VTK_DOUBLE_MIN};
if (this->ColumnDendrogram->GetTree() != NULL)
{
this->ColumnDendrogram->GetBounds(columnTreeBounds);
}
double xMin, xMax, yMin, yMax;
xMin = std::min(std::min(treeBounds[0], tableBounds[0]), columnTreeBounds[0]);
xMax = std::max(std::max(treeBounds[1], tableBounds[1]), columnTreeBounds[1]);
yMin = std::min(std::min(treeBounds[2], tableBounds[2]), columnTreeBounds[2]);
yMax = std::max(std::max(treeBounds[3], tableBounds[3]), columnTreeBounds[3]);
bounds[0] = xMin;
bounds[1] = xMax;
bounds[2] = yMin;
bounds[3] = yMax;
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::GetCenter(double center[2])
{
double bounds[4];
this->GetBounds(bounds);
center[0] = bounds[0] + (bounds[1] - bounds[0]) / 2.0;
center[1] = bounds[2] + (bounds[3] - bounds[2]) / 2.0;
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::GetSize(double size[2])
{
double bounds[4];
this->GetBounds(bounds);
size[0] = fabs(bounds[1] - bounds[0]);
size[1] = fabs(bounds[3] - bounds[2]);
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetTreeColorArray(const char *arrayName)
{
this->Dendrogram->SetColorArray(arrayName);
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::CollapseToNumberOfLeafNodes(unsigned int n)
{
this->Dendrogram->CollapseToNumberOfLeafNodes(n);
this->CollapseHeatmapRows();
}
//-----------------------------------------------------------------------------
float vtkTreeHeatmapItem::GetTreeLineWidth()
{
return this->Dendrogram->GetLineWidth();
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::SetTreeLineWidth(float width)
{
this->Dendrogram->SetLineWidth(width);
this->ColumnDendrogram->SetLineWidth(width);
}
//-----------------------------------------------------------------------------
vtkTree * vtkTreeHeatmapItem::GetPrunedTree()
{
return this->Dendrogram->GetPrunedTree();
}
//-----------------------------------------------------------------------------
bool vtkTreeHeatmapItem::Hit(const vtkContextMouseEvent &vtkNotUsed(mouse))
{
// If we are interactive, we want to catch anything that propagates to the
// background, otherwise we do not want any mouse events.
return this->Interactive;
}
//-----------------------------------------------------------------------------
void vtkTreeHeatmapItem::PrintSelf(ostream &os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
this->Dendrogram->PrintSelf(os, indent);
this->Heatmap->PrintSelf(os, indent);
}