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 "vtkWeakPointer.h" // needed for vtkWeakPointer
34 
35 #include <map> // needed for map
36 #include <set> //needed for ivars
37 
39 class vtkCSVExporter;
41 class vtkPVContextView;
43 class vtkTable;
44 
46 {
47 public:
48  static vtkChartRepresentation* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
56  void SetSelectionRepresentation(vtkChartSelectionRepresentation*);
57 
61  void SetVisibility(bool visible) override;
62 
69  void MarkModified() override;
70 
71  // *************************************************************************
72 
74 
78  void SetFieldAssociation(int);
79  vtkGetMacro(FieldAssociation, int);
81 
82  // methods to control block selection.
83  // When changed, this will call MarkModified().
84  void SetCompositeDataSetIndex(unsigned int); // only used for single block selection
85  void AddCompositeDataSetIndex(unsigned int);
86  void ResetCompositeDataSetIndices();
87 
92  unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable) override;
93 
102  vtkInformation* outInfo) override;
103 
111  virtual std::string GetDefaultSeriesLabel(
112  const std::string& tableName, const std::string& columnName);
113 
115 
119  vtkSetMacro(FlattenTable, int);
120  vtkGetMacro(FlattenTable, int);
122 
136  virtual bool MapSelectionToInput(vtkSelection* sel);
137 
148  virtual bool MapSelectionToView(vtkSelection* sel);
149 
155  virtual bool Export(vtkCSVExporter* vtkNotUsed(exporter)) { return false; }
156 
157 protected:
159  ~vtkChartRepresentation() override;
160 
164  int FillInputPortInformation(int port, vtkInformation* info) override;
165 
176  virtual void PrepareForRendering() {}
177 
189 
195  bool AddToView(vtkView* view) override;
196 
202  bool RemoveFromView(vtkView* view) override;
203 
210  vtkTable* GetLocalOutput(bool pre_delivery = false);
211 
216  virtual vtkSmartPointer<vtkDataObject> TransformInputData(vtkDataObject* data);
217 
225  virtual vtkSmartPointer<vtkDataObject> ReduceDataToRoot(vtkDataObject* data);
226 
234 
235  typedef std::map<std::string, vtkSmartPointer<vtkTable> > MapOfTables;
240  bool GetLocalOutput(MapOfTables& tables);
241 
245 
247  std::set<unsigned int> CompositeIndices; // the selected blocks
248 
250 
251 private:
253  void operator=(const vtkChartRepresentation&) = delete;
254 
255  vtkTimeStamp PrepareForRenderingTime;
256  vtkMTimeType LastLocalOutputMTime;
258  vtkSmartPointer<vtkMultiBlockDataSet> LocalOutputRequestData;
259 };
260 
261 #endif
data
virtual void PrepareForRendering()
This method is called before actual render if this->MTime was modified since the last time this metho...
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
vtkSmartPointer< vtkMultiBlockDataSet > LocalOutput
vtkWeakPointer< vtkPVContextView > ContextView
vtkWeakPointer< vtkChartSelectionRepresentation > SelectionRepresentation
bool AddToView(vtkView *view) override
Making these methods public.
virtual bool Export(vtkCSVExporter *vtkNotUsed(exporter))
Called by vtkPVContextView::Export() to export the representation&#39;s data to a CSV file...
info
std::map< std::string, vtkSmartPointer< vtkTable > > MapOfTables
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
vtkTypeUInt64 vtkMTimeType
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...
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
bool RemoveFromView(vtkView *view) override
Making these methods public.
virtual void MarkModified()
This is one of the most important functions.
static vtkDataRepresentation * New()
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 CSV.
void PrintSelf(ostream &os, vtkIndent indent) override
std::set< unsigned int > CompositeIndices
vtkSelectionDeliveryFilter is a filter that can deliver vtkSelection from data-server nodes to the cl...
port
representation for showing selections in chart views.