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; }
148 protected:
150  ~vtkChartRepresentation() override;
151 
155  int FillInputPortInformation(int port, vtkInformation* info) override;
156 
167  virtual void PrepareForRendering() {}
168 
180 
186  bool AddToView(vtkView* view) override;
187 
193  bool RemoveFromView(vtkView* view) override;
194 
201  vtkTable* GetLocalOutput(bool pre_delivery = false);
202 
207  virtual vtkSmartPointer<vtkDataObject> TransformInputData(vtkDataObject* data);
208 
216  virtual vtkSmartPointer<vtkDataObject> ReduceDataToRoot(vtkDataObject* data);
217 
225 
226  typedef std::map<std::string, std::pair<vtkSmartPointer<vtkTable>, unsigned int>> MapOfTables;
231  bool GetLocalOutput(MapOfTables& tables);
232 
236 
238  std::set<unsigned int> CompositeIndices; // the selected blocks
239 
241 
242 private:
244  void operator=(const vtkChartRepresentation&) = delete;
245 
246  vtkTimeStamp PrepareForRenderingTime;
247  vtkMTimeType LastLocalOutputMTime;
249  vtkSmartPointer<vtkMultiBlockDataSet> LocalOutputRequestData;
250 };
251 
252 #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.
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.