ParaView
vtkChartRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkChartRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkChartRepresentation_h
29 #define vtkChartRepresentation_h
30 
32 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
33 #include "vtkStdString.h" // needed for vtkStdString.
34 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
35 
36 #include <map> // needed for map
37 #include <set> //needed for ivars
38 
40 class vtkCSVExporter;
41 class vtkMultiBlockDataSet;
42 class vtkPVCacheKeeper;
43 class vtkPVContextView;
45 class vtkTable;
46 
47 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkChartRepresentation : public vtkPVDataRepresentation
48 {
49 public:
50  static vtkChartRepresentation* New();
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
58  void SetSelectionRepresentation(vtkChartSelectionRepresentation*);
59 
63  virtual void SetVisibility(bool visible);
64 
71  virtual void MarkModified();
72 
73  // *************************************************************************
74 
76 
80  void SetFieldAssociation(int);
81  vtkGetMacro(FieldAssociation, int);
83 
84  // methods to control block selection.
85  // When changed, this will call MarkModified().
86  void SetCompositeDataSetIndex(unsigned int); // only used for single block selection
87  void AddCompositeDataSetIndex(unsigned int);
88  void ResetCompositeDataSetIndices();
89 
94  virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable);
95 
103  virtual int ProcessViewRequest(
104  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
105 
113  virtual vtkStdString GetDefaultSeriesLabel(
114  const vtkStdString& tableName, const vtkStdString& columnName);
115 
117 
121  vtkSetMacro(FlattenTable, int);
122  vtkGetMacro(FlattenTable, int);
124 
138  virtual bool MapSelectionToInput(vtkSelection* sel);
139 
150  virtual bool MapSelectionToView(vtkSelection* sel);
151 
157  virtual bool Export(vtkCSVExporter* vtkNotUsed(exporter)) { return false; }
158 
159 protected:
162 
166  virtual int FillInputPortInformation(int port, vtkInformation* info);
167 
178  virtual void PrepareForRendering() {}
179 
190  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
191 
197  virtual bool AddToView(vtkView* view);
198 
204  virtual bool RemoveFromView(vtkView* view);
205 
209  virtual bool IsCached(double cache_key);
210 
214  vtkTable* GetLocalOutput();
215 
220  virtual vtkDataObject* TransformInputData(
221  vtkInformationVector** inputVector, vtkDataObject* data);
222 
223  typedef std::map<std::string, vtkSmartPointer<vtkTable> > MapOfTables;
228  bool GetLocalOutput(MapOfTables& tables);
229 
232  vtkWeakPointer<vtkPVContextView> ContextView;
235 
236  vtkSmartPointer<vtkMultiBlockDataSet> LocalOutput;
237  std::set<unsigned int> CompositeIndices; // the selected blocks
238 
239  vtkWeakPointer<vtkChartSelectionRepresentation> SelectionRepresentation;
240 
241 private:
242  vtkChartRepresentation(const vtkChartRepresentation&) VTK_DELETE_FUNCTION;
243  void operator=(const vtkChartRepresentation&) VTK_DELETE_FUNCTION;
244 
245  vtkTimeStamp PrepareForRenderingTime;
246  vtkSmartPointer<vtkChartSelectionRepresentation> DummyRepresentation;
247 };
248 
249 #endif
void PrintSelf(ostream &os, vtkIndent indent)
virtual void PrepareForRendering()
This method is called before actual render if this->MTime was modified since the last time this metho...
vtkPVDataRepresentation adds some ParaView specific API to data representations.
vtkSmartPointer< vtkMultiBlockDataSet > LocalOutput
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
vtkWeakPointer< vtkPVContextView > ContextView
vtkWeakPointer< vtkChartSelectionRepresentation > SelectionRepresentation
virtual bool Export(vtkCSVExporter *vtkNotUsed(exporter))
Called by vtkPVContextView::Export() to export the representation&#39;s data to a CSV file...
std::map< std::string, vtkSmartPointer< vtkTable > > MapOfTables
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable)
Initialize the representation with an identifier range so each internal representation can own a uniq...
vtkPVCacheKeeper * CacheKeeper
virtual void MarkModified()
This is one of the most important functions.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
manages data cache for flip book animations.
vtkPVContextView adopts vtkContextView so that it can be used in ParaView configurations.
vtkChartRepresentation is the base representation for charting representations.
exporter used by certain views to export data as a CSV file.
std::set< unsigned int > CompositeIndices
vtkSelectionDeliveryFilter is a filter that can deliver vtkSelection from data-server nodes to the cl...
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.
representation for showing selections in chart views.