00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
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   
00099 
00100   void SetNumberOfHistogramBins(int,int);
00101   void SetNumberOfHistogramBins(int*);
00102   vtkGetVector2Macro(NumberOfHistogramBins,int);
00103   
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   
00144   vtkSmartPointer<vtkPairwiseExtractHistogram2D> HistogramFilter;
00145   vtkSmartPointer<vtkLookupTable> HistogramLookupTable;
00146   
00147 
00149   int ShowOutliers;
00150 
00152   int PreferredNumberOfOutliers;
00153 
00154   
00155   vtkSmartPointer<vtkComputeHistogram2DOutliers> OutlierFilter;
00156   vtkSmartPointer<vtkPolyData> OutlierData;
00157   vtkSmartPointer<vtkPolyDataMapper2D> OutlierMapper;
00158   vtkSmartPointer<vtkActor2D> OutlierActor;
00159   
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&); 
00197   void operator=(const vtkParallelCoordinatesHistogramRepresentation&);   
00198 };
00200 
00201 #endif