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 
165 
169  VTK_LEGACY(void SetDebugName(const char* name));
170  VTK_LEGACY(const char* GetDebugName());
172 
173  void MarkDirty(vtkSMProxy* modifiedProxy) override;
174 
175 protected:
177  ~vtkSMRepresentationProxy() override;
178 
185  void MarkDirtyFromProducer(
186  vtkSMProxy* modifiedProxy, vtkSMProxy* producer, vtkSMProperty* property) override;
187 
188  // Unlike subproxies in regular proxies, subproxies in representations
189  // typically represent internal representations e.g. label representation,
190  // representation for selection etc. In that case, if the internal
191  // representation is modified, we need to ensure that any of our consumers is
192  // a consumer of all our subproxies as well.
193  void AddConsumer(vtkSMProperty* property, vtkSMProxy* proxy) override;
194  void RemoveConsumer(vtkSMProperty* property, vtkSMProxy* proxy) override;
195  void RemoveAllConsumers() override;
196 
197  void CreateVTKObjects() override;
198  void OnVTKRepresentationUpdated();
199  void OnVTKRepresentationUpdateSkipped();
200  void OnVTKRepresentationUpdateTimeChanged();
201 
202  virtual void UpdatePipelineInternal(double time, bool doTime);
203 
207  void InvalidateDataInformation() override;
208 
212  int LoadXMLState(vtkPVXMLElement* element, vtkSMProxyLocator* locator) override;
213 
214 private:
216  void operator=(const vtkSMRepresentationProxy&) = delete;
217 
218  bool RepresentedDataInformationValid;
219  vtkPVDataInformation* RepresentedDataInformation;
220 
221  bool ProminentValuesInformationValid;
222  vtkPVProminentValuesInformation* ProminentValuesInformation;
223  double ProminentValuesFraction;
224  double ProminentValuesUncertainty;
225 
226  friend class vtkPVComparativeViewNS::vtkCloningVectorOfRepresentations;
227  void ClearMarkedModified() { this->MarkedModified = false; }
228  bool MarkedModified;
229  bool VTKRepresentationUpdated;
230  bool VTKRepresentationUpdateSkipped;
231  bool VTKRepresentationUpdateTimeChanged;
232 
233  std::string DebugName;
234 };
235 
236 #endif
Proxy for a representations.
static vtkSMRepresentationProxy * SafeDownCast(vtkObject *o)
Light object for holding data information.
#define VTKREMOTINGVIEWS_EXPORT
#define VTK_LEGACY(method)
Definition: vtkLegacy.h:52
superclass for all SM properties
name
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.