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 "vtkRemotingViewsModule.h" //needed for exports
38 
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
53  virtual bool GetUsingScalarColoring();
54 
56 
60  static bool GetUsingScalarColoring(vtkSMProxy* proxy)
61  {
63  return self ? self->GetUsingScalarColoring() : false;
64  }
66 
73  virtual bool SetScalarColoring(const char* arrayname, int attribute_type);
74 
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 
140  virtual bool RescaleTransferFunctionToDataRange(
141  const char* arrayname, int attribute_type, bool extend = false, bool force = true);
142 
144 
149  vtkSMProxy* proxy, bool extend = false, bool force = true)
150  {
152  return self ? self->RescaleTransferFunctionToDataRange(extend, force) : false;
153  }
155 
157 
161  static bool RescaleTransferFunctionToDataRange(vtkSMProxy* proxy, const char* arrayname,
162  int attribute_type, bool extend = false, bool force = true)
163  {
165  return self ? self->RescaleTransferFunctionToDataRange(arrayname, attribute_type, extend, force)
166  : false;
167  }
169 
174  virtual bool RescaleTransferFunctionToDataRangeOverTime();
175 
182  virtual bool RescaleTransferFunctionToDataRangeOverTime(
183  const char* arrayname, int attribute_type);
184 
186 
191  {
193  return self ? self->RescaleTransferFunctionToDataRangeOverTime() : false;
194  }
196 
198 
203  vtkSMProxy* proxy, const char* arrayname, int attribute_type)
204  {
206  return self ? self->RescaleTransferFunctionToDataRangeOverTime(arrayname, attribute_type)
207  : false;
208  }
210 
212 
216  virtual bool RescaleTransferFunctionToVisibleRange(vtkSMProxy* view);
217  virtual bool RescaleTransferFunctionToVisibleRange(
218  vtkSMProxy* view, const char* arrayname, int attribute_type);
220 
222 
227  {
229  return self ? self->RescaleTransferFunctionToVisibleRange(view) : false;
230  }
232  vtkSMProxy* proxy, vtkSMProxy* view, const char* arrayname, int attribute_type)
233  {
235  return self ? self->RescaleTransferFunctionToVisibleRange(view, arrayname, attribute_type)
236  : false;
237  }
239 
241 
245  virtual bool SetScalarBarVisibility(vtkSMProxy* view, bool visible);
246  static bool SetScalarBarVisibility(vtkSMProxy* proxy, vtkSMProxy* view, bool visible)
247  {
249  return self ? self->SetScalarBarVisibility(view, visible) : false;
250  }
252 
254 
261  virtual bool HideScalarBarIfNotNeeded(vtkSMProxy* view);
263  {
265  return self ? self->HideScalarBarIfNotNeeded(view) : false;
266  }
268 
270 
274  virtual bool IsScalarBarVisible(vtkSMProxy* view);
275  static bool IsScalarBarVisible(vtkSMProxy* repr, vtkSMProxy* view)
276  {
278  return self ? self->IsScalarBarVisible(view) : false;
279  }
281 
283 
288  virtual vtkPVArrayInformation* GetArrayInformationForColorArray(bool checkRepresentedData = true);
290  vtkSMProxy* proxy, bool checkRepresentedData = true)
291  {
293  return self ? self->GetArrayInformationForColorArray(checkRepresentedData) : nullptr;
294  }
296 
298 
302  virtual vtkPVProminentValuesInformation* GetProminentValuesInformationForColorArray(
303  double uncertaintyAllowed = 1e-6, double fraction = 1e-3, bool force = false);
305  vtkSMProxy* proxy, double uncertaintyAllowed = 1e-6, double fraction = 1e-3, bool force = false)
306  {
308  return self
309  ? self->GetProminentValuesInformationForColorArray(uncertaintyAllowed, fraction, force)
310  : NULL;
311  }
313 
317  int GetEstimatedNumberOfAnnotationsOnScalarBar(vtkSMProxy* view);
319  {
321  return self ? self->GetEstimatedNumberOfAnnotationsOnScalarBar(view) : -1;
322  }
323 
329  bool SetRepresentationType(const char* type) override;
330 
335  bool GetVolumeIndependentRanges();
336 
338 
347  int IsScalarBarStickyVisible(vtkSMProxy* view);
349 
350 protected:
352  ~vtkSMPVRepresentationProxy() override;
353 
357  virtual bool RescaleTransferFunctionToDataRange(
358  vtkPVArrayInformation* info, bool extend = false, bool force = true);
359 
364  void CreateVTKObjects() override;
365 
366  // Whenever the "Representation" property is modified, we ensure that the
367  // this->InvalidateDataInformation() is called.
368  void OnPropertyUpdated(vtkObject*, unsigned long, void* calldata);
369 
375  void SetPropertyModifiedFlag(const char* name, int flag) override;
376 
380  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
381 
386  std::string GetDecoratedArrayName(const std::string& arrayname);
387 
391  virtual bool SetScalarColoringInternal(
392  const char* arrayname, int attribute_type, bool useComponent, int component);
393 
394 private:
396  void operator=(const vtkSMPVRepresentationProxy&) = delete;
397 
398  bool InReadXMLAttributes;
399  class vtkStringSet;
400  vtkStringSet* RepresentationSubProxies;
401 };
402 
403 #endif
Proxy for a representations.
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...
void CreateVTKObjects() override
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
component
type
#define VTKREMOTINGVIEWS_EXPORT
static bool RescaleTransferFunctionToVisibleRange(vtkSMProxy *proxy, vtkSMProxy *view, const char *arrayname, int attribute_type)
Safely call RescaleTransferFunctionToVisibleRange() after casting the proxy to the appropriate type...
representation for "Render View" like views in ParaView.
info
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 bool SetScalarBarVisibility(vtkSMProxy *proxy, vtkSMProxy *view, bool visible)
Set the scalar bar visibility.
static int GetEstimatedNumberOfAnnotationsOnScalarBar(vtkSMProxy *proxy, vtkSMProxy *view)
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...
name
static vtkPVArrayInformation * GetArrayInformationForColorArray(vtkSMProxy *proxy, bool checkRepresentedData=true)
Returns the array information for the data array used for scalar coloring, from input data...
virtual bool SetRepresentationType(const char *type)
Set the representation type.
Prominent values a data array takes on.
void PrintSelf(ostream &os, vtkIndent indent) override
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...
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
Data array information like type.
static bool RescaleTransferFunctionToVisibleRange(vtkSMProxy *proxy, vtkSMProxy *view)
Safely call RescaleTransferFunctionToVisibleRange() after casting the proxy to the appropriate type...
int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element) override
Read attributes from an XML element.
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 vtkPVProminentValuesInformation * GetProminentValuesInformationForColorArray(vtkSMProxy *proxy, double uncertaintyAllowed=1e-6, double fraction=1e-3, bool force=false)
Call vtkSMRepresentationProxy::GetProminentValuesInformation() for the array used for scalar color...
static vtkSMRepresentationProxy * New()
static vtkSMPVRepresentationProxy * SafeDownCast(vtkObject *o)
static bool IsScalarBarVisible(vtkSMProxy *repr, vtkSMProxy *view)
Check scalar bar visibility.