vtkChartRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkChartRepresentation_h
17 #define vtkChartRepresentation_h
18 
20 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
21 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
22 
23 #include <map> // needed for map
24 #include <set> //needed for ivars
25 
29 class vtkPVContextView;
31 class vtkTable;
32 
34 {
35 public:
36  static vtkChartRepresentation* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
44  void SetSelectionRepresentation(vtkChartSelectionRepresentation*);
45 
49  void SetVisibility(bool visible) override;
50 
57  void MarkModified() override;
58 
59  // *************************************************************************
60 
62 
66  void SetFieldAssociation(int);
67  vtkGetMacro(FieldAssociation, int);
69 
70  // methods to control block selection.
71  // When changed, this will call MarkModified().
72  void SetCompositeDataSetIndex(unsigned int); // only used for single block selection
73  void AddCompositeDataSetIndex(unsigned int);
74  void ResetCompositeDataSetIndices();
75 
80  unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable) override;
81 
90  vtkInformation* outInfo) override;
91 
99  virtual std::string GetDefaultSeriesLabel(
100  const std::string& tableName, const std::string& columnName);
101 
103 
107  vtkSetMacro(FlattenTable, int);
108  vtkGetMacro(FlattenTable, int);
110 
124  virtual bool MapSelectionToInput(vtkSelection* sel);
125 
136  virtual bool MapSelectionToView(vtkSelection* sel);
137 
143  virtual bool Export(vtkAbstractChartExporter* vtkNotUsed(exporter)) { return false; }
144 
145 protected:
147  ~vtkChartRepresentation() override;
148 
152  int FillInputPortInformation(int port, vtkInformation* info) override;
153 
164  virtual void PrepareForRendering() {}
165 
177 
183  bool AddToView(vtkView* view) override;
184 
190  bool RemoveFromView(vtkView* view) override;
191 
198  vtkTable* GetLocalOutput(bool pre_delivery = false);
199 
204  virtual vtkSmartPointer<vtkDataObject> TransformInputData(vtkDataObject* data);
205 
213  virtual vtkSmartPointer<vtkDataObject> ReduceDataToRoot(vtkDataObject* data);
214 
222 
223  typedef std::map<std::string, std::pair<vtkSmartPointer<vtkTable>, unsigned int>> MapOfTables;
228  bool GetLocalOutput(MapOfTables& tables);
229 
233 
235  std::set<unsigned int> CompositeIndices; // the selected blocks
236 
238 
239 private:
241  void operator=(const vtkChartRepresentation&) = delete;
242 
243  vtkTimeStamp PrepareForRenderingTime;
244  vtkMTimeType LastLocalOutputMTime;
246  vtkSmartPointer<vtkMultiBlockDataSet> LocalOutputRequestData;
247 };
248 
249 #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.
info
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.
std::map< std::string, std::pair< vtkSmartPointer< vtkTable >, unsigned int > > MapOfTables
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()
virtual bool Export(vtkAbstractChartExporter *vtkNotUsed(exporter))
Called by vtkPVContextView::Export() to export the representation&#39;s data to a CSV file...
vtkPVContextView adopts vtkContextView so that it can be used in ParaView configurations.
vtkChartRepresentation is the base representation for charting representations.
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
exporter used by certain views to export data into a file or stream.
representation for showing selections in chart views.