ParaView
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 =========================================================================*/
21 #ifndef vtkSMRepresentationProxy_h
22 #define vtkSMRepresentationProxy_h
23 
24 #include "vtkPVServerManagerRenderingModule.h" //needed for exports
25 #include "vtkSMSourceProxy.h"
26 
28 
29 class VTKPVSERVERMANAGERRENDERING_EXPORT vtkSMRepresentationProxy : public vtkSMSourceProxy
30 {
31 public:
32  static vtkSMRepresentationProxy* New();
34  void PrintSelf(ostream& os, vtkIndent indent);
35 
39  virtual void MarkDirty(vtkSMProxy* modifiedProxy);
40 
45  virtual vtkPVDataInformation* GetRepresentedDataInformation();
46 
62  virtual vtkPVProminentValuesInformation* GetProminentValuesInformation(vtkStdString name,
63  int fieldAssoc, int numComponents, double uncertaintyAllowed = 1e-6, double fraction = 1e-3);
64 
69  virtual void UpdatePipeline();
70 
75  virtual void UpdatePipeline(double time);
76 
80  virtual void PostUpdateData();
81 
85  virtual void ViewUpdated(vtkSMProxy* view);
86 
90  virtual vtkTypeUInt32 GetGlobalID();
91 
93 
101  virtual bool SetRepresentationType(const char* type);
102  static bool SetRepresentationType(vtkSMProxy* repr, const char* type)
103  {
105  return self ? self->SetRepresentationType(type) : false;
106  }
108 
109 protected:
112 
113  // Unlike subproxies in regular proxies, subproxies in representations
114  // typically represent internal representations e.g. label representation,
115  // representation for selection etc. In that case, if the internal
116  // representation is modified, we need to ensure that any of our consumers is
117  // a consumer of all our subproxies as well.
118  virtual void AddConsumer(vtkSMProperty* property, vtkSMProxy* proxy);
119  virtual void RemoveConsumer(vtkSMProperty* property, vtkSMProxy* proxy);
120  virtual void RemoveAllConsumers();
121 
122  virtual void CreateVTKObjects();
123  void OnVTKRepresentationUpdated();
124 
125  virtual void UpdatePipelineInternal(double time, bool doTime);
126 
130  virtual void InvalidateDataInformation();
131 
135  virtual int LoadXMLState(vtkPVXMLElement* element, vtkSMProxyLocator* locator);
136 
137 private:
138  vtkSMRepresentationProxy(const vtkSMRepresentationProxy&) VTK_DELETE_FUNCTION;
139  void operator=(const vtkSMRepresentationProxy&) VTK_DELETE_FUNCTION;
140 
145  bool SkipDependency(vtkSMProxy* producer);
146 
147  bool RepresentedDataInformationValid;
148  vtkPVDataInformation* RepresentedDataInformation;
149 
150  bool ProminentValuesInformationValid;
151  vtkPVProminentValuesInformation* ProminentValuesInformation;
152  double ProminentValuesFraction;
153  double ProminentValuesUncertainty;
154 
156 
160  void ViewTimeChanged();
161  friend class vtkSMViewProxy;
163 
164  friend class vtkPVComparativeView;
165  void ClearMarkedModified() { this->MarkedModified = false; }
166  bool MarkedModified;
167  bool VTKRepresentationUpdated;
168 };
169 
170 #endif
virtual void RemoveConsumer(vtkSMProperty *property, vtkSMProxy *proxy)
Remove the property,proxy pair from the list of consumers.
virtual void AddConsumer(vtkSMProperty *property, vtkSMProxy *proxy)
Called by a proxy property, this adds the property,proxy pair to the list of consumers.
static vtkSMRepresentationProxy * SafeDownCast(vtkObject *o)
Light object for holding data information.
virtual void PostUpdateData()
Overwritten from superclass to invoke.
virtual void MarkDirty(vtkSMProxy *modifiedProxy)
Marks the selection proxies dirty as well as chain to superclass.
Superclass for all view proxies.
superclass for all SM properties
virtual void CreateVTKObjects()
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
Prominent values a data array takes on.
virtual void UpdatePipeline()
Calls Update() on all sources.
proxy for a VTK source on a server
void PrintSelf(ostream &os, vtkIndent indent)
static bool SetRepresentationType(vtkSMProxy *repr, const char *type)
Set the representation type.
virtual vtkTypeUInt32 GetGlobalID()
Overridden to reserve additional IDs for use by "ExtractSelection" proxies.
virtual int LoadXMLState(vtkPVXMLElement *element, vtkSMProxyLocator *locator)
Loads the proxy state from the XML element.
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.
virtual void RemoveAllConsumers()
Remove all consumers.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
view for comparative visualization/ film-strips.
static vtkSMSourceProxy * New()
virtual void InvalidateDataInformation()
Mark the data information as invalid.