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 "vtkParaViewDeprecation.h" // for deprecation
21 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
22 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
23 
24 #include <map> // needed for map
25 #include <set> //needed for ivars
26 
29 class vtkCSVExporter;
31 class vtkPVContextView;
33 class vtkTable;
34 
36 {
37 public:
38  static vtkChartRepresentation* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
46  void SetSelectionRepresentation(vtkChartSelectionRepresentation*);
47 
51  void SetVisibility(bool visible) override;
52 
59  void MarkModified() override;
60 
61  // *************************************************************************
62 
64 
68  void SetFieldAssociation(int);
69  vtkGetMacro(FieldAssociation, int);
71 
72  // methods to control block selection.
73  // When changed, this will call MarkModified().
74  void SetCompositeDataSetIndex(unsigned int); // only used for single block selection
75  void AddCompositeDataSetIndex(unsigned int);
76  void ResetCompositeDataSetIndices();
77 
82  unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable) override;
83 
92  vtkInformation* outInfo) override;
93 
101  virtual std::string GetDefaultSeriesLabel(
102  const std::string& tableName, const std::string& columnName);
103 
105 
109  vtkSetMacro(FlattenTable, int);
110  vtkGetMacro(FlattenTable, int);
112 
126  virtual bool MapSelectionToInput(vtkSelection* sel);
127 
138  virtual bool MapSelectionToView(vtkSelection* sel);
139 
141 
146  virtual bool Export(vtkAbstractChartExporter* vtkNotUsed(exporter)) { return false; }
147 
148  PARAVIEW_DEPRECATED_IN_5_12_0("Use Export(vtkAbstractChartExporter* exporter) instead")
149  virtual bool Export(vtkCSVExporter* vtkNotUsed(exporter)) { return false; }
151 protected:
153  ~vtkChartRepresentation() override;
154 
158  int FillInputPortInformation(int port, vtkInformation* info) override;
159 
170  virtual void PrepareForRendering() {}
171 
183 
189  bool AddToView(vtkView* view) override;
190 
196  bool RemoveFromView(vtkView* view) override;
197 
204  vtkTable* GetLocalOutput(bool pre_delivery = false);
205 
210  virtual vtkSmartPointer<vtkDataObject> TransformInputData(vtkDataObject* data);
211 
219  virtual vtkSmartPointer<vtkDataObject> ReduceDataToRoot(vtkDataObject* data);
220 
228 
229  typedef std::map<std::string, std::pair<vtkSmartPointer<vtkTable>, unsigned int>> MapOfTables;
234  bool GetLocalOutput(MapOfTables& tables);
235 
239 
241  std::set<unsigned int> CompositeIndices; // the selected blocks
242 
244 
245 private:
247  void operator=(const vtkChartRepresentation&) = delete;
248 
249  vtkTimeStamp PrepareForRenderingTime;
250  vtkMTimeType LastLocalOutputMTime;
252  vtkSmartPointer<vtkMultiBlockDataSet> LocalOutputRequestData;
253 };
254 
255 #endif
data
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
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.
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
exporter used by certain views to export data into a file or stream.
representation for showing selections in chart views.