ParaView
vtkSMPVRepresentationProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPVRepresentationProxy.h
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 =========================================================================*/
33 #ifndef vtkSMPVRepresentationProxy_h
34 #define vtkSMPVRepresentationProxy_h
35 
36 #include "vtkPVServerManagerRenderingModule.h" //needed for exports
38 
40 
41 class VTKPVSERVERMANAGERRENDERING_EXPORT vtkSMPVRepresentationProxy
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
54  virtual bool GetUsingScalarColoring();
55 
57 
61  static bool GetUsingScalarColoring(vtkSMProxy* proxy)
62  {
64  return self ? self->GetUsingScalarColoring() : false;
65  }
67 
74  virtual bool SetScalarColoring(const char* arrayname, int attribute_type);
75 
84  virtual bool SetScalarColoring(const char* arrayname, int attribute_type, int component);
85 
87 
91  static bool SetScalarColoring(vtkSMProxy* proxy, const char* arrayname, int attribute_type)
92  {
94  return self ? self->SetScalarColoring(arrayname, attribute_type) : false;
95  }
97 
99 
103  static bool SetScalarColoring(
104  vtkSMProxy* proxy, const char* arrayname, int attribute_type, int component)
105  {
107  return self ? self->SetScalarColoring(arrayname, attribute_type, component) : false;
108  }
110 
123  virtual bool RescaleTransferFunctionToDataRange(bool extend = false, bool force = true);
124 
139  virtual bool RescaleTransferFunctionToDataRange(
140  const char* arrayname, int attribute_type, bool extend = false, bool force = true);
141 
143 
148  vtkSMProxy* proxy, bool extend = false, bool force = true)
149  {
151  return self ? self->RescaleTransferFunctionToDataRange(extend, force) : false;
152  }
154 
156 
160  static bool RescaleTransferFunctionToDataRange(vtkSMProxy* proxy, const char* arrayname,
161  int attribute_type, bool extend = false, bool force = true)
162  {
164  return self ? self->RescaleTransferFunctionToDataRange(arrayname, attribute_type, extend, force)
165  : false;
166  }
168 
173  virtual bool RescaleTransferFunctionToDataRangeOverTime();
174 
181  virtual bool RescaleTransferFunctionToDataRangeOverTime(
182  const char* arrayname, int attribute_type);
183 
185 
190  {
192  return self ? self->RescaleTransferFunctionToDataRangeOverTime() : false;
193  }
195 
197 
202  vtkSMProxy* proxy, const char* arrayname, int attribute_type)
203  {
205  return self ? self->RescaleTransferFunctionToDataRangeOverTime(arrayname, attribute_type)
206  : false;
207  }
209 
211 
215  virtual bool RescaleTransferFunctionToVisibleRange(vtkSMProxy* view);
216  virtual bool RescaleTransferFunctionToVisibleRange(
217  vtkSMProxy* view, const char* arrayname, int attribute_type);
219 
221 
226  {
228  return self ? self->RescaleTransferFunctionToVisibleRange(view) : false;
229  }
231  vtkSMProxy* proxy, vtkSMProxy* view, const char* arrayname, int attribute_type)
232  {
234  return self ? self->RescaleTransferFunctionToVisibleRange(view, arrayname, attribute_type)
235  : false;
236  }
238 
240 
244  virtual bool SetScalarBarVisibility(vtkSMProxy* view, bool visibile);
245  static bool SetScalarBarVisibility(vtkSMProxy* proxy, vtkSMProxy* view, bool visibile)
246  {
248  return self ? self->SetScalarBarVisibility(view, visibile) : false;
249  }
251 
253 
260  virtual bool HideScalarBarIfNotNeeded(vtkSMProxy* view);
262  {
264  return self ? self->HideScalarBarIfNotNeeded(view) : false;
265  }
267 
269 
273  virtual bool IsScalarBarVisible(vtkSMProxy* view);
274  static bool IsScalarBarVisible(vtkSMProxy* repr, vtkSMProxy* view)
275  {
277  return self ? self->IsScalarBarVisible(view) : false;
278  }
280 
282 
286  virtual vtkPVArrayInformation* GetArrayInformationForColorArray();
288  {
290  return self ? self->GetArrayInformationForColorArray() : NULL;
291  }
293 
295 
299  virtual vtkPVProminentValuesInformation* GetProminentValuesInformationForColorArray(
300  double uncertaintyAllowed = 1e-6, double fraction = 1e-3);
302  vtkSMProxy* proxy, double uncertaintyAllowed = 1e-6, double fraction = 1e-3)
303  {
305  return self ? self->GetProminentValuesInformationForColorArray(uncertaintyAllowed, fraction)
306  : NULL;
307  }
309 
315  virtual bool SetRepresentationType(const char* type);
316 
317 protected:
320 
324  virtual bool RescaleTransferFunctionToDataRange(
325  vtkPVArrayInformation* info, bool extend = false, bool force = true);
326 
331  virtual void CreateVTKObjects();
332 
333  // Whenever the "Representation" property is modified, we ensure that the
334  // this->InvalidateDataInformation() is called.
335  void OnPropertyUpdated(vtkObject*, unsigned long, void* calldata);
336 
342  virtual void SetPropertyModifiedFlag(const char* name, int flag);
343 
348 
352  virtual bool SetScalarColoringInternal(
353  const char* arrayname, int attribute_type, bool useComponent, int component);
354 
355 private:
356  vtkSMPVRepresentationProxy(const vtkSMPVRepresentationProxy&) VTK_DELETE_FUNCTION;
357  void operator=(const vtkSMPVRepresentationProxy&) VTK_DELETE_FUNCTION;
358 
359  bool InReadXMLAttributes;
360  class vtkStringSet;
361  vtkStringSet* RepresentationSubProxies;
362 };
363 
364 #endif
static bool RescaleTransferFunctionToDataRange(vtkSMProxy *proxy, const char *arrayname, int attribute_type, bool extend=false, bool force=true)
Safely call RescaleTransferFunctionToDataRange() after casting the proxy to appropriate type...
static bool RescaleTransferFunctionToVisibleRange(vtkSMProxy *proxy, vtkSMProxy *view, const char *arrayname, int attribute_type)
Safely call RescaleTransferFunctionToVisibleRange() after casting the proxy to the appropriate type...
static vtkPVProminentValuesInformation * GetProminentValuesInformationForColorArray(vtkSMProxy *proxy, double uncertaintyAllowed=1e-6, double fraction=1e-3)
Call vtkSMRepresentationProxy::GetProminentValuesInformation() for the array used for scalar color...
representation for "Render View" like views in ParaView.
static bool RescaleTransferFunctionToDataRangeOverTime(vtkSMProxy *proxy, const char *arrayname, int attribute_type)
Safely call RescaleTransferFunctionToDataRangeOverTime() after casting the proxy to appropriate type...
virtual void SetPropertyModifiedFlag(const char *name, int flag)
Note on property modified flags: The modified flag of each property associated with a proxy is stored...
static vtkPVArrayInformation * GetArrayInformationForColorArray(vtkSMProxy *proxy)
Returns the array information for the data array used for scalar coloring, if any.
static bool GetUsingScalarColoring(vtkSMProxy *proxy)
Safely call GetUsingScalarColoring() after casting the proxy to appropriate type. ...
static bool RescaleTransferFunctionToDataRange(vtkSMProxy *proxy, bool extend=false, bool force=true)
Safely call RescaleTransferFunctionToDataRange() after casting the proxy to appropriate type...
static bool SetScalarBarVisibility(vtkSMProxy *proxy, vtkSMProxy *view, bool visibile)
Set the scalar bar visibility.
virtual bool SetRepresentationType(const char *type)
Set the representation type.
Prominent values a data array takes on.
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
static bool RescaleTransferFunctionToDataRangeOverTime(vtkSMProxy *proxy)
Safely call RescaleTransferFunctionToDataRangeOverTime() after casting the proxy to appropriate type...
void PrintSelf(ostream &os, vtkIndent indent)
static bool SetScalarColoring(vtkSMProxy *proxy, const char *arrayname, int attribute_type, int component)
Safely call SetScalarColoring() after casting the proxy to the appropriate type, component version...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
virtual int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element)
Read attributes from an XML element.
Data array information like type.
static bool RescaleTransferFunctionToVisibleRange(vtkSMProxy *proxy, vtkSMProxy *view)
Safely call RescaleTransferFunctionToVisibleRange() after casting the proxy to the appropriate type...
static bool HideScalarBarIfNotNeeded(vtkSMProxy *repr, vtkSMProxy *view)
While SetScalarBarVisibility can be used to hide a scalar bar, it will always simply hide the scalar ...
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static bool SetScalarColoring(vtkSMProxy *proxy, const char *arrayname, int attribute_type)
Safely call SetScalarColoring() after casting the proxy to the appropriate type.
static vtkSMRepresentationProxy * New()
static vtkSMPVRepresentationProxy * SafeDownCast(vtkObject *o)
virtual void CreateVTKObjects()
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
static bool IsScalarBarVisible(vtkSMProxy *repr, vtkSMProxy *view)
Check scalar bar visibility.