VTK
|
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 "vtkViewsInfovisModule.h" // For export macro 00058 #include "vtkParallelCoordinatesRepresentation.h" 00059 00060 class vtkComputeHistogram2DOutliers; 00061 class vtkPairwiseExtractHistogram2D; 00062 class vtkExtractHistogram2D; 00063 class vtkInformationVector; 00064 class vtkLookupTable; 00065 00066 class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesHistogramRepresentation : public vtkParallelCoordinatesRepresentation 00067 { 00068 public: 00069 static vtkParallelCoordinatesHistogramRepresentation* New(); 00070 vtkTypeMacro(vtkParallelCoordinatesHistogramRepresentation, vtkParallelCoordinatesRepresentation); 00071 void PrintSelf(ostream& os, vtkIndent indent); 00072 00074 virtual void ApplyViewTheme(vtkViewTheme* theme); 00075 00077 00079 virtual void SetUseHistograms(int); 00080 vtkGetMacro(UseHistograms,int); 00081 vtkBooleanMacro(UseHistograms,int); 00083 00085 00086 virtual void SetShowOutliers(int); 00087 vtkGetMacro(ShowOutliers,int); 00088 vtkBooleanMacro(ShowOutliers,int); 00090 00092 00094 vtkSetVector2Macro(HistogramLookupTableRange,double); 00095 vtkGetVector2Macro(HistogramLookupTableRange,double); 00097 00098 //BTX 00100 00101 void SetNumberOfHistogramBins(int,int); 00102 void SetNumberOfHistogramBins(int*); 00103 vtkGetVector2Macro(NumberOfHistogramBins,int); 00104 //ETX 00106 00108 00110 void SetPreferredNumberOfOutliers(int); 00111 vtkGetMacro(PreferredNumberOfOutliers,int); 00113 00116 virtual int SwapAxisPositions(int position1, int position2); 00117 00120 virtual int SetRangeAtPosition(int position, double range[2]); 00121 00122 protected: 00123 vtkParallelCoordinatesHistogramRepresentation(); 00124 virtual ~vtkParallelCoordinatesHistogramRepresentation(); 00125 00126 virtual int RequestData( 00127 vtkInformation*, 00128 vtkInformationVector**, 00129 vtkInformationVector*); 00130 00131 virtual bool AddToView(vtkView* view); 00132 00133 virtual bool RemoveFromView(vtkView* view); 00134 00136 int UseHistograms; 00137 00139 double HistogramLookupTableRange[2]; 00140 00142 int NumberOfHistogramBins[2]; 00143 00144 //BTX 00145 vtkSmartPointer<vtkPairwiseExtractHistogram2D> HistogramFilter; 00146 vtkSmartPointer<vtkLookupTable> HistogramLookupTable; 00147 //ETX 00148 00150 int ShowOutliers; 00151 00153 int PreferredNumberOfOutliers; 00154 00155 //BTX 00156 vtkSmartPointer<vtkComputeHistogram2DOutliers> OutlierFilter; 00157 vtkSmartPointer<vtkPolyData> OutlierData; 00158 vtkSmartPointer<vtkPolyDataMapper2D> OutlierMapper; 00159 vtkSmartPointer<vtkActor2D> OutlierActor; 00160 //ETX 00161 00164 virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot); 00165 00168 virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot); 00169 00172 virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode); 00173 00175 virtual int PlaceHistogramLineQuads(vtkPolyData* polyData); 00176 00180 virtual int PlaceHistogramCurveQuads(vtkPolyData* polyData); 00181 00183 00185 virtual int ComputeDataProperties(); 00186 virtual int UpdatePlotProperties(vtkStringArray*); 00188 00191 virtual vtkImageData* GetHistogramImage(int idx); 00192 00194 00195 virtual vtkTable* GetOutlierData(); 00196 private: 00197 vtkParallelCoordinatesHistogramRepresentation(const vtkParallelCoordinatesHistogramRepresentation&); // Not implemented 00198 void operator=(const vtkParallelCoordinatesHistogramRepresentation&); // Not implemented 00199 }; 00201 00202 #endif