VTK
dox/Views/vtkParallelCoordinatesHistogramRepresentation.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkParallelCoordinatesHistogramRepresentation.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2009 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00054 #ifndef __vtkParallelCoordinatesHistogramRepresentation_h
00055 #define __vtkParallelCoordinatesHistogramRepresentation_h
00056 
00057 #include "vtkParallelCoordinatesRepresentation.h"
00058 
00059 class vtkComputeHistogram2DOutliers;
00060 class vtkPairwiseExtractHistogram2D;
00061 class vtkExtractHistogram2D;
00062 class vtkInformationVector;
00063 class vtkLookupTable;
00064 
00065 class VTK_VIEWS_EXPORT vtkParallelCoordinatesHistogramRepresentation : public vtkParallelCoordinatesRepresentation
00066 {
00067 public:
00068   static vtkParallelCoordinatesHistogramRepresentation* New();
00069   vtkTypeMacro(vtkParallelCoordinatesHistogramRepresentation, vtkParallelCoordinatesRepresentation);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073   virtual void ApplyViewTheme(vtkViewTheme* theme);
00074 
00076 
00078   virtual void SetUseHistograms(int);
00079   vtkGetMacro(UseHistograms,int);
00080   vtkBooleanMacro(UseHistograms,int);
00082 
00084 
00085   virtual void SetShowOutliers(int);
00086   vtkGetMacro(ShowOutliers,int);
00087   vtkBooleanMacro(ShowOutliers,int);
00089 
00091 
00093   vtkSetVector2Macro(HistogramLookupTableRange,double);
00094   vtkGetVector2Macro(HistogramLookupTableRange,double);
00096 
00097   //BTX
00099 
00100   void SetNumberOfHistogramBins(int,int);
00101   void SetNumberOfHistogramBins(int*);
00102   vtkGetVector2Macro(NumberOfHistogramBins,int);
00103   //ETX
00105 
00107 
00109   void SetPreferredNumberOfOutliers(int);
00110   vtkGetMacro(PreferredNumberOfOutliers,int);
00112 
00115   virtual int SwapAxisPositions(int position1, int position2);
00116 
00119   virtual int SetRangeAtPosition(int position, double range[2]);
00120 
00121 protected:
00122   vtkParallelCoordinatesHistogramRepresentation();
00123   virtual ~vtkParallelCoordinatesHistogramRepresentation();
00124 
00125   virtual int RequestData(
00126     vtkInformation*,
00127     vtkInformationVector**,
00128     vtkInformationVector*);
00129 
00130   virtual bool AddToView(vtkView* view);
00131 
00132   virtual bool RemoveFromView(vtkView* view);
00133 
00135   int UseHistograms;
00136 
00138   double HistogramLookupTableRange[2];
00139 
00141   int NumberOfHistogramBins[2];
00142 
00143   //BTX
00144   vtkSmartPointer<vtkPairwiseExtractHistogram2D> HistogramFilter;
00145   vtkSmartPointer<vtkLookupTable> HistogramLookupTable;
00146   //ETX
00147 
00149   int ShowOutliers;
00150 
00152   int PreferredNumberOfOutliers;
00153 
00154   //BTX
00155   vtkSmartPointer<vtkComputeHistogram2DOutliers> OutlierFilter;
00156   vtkSmartPointer<vtkPolyData> OutlierData;
00157   vtkSmartPointer<vtkPolyDataMapper2D> OutlierMapper;
00158   vtkSmartPointer<vtkActor2D> OutlierActor;
00159   //ETX
00160   
00163   virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
00164 
00167   virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
00168 
00171   virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
00172 
00174   virtual int PlaceHistogramLineQuads(vtkPolyData* polyData);
00175 
00179   virtual int PlaceHistogramCurveQuads(vtkPolyData* polyData);
00180 
00182 
00184   virtual int ComputeDataProperties();
00185   virtual int UpdatePlotProperties(vtkStringArray*);
00187 
00190   virtual vtkImageData* GetHistogramImage(int idx);
00191 
00193 
00194   virtual vtkTable* GetOutlierData();
00195 private:
00196   vtkParallelCoordinatesHistogramRepresentation(const vtkParallelCoordinatesHistogramRepresentation&); // Not implemented
00197   void operator=(const vtkParallelCoordinatesHistogramRepresentation&);   // Not implemented
00198 };
00200 
00201 #endif