vtkSMRepresentationProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
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 =========================================================================*/
76 #ifndef vtkSMRepresentationProxy_h
77 #define vtkSMRepresentationProxy_h
78 
79 #include "vtkRemotingViewsModule.h" //needed for exports
80 #include "vtkSMSourceProxy.h"
81 
84 {
85 class vtkCloningVectorOfRepresentations;
86 }
87 
89 {
90 public:
91  static vtkSMRepresentationProxy* New();
93  void PrintSelf(ostream& os, vtkIndent indent) override;
94 
99  virtual vtkPVDataInformation* GetRepresentedDataInformation();
100 
116  virtual vtkPVProminentValuesInformation* GetProminentValuesInformation(std::string name,
117  int fieldAssoc, int numComponents, double uncertaintyAllowed = 1e-6, double fraction = 1e-3,
118  bool force = false);
119 
124  void UpdatePipeline() override;
125 
130  void UpdatePipeline(double time) override;
131 
135  void PostUpdateData(bool) override;
136 
140  virtual void ViewUpdated(vtkSMProxy* view);
141 
145  vtkTypeUInt32 GetGlobalID() override;
146 
148 
156  virtual bool SetRepresentationType(const char* type);
157  static bool SetRepresentationType(vtkSMProxy* repr, const char* type)
158  {
160  return self ? self->SetRepresentationType(type) : false;
161  }
163 
164  void MarkDirty(vtkSMProxy* modifiedProxy) override;
165 
166 protected:
168  ~vtkSMRepresentationProxy() override;
169 
176  void MarkDirtyFromProducer(
177  vtkSMProxy* modifiedProxy, vtkSMProxy* producer, vtkSMProperty* property) override;
178 
179  // Unlike subproxies in regular proxies, subproxies in representations
180  // typically represent internal representations e.g. label representation,
181  // representation for selection etc. In that case, if the internal
182  // representation is modified, we need to ensure that any of our consumers is
183  // a consumer of all our subproxies as well.
184  void AddConsumer(vtkSMProperty* property, vtkSMProxy* proxy) override;
185  void RemoveConsumer(vtkSMProperty* property, vtkSMProxy* proxy) override;
186  void RemoveAllConsumers() override;
187 
188  void CreateVTKObjects() override;
189  void OnVTKRepresentationUpdated();
190  void OnVTKRepresentationUpdateSkipped();
191  void OnVTKRepresentationUpdateTimeChanged();
192 
193  virtual void UpdatePipelineInternal(double time, bool doTime);
194 
198  void InvalidateDataInformation() override;
199 
203  int LoadXMLState(vtkPVXMLElement* element, vtkSMProxyLocator* locator) override;
204 
205 private:
207  void operator=(const vtkSMRepresentationProxy&) = delete;
208 
209  bool RepresentedDataInformationValid;
210  vtkPVDataInformation* RepresentedDataInformation;
211 
212  bool ProminentValuesInformationValid;
213  vtkPVProminentValuesInformation* ProminentValuesInformation;
214  double ProminentValuesFraction;
215  double ProminentValuesUncertainty;
216 
217  friend class vtkPVComparativeViewNS::vtkCloningVectorOfRepresentations;
218  void ClearMarkedModified() { this->MarkedModified = false; }
219  bool MarkedModified;
220  bool VTKRepresentationUpdated;
221  bool VTKRepresentationUpdateSkipped;
222  bool VTKRepresentationUpdateTimeChanged;
223 
224  std::string DebugName;
225 };
226 
227 #endif
Proxy for a representations.
static vtkSMRepresentationProxy * SafeDownCast(vtkObject *o)
provides meta data about a vtkDataObject subclass.
#define VTKREMOTINGVIEWS_EXPORT
superclass for all SM properties
time
Prominent values a data array takes on.
proxy for a VTK source on a server
static bool SetRepresentationType(vtkSMProxy *repr, const char *type)
Set the representation type.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
is used to locate proxies referred to in state xmls while loading state files.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.