File: vtkParallelCoordinatesHistogramRepresentation.cxx

package info (click to toggle)
vtk7 7.1.1%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 127,396 kB
  • sloc: cpp: 1,539,584; ansic: 124,382; python: 78,038; tcl: 47,013; xml: 8,142; yacc: 5,040; java: 4,439; perl: 3,132; lex: 1,926; sh: 1,500; makefile: 126; objc: 83
file content (566 lines) | stat: -rw-r--r-- 20,546 bytes parent folder | download | duplicates (3)
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
/*=========================================================================

Program:   Visualization Toolkit
Module:    vtkParallelCoordinatesHistogramRepresentation.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.

=========================================================================*/
/*-------------------------------------------------------------------------
  Copyright 2009 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
#include "vtkParallelCoordinatesHistogramRepresentation.h"
//------------------------------------------------------------------------------
#include "vtkActor2D.h"
#include "vtkArrayIteratorIncludes.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkComputeHistogram2DOutliers.h"
#include "vtkDoubleArray.h"
#include "vtkExtractSelectedPolyDataIds.h"
#include "vtkExtractHistogram2D.h"
#include "vtkFloatArray.h"
#include "vtkIdList.h"
#include "vtkImageData.h"
#include "vtkImageGaussianSmooth.h"
#include "vtkImageMedian3D.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkLookupTable.h"
#include "vtkMath.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkObjectFactory.h"
#include "vtkPairwiseExtractHistogram2D.h"
#include "vtkPointData.h"
#include "vtkPoints.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper2D.h"
#include "vtkPropCollection.h"
#include "vtkProperty2D.h"
#include "vtkRenderer.h"
#include "vtkRenderView.h"
#include "vtkSCurveSpline.h"
#include "vtkSelection.h"
#include "vtkSelectionNode.h"
#include "vtkStringArray.h"
#include "vtkTable.h"
#include "vtkUnsignedIntArray.h"
#include "vtkViewTheme.h"
//------------------------------------------------------------------------------
vtkStandardNewMacro(vtkParallelCoordinatesHistogramRepresentation);
//------------------------------------------------------------------------------
vtkParallelCoordinatesHistogramRepresentation::vtkParallelCoordinatesHistogramRepresentation()
{
  this->SetNumberOfInputPorts(vtkParallelCoordinatesHistogramRepresentation::NUM_INPUT_PORTS);

  this->UseHistograms = 0;
  this->HistogramLookupTableRange[0] = 0.0;
  this->HistogramLookupTableRange[1] = -1.0;

  this->HistogramFilter = vtkSmartPointer<vtkPairwiseExtractHistogram2D>::New();
  this->HistogramFilter->SetInputData(this->InputArrayTable);

  this->HistogramLookupTable = vtkSmartPointer<vtkLookupTable>::New();
  this->HistogramLookupTable->SetAlphaRange(0,1);
  this->HistogramLookupTable->SetHueRange(1,1);
  this->HistogramLookupTable->SetValueRange(1,1);
  this->HistogramLookupTable->SetSaturationRange(0,0);
  this->HistogramLookupTable->ForceBuild();

  this->PlotMapper->SetScalarModeToUseCellData();
  this->PlotMapper->UseLookupTableScalarRangeOn();
  this->PlotMapper->SetLookupTable(this->HistogramLookupTable);
  this->PlotMapper->ScalarVisibilityOff();

  this->ShowOutliers = 0;

  this->OutlierFilter = vtkSmartPointer<vtkComputeHistogram2DOutliers>::New();
  this->OutlierFilter->SetInputData(vtkComputeHistogram2DOutliers::INPUT_TABLE_DATA,
                                    this->InputArrayTable);
//                                          this->HistogramFilter->GetOutputPort(vtkPairwiseExtractHistogram2D::REORDERED_INPUT));
  this->OutlierFilter->SetInputConnection(vtkComputeHistogram2DOutliers::INPUT_HISTOGRAMS_MULTIBLOCK,
                                          this->HistogramFilter->GetOutputPort(vtkPairwiseExtractHistogram2D::HISTOGRAM_IMAGE));

  this->OutlierData = vtkSmartPointer<vtkPolyData>::New();
  this->OutlierActor = vtkSmartPointer<vtkActor2D>::New();
  this->OutlierActor->GetProperty()->SetColor(1,1,1);
  this->OutlierMapper = vtkSmartPointer<vtkPolyDataMapper2D>::New();
  this->OutlierMapper.TakeReference(this->InitializePlotMapper(this->OutlierData,this->OutlierActor));

  this->SetHistogramLookupTableRange(0,10);
  this->SetPreferredNumberOfOutliers(100);
  this->SetNumberOfHistogramBins(10,10);

  // Apply default theme
  // you would think that calling this in the superclass would take care of it,
  // but it turns out that the superclass constructor will only call its own
  // version there.  So I have to call it again to make sure that the local
  // version gets called.
  vtkViewTheme* theme = vtkViewTheme::New();
  theme->SetCellOpacity(1.0);
  theme->SetCellColor(1.0,1.0,1.0);
  theme->SetEdgeLabelColor(1.0,.8,.3);
  this->ApplyViewTheme(theme);
  theme->Delete();
}
//------------------------------------------------------------------------------
vtkParallelCoordinatesHistogramRepresentation::~vtkParallelCoordinatesHistogramRepresentation()
{
}
//------------------------------------------------------------------------------
// Histogram quad color is defined by theme->CellColor
void vtkParallelCoordinatesHistogramRepresentation::ApplyViewTheme(vtkViewTheme* theme)
{
  this->Superclass::ApplyViewTheme(theme);

  double *c = theme->GetCellColor();
  double hsv[3] = {0,0,0};
  vtkMath::RGBToHSV(c,hsv);
  this->HistogramLookupTable->SetHueRange(hsv[0],hsv[0]);
  this->HistogramLookupTable->SetSaturationRange(hsv[1],hsv[1]);
  this->HistogramLookupTable->SetValueRange(hsv[2],hsv[2]);
  this->HistogramLookupTable->ForceBuild();
}
//------------------------------------------------------------------------------
// Make sure all of the histogram/outlier stuff is up-to-date.  Also, if not using
// histograms, make sure that lookup table for the plot data mapper is
// disabled, since that's the behavior for the parent class.
int vtkParallelCoordinatesHistogramRepresentation::ComputeDataProperties()
{
  if (!this->Superclass::ComputeDataProperties())
    return 0;

  if (this->UseHistograms)
  {
    this->GetHistogramImage(0);
    this->SetHistogramLookupTableRange(0,this->HistogramFilter->GetMaximumBinCount());
    this->HistogramLookupTable->SetRange(this->HistogramLookupTableRange[0],this->HistogramLookupTableRange[1]);
    this->PlotMapper->ScalarVisibilityOn();
  }
  else
  {
    this->PlotMapper->ScalarVisibilityOff();
  }

  if (this->ShowOutliers)
  {
    this->OutlierActor->VisibilityOn();
  }
  else
  {
    this->OutlierActor->VisibilityOff();
  }

  return 1;
}
//------------------------------------------------------------------------------
// outliers have the same properties as plot lines.
int vtkParallelCoordinatesHistogramRepresentation::UpdatePlotProperties(vtkStringArray* inputTitles)
{
  if (!this->Superclass::UpdatePlotProperties(inputTitles))
    return 0;

  this->OutlierActor->GetProperty()->SetOpacity(this->LineOpacity);
  this->OutlierActor->GetProperty()->SetColor(this->LineColor);

  return 1;
}
//------------------------------------------------------------------------------
int vtkParallelCoordinatesHistogramRepresentation::RequestData(
  vtkInformation* request,
  vtkInformationVector** inputVector,
  vtkInformationVector* outputVector)
{
  // do everything the superclass does
  //  * histogram quad computation happens automatically since this
  //  class overrides the plotting functions.
  if (!this->Superclass::RequestData(request,inputVector,outputVector))
    return 0;

  // but also show outliers
  if (this->ShowOutliers)
  {
    vtkTable* outlierTable = this->GetOutlierData();

    if (this->UseCurves)
    {
      vtkParallelCoordinatesRepresentation::PlaceCurves(this->OutlierData,outlierTable,NULL);
    }
    else
    {
      vtkParallelCoordinatesRepresentation::PlaceLines(this->OutlierData,outlierTable,NULL);
    }

  }

  this->BuildTime.Modified();

  return 1;
}
//------------------------------------------------------------------------------
bool vtkParallelCoordinatesHistogramRepresentation::AddToView(vtkView* view)
{
  this->Superclass::AddToView(view);
  vtkRenderView* rv = vtkRenderView::SafeDownCast(view);
  if (rv)
  {
    rv->GetRenderer()->AddActor(this->OutlierActor);

    // not sure what these are for
    //rv->RegisterProgress(...);
    return true;
  }
  return false;
}
//------------------------------------------------------------------------------
bool vtkParallelCoordinatesHistogramRepresentation::RemoveFromView(vtkView* view)
{
  this->Superclass::RemoveFromView(view);
  vtkRenderView* rv = vtkRenderView::SafeDownCast(view);
  if (rv)
  {
    rv->GetRenderer()->RemoveActor(this->OutlierActor);

    // not sure what these are for
    //rv->UnRegisterProgress(this->OutlineMapper);
    return true;
  }
  return false;
}
//------------------------------------------------------------------------------
// redirect the line plotting function to the histogram plotting function,
// if histograms are enabled
int vtkParallelCoordinatesHistogramRepresentation::PlaceLines(vtkPolyData* polyData,
                                                              vtkTable* data,
                                                              vtkIdTypeArray* idsToPlot)
{
  if (this->UseHistograms)
  {
    return this->PlaceHistogramLineQuads(polyData);
  }
  else
  {
    return this->Superclass::PlaceLines(polyData,data,idsToPlot);
  }
}
//------------------------------------------------------------------------------
// redirect the line plotting function to the histogram plotting function,
// if histograms are enabled
int vtkParallelCoordinatesHistogramRepresentation::PlaceCurves(vtkPolyData* polyData,
                                                               vtkTable* data,
                                                               vtkIdTypeArray* idsToPlot)
{
  if (this->UseHistograms)
  {
    return this->PlaceHistogramCurveQuads(polyData);
  }
  else
  {
    return this->Superclass::PlaceCurves(polyData,data,idsToPlot);
  }
}
//------------------------------------------------------------------------------
// this is a bit tricky.  This class plots selections as lines, regardless
// of whether or not histograms are enabled.  That means it needs to explicitly
// call the superclass plotting functions on the selection so that the
// histogram plotting functions don't get used.
int vtkParallelCoordinatesHistogramRepresentation::PlaceSelection(vtkPolyData* polyData,
                                                                  vtkTable* data,
                                                                  vtkSelectionNode* selectionNode)
{
  vtkIdTypeArray* selectedIds = vtkArrayDownCast<vtkIdTypeArray>(selectionNode->GetSelectionList());
  if (!selectedIds)
    return 1;

  if (this->UseCurves)
  {
    this->Superclass::PlaceCurves(polyData,data,selectedIds);
  }
  else
  {
    this->Superclass::PlaceLines(polyData,data,selectedIds);
  }

  return 1;
}
//------------------------------------------------------------------------------
int vtkParallelCoordinatesHistogramRepresentation::PlaceHistogramLineQuads(vtkPolyData* polyData)
{
  // figure out how many samples there are by looking at each of the
  // histograms and counting the bins.
  int numberOfQuads = 0;
  for (int i=0; i<this->NumberOfAxes-1; i++)
  {
    vtkImageData* histogram = this->GetHistogramImage(i);
    if (histogram)
      numberOfQuads += histogram->GetPointData()->GetScalars()->GetNumberOfTuples();
  }

  if (this->UseCurves)
    numberOfQuads *= this->CurveResolution;

  this->AllocatePolyData(polyData,0,0,0,0,
                         numberOfQuads,
                         numberOfQuads*4,
                         numberOfQuads,0);

  vtkPoints* points = polyData->GetPoints();
  float* pointsp = vtkArrayDownCast<vtkFloatArray>(points->GetData())->GetPointer(0);

  vtkDoubleArray* scalars = vtkArrayDownCast<vtkDoubleArray>(polyData->GetCellData()->GetScalars());
  double* scalarsp = scalars->GetPointer(0);//vtkArrayDownCast<vtkDoubleArray>(polyData->GetCellData()->GetScalars());

  // for each histogram, draw a quad for each bin.
  vtkIdType ptId=0;
//  vtkIdType quadId=0;
  for (int pos=0; pos<this->NumberOfAxes-1; pos++)
  {
    int dims[3] = {0,0,0};
    double spacing[3] = {0,0,0};
    vtkImageData* image = this->GetHistogramImage(pos);
    if (!image)
      continue;
    image->GetDimensions(dims);
    image->GetSpacing(spacing);

    double binWidth[] = { (this->YMax-this->YMin)/static_cast<double>(dims[0]),
                          (this->YMax-this->YMin)/static_cast<double>(dims[1]) };

    double x1[3] = {0.,0.,0.};
    double x2[3] = {0.,0.,0.};
    x1[0] = this->Xs[pos];
    x2[0] = this->Xs[pos+1];

    // for each bin, draw a quad
    for (int y=0; y<dims[1]; y++)
    {
      x2[1] = this->YMin + y * binWidth[1];

      for (int x=0; x<dims[0]; x++)
      {
        x1[1] = this->YMin + x * binWidth[0];

        // the number of rows that fit into this bin
        double v = image->GetScalarComponentAsDouble(x,y,0,0);

        *(pointsp++) = x1[0]; *(pointsp++) = x1[1]+binWidth[0]; *(pointsp++) = 0.; ptId++;
        *(pointsp++) = x1[0]; *(pointsp++) = x1[1]; *(pointsp++) = 0.; ptId++;
        *(pointsp++) = x2[0]; *(pointsp++) = x2[1]; *(pointsp++) = 0.; ptId++;
        *(pointsp++) = x2[0]; *(pointsp++) = x2[1]+binWidth[1]; *(pointsp++) = 0.; ptId++;
        //      points->SetPoint(ptId++, x1[0], x1[1]+binWidth[0], 0.);
//        points->SetPoint(ptId++, x1[0], x1[1], 0.);
//        points->SetPoint(ptId++, x2[0], x2[1], 0.);
//        points->SetPoint(ptId++, x2[0], x2[1]+binWidth[1], 0.);

        // scalars used for lookup table mapping.  More rows
        // in a bin means bright quad.
        //scalars->SetTuple1(quadId++,v);
        *(scalarsp++) = v;//->SetTuple1(quadId++,v);
      }
    }
  }

  polyData->Modified();
  return 1;
}
//------------------------------------------------------------------------------
int vtkParallelCoordinatesHistogramRepresentation::PlaceHistogramCurveQuads(vtkPolyData* polyData)
{
  // figure out how many samples there are by looking at each of the
  // histograms and counting the bins.
  int numberOfStrips = 0;
  for (int i=0; i<this->NumberOfAxes-1; i++)
  {
    vtkImageData* histogram = this->GetHistogramImage(i);
    if (histogram)
      numberOfStrips += histogram->GetPointData()->GetScalars()->GetNumberOfTuples();
  }

  int numberOfPointsPerStrip = this->CurveResolution * 2;

  this->AllocatePolyData(polyData,0,0,
                         numberOfStrips,numberOfPointsPerStrip,0,
                         numberOfStrips*numberOfPointsPerStrip,
                         numberOfStrips,0);

  vtkPoints *points = polyData->GetPoints();
  float* pointsp = vtkArrayDownCast<vtkFloatArray>(points->GetData())->GetPointer(0);

  vtkDoubleArray* scalars = vtkArrayDownCast<vtkDoubleArray>(polyData->GetCellData()->GetScalars());
  double* scalarsp = scalars->GetPointer(0);

  // build the default spline
  vtkSmartPointer<vtkDoubleArray> defSplineValues = vtkSmartPointer<vtkDoubleArray>::New();
  this->BuildDefaultSCurve(defSplineValues,this->CurveResolution);

  vtkIdType ptId=0;
  //vtkIdType stripId = 0;
  for (int pos=0; pos<this->NumberOfAxes-1; pos++)
  {
    int dims[3] = {0,0,0};
    double spacing[3] = {0,0,0};
    vtkImageData* image = this->GetHistogramImage(pos);
    if (!image)
      continue;
    image->GetDimensions(dims);
    image->GetSpacing(spacing);

    double binWidth[] = { (this->YMax-this->YMin)/static_cast<double>(dims[0]),
                          (this->YMax-this->YMin)/static_cast<double>(dims[1]) };


    double x1[3] = {0.,0.,0.};
    double x2[3] = {0.,0.,0.};
    double xc[3] = {0.,0.,0.};
    double w = 0.0;

    x1[0] = this->Xs[pos];
    x2[0] = this->Xs[pos+1];

    double dx = (x2[0]-x1[0]) / static_cast<double>(this->CurveResolution-1);
    double dw = binWidth[1] - binWidth[0];

    for (int y=0; y<dims[1]; y++)
    {
      x2[1] = this->YMin + y * binWidth[1];

      for (int x=0; x<dims[0]; x++)
      {
        x1[1] = this->YMin + x * binWidth[0];

        double v = image->GetScalarComponentAsDouble(x,y,0,0);
        double dy = x2[1] - x1[1];

        for (int c=0; c<this->CurveResolution; c++)
        {
          xc[0] = this->Xs[pos] + dx*c;
          xc[1] = defSplineValues->GetValue(c)*dy + x1[1];//spline->Evaluate(x1[0]);//spline->Evaluate(x1[0]);
          w = defSplineValues->GetValue(c)*dw + binWidth[0];//bwspline->Evaluate(x1[0]);

//          points->SetPoint(ptId++,   xc[0], xc[1]+w, 0.);
//          points->SetPoint(ptId++, xc[0], xc[1], 0.);
          *(pointsp++) = xc[0]; *(pointsp++) = xc[1]+w; *(pointsp++) = 0.0; ptId++;
          *(pointsp++) = xc[0]; *(pointsp++) = xc[1]; *(pointsp++) = 0.0; ptId++;
        }

        *(scalarsp++) = v;//->SetTuple1(stripId++,v);
      }
    }
  }

  polyData->Modified();
  return 1;
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::PrintSelf(ostream& os, vtkIndent indent)
{
  this->Superclass::PrintSelf(os,indent);
  os << "UseHistograms: " << this->UseHistograms << endl;
  os << "HistogramLookupTableRange: "  << this->HistogramLookupTableRange[0] << ","
     << this->HistogramLookupTableRange[1] << endl;
  os << "NumberOfHistogramBins: " << this->NumberOfHistogramBins[0] << ","
     << this->NumberOfHistogramBins[1] << endl;
  os << "ShowOutliers: " << this->ShowOutliers << endl;
  os << "PreferredNumberOfOutliers: " << this->PreferredNumberOfOutliers << endl;
}
//------------------------------------------------------------------------------
int vtkParallelCoordinatesHistogramRepresentation::SwapAxisPositions(int position1, int position2)
{
  if (this->Superclass::SwapAxisPositions(position1,position2))
  {
    this->HistogramFilter->Modified();
    if (this->ShowOutliers)
      this->OutlierFilter->Modified();

    return 1;
  }

  return 0;
}
//------------------------------------------------------------------------------
int vtkParallelCoordinatesHistogramRepresentation::SetRangeAtPosition(int position, double range[2])
{
  if (this->Superclass::SetRangeAtPosition(position,range))
  {
    this->HistogramFilter->SetCustomColumnRange(position,range);
    this->HistogramFilter->Modified();

    if (ShowOutliers)
      this->OutlierFilter->Modified();

    return 1;
  }
  return 0;
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::SetUseHistograms(int use)
{
  if (use && this->UseHistograms != use)
  {
    this->HistogramFilter->Modified();

    if (this->ShowOutliers)
      this->OutlierFilter->Modified();
  }

  this->UseHistograms = use;
  this->Modified();
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::SetShowOutliers(int show)
{
  if (show && this->ShowOutliers != show)
  {
    this->HistogramFilter->Modified();
    this->OutlierFilter->Modified();
  }

  this->ShowOutliers = show;
  this->Modified();
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::SetPreferredNumberOfOutliers(int num)
{
  if (num >= 0)
  {
    this->PreferredNumberOfOutliers = num;
    this->OutlierFilter->SetPreferredNumberOfOutliers(num);
    this->Modified();
  }
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::SetNumberOfHistogramBins(int nx, int ny)
{
  if (nx > 0 && ny > 0)
  {
    this->NumberOfHistogramBins[0] = nx;
    this->NumberOfHistogramBins[1] = ny;

    this->HistogramFilter->SetNumberOfBins(nx,ny);

    this->Modified();
  }
}
//------------------------------------------------------------------------------
void vtkParallelCoordinatesHistogramRepresentation::SetNumberOfHistogramBins(int* n)
{
  this->SetNumberOfHistogramBins(n[0],n[1]);
}
//------------------------------------------------------------------------------
vtkImageData* vtkParallelCoordinatesHistogramRepresentation::GetHistogramImage(int idx)
{
  return this->HistogramFilter->GetOutputHistogramImage(idx);
}
//------------------------------------------------------------------------------
vtkTable* vtkParallelCoordinatesHistogramRepresentation::GetOutlierData()
{
  return this->OutlierFilter->GetOutputTable();
}