vtkSMPVRepresentationProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkSMPVRepresentationProxy_h
24 #define vtkSMPVRepresentationProxy_h
25 
26 #include "vtkParaViewDeprecation.h" // for deprecation
27 #include "vtkRemotingViewsModule.h" //needed for exports
29 #include "vtkSmartPointer.h" // For LastLUTProxy
30 
32 
33 class VTKREMOTINGVIEWS_EXPORT vtkSMPVRepresentationProxy : public vtkSMRepresentationProxy
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
45  void SetLastLUTProxy(vtkSMProxy* proxy);
46  vtkSMProxy* GetLastLUTProxy();
48 
54  virtual bool GetUsingScalarColoring();
55 
60  vtkSMProxy* GetLUTProxy(vtkSMProxy* view);
61 
63 
67  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
68  static bool GetUsingScalarColoring(vtkSMProxy* proxy)
69  {
71  return self ? self->GetUsingScalarColoring() : false;
72  }
74 
79  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
80  static void SetupLookupTable(vtkSMProxy* proxy);
81 
89  bool UpdateScalarBarRange(vtkSMProxy* view, bool deleteRange);
90 
97  virtual bool SetScalarColoring(const char* arrayname, int attribute_type);
98 
108  virtual bool SetScalarColoring(const char* arrayname, int attribute_type, int component);
109 
111 
115  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
116  static bool SetScalarColoring(vtkSMProxy* proxy, const char* arrayname, int attribute_type)
117  {
119  return self ? self->SetScalarColoring(arrayname, attribute_type) : false;
120  }
122 
124 
128  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
129  static bool SetScalarColoring(
130  vtkSMProxy* proxy, const char* arrayname, int attribute_type, int component)
131  {
133  return self ? self->SetScalarColoring(arrayname, attribute_type, component) : false;
134  }
136 
149  virtual bool RescaleTransferFunctionToDataRange(bool extend = false, bool force = true);
150 
166  virtual bool RescaleTransferFunctionToDataRange(
167  const char* arrayname, int attribute_type, bool extend = false, bool force = true);
168 
170 
174  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
175  static bool RescaleTransferFunctionToDataRange(
176  vtkSMProxy* proxy, bool extend = false, bool force = true)
177  {
179  return self ? self->RescaleTransferFunctionToDataRange(extend, force) : false;
180  }
182 
184 
188  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
189  static bool RescaleTransferFunctionToDataRange(vtkSMProxy* proxy, const char* arrayname,
190  int attribute_type, bool extend = false, bool force = true)
191  {
193  return self ? self->RescaleTransferFunctionToDataRange(arrayname, attribute_type, extend, force)
194  : false;
195  }
197 
202  virtual bool RescaleTransferFunctionToDataRangeOverTime();
203 
210  virtual bool RescaleTransferFunctionToDataRangeOverTime(
211  const char* arrayname, int attribute_type);
212 
214 
218  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
219  static bool RescaleTransferFunctionToDataRangeOverTime(vtkSMProxy* proxy)
220  {
222  return self ? self->RescaleTransferFunctionToDataRangeOverTime() : false;
223  }
225 
227 
231  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
232  static bool RescaleTransferFunctionToDataRangeOverTime(
233  vtkSMProxy* proxy, const char* arrayname, int attribute_type)
234  {
236  return self ? self->RescaleTransferFunctionToDataRangeOverTime(arrayname, attribute_type)
237  : false;
238  }
240 
242 
246  virtual bool RescaleTransferFunctionToVisibleRange(vtkSMProxy* view);
247  virtual bool RescaleTransferFunctionToVisibleRange(
248  vtkSMProxy* view, const char* arrayname, int attribute_type);
250 
252 
256  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
257  static bool RescaleTransferFunctionToVisibleRange(vtkSMProxy* proxy, vtkSMProxy* view)
258  {
260  return self ? self->RescaleTransferFunctionToVisibleRange(view) : false;
261  }
262  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
263  static bool RescaleTransferFunctionToVisibleRange(
264  vtkSMProxy* proxy, vtkSMProxy* view, const char* arrayname, int attribute_type)
265  {
267  return self ? self->RescaleTransferFunctionToVisibleRange(view, arrayname, attribute_type)
268  : false;
269  }
271 
273 
277  virtual bool SetScalarBarVisibility(vtkSMProxy* view, bool visible);
278  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
279  static bool SetScalarBarVisibility(vtkSMProxy* proxy, vtkSMProxy* view, bool visible)
280  {
282  return self ? self->SetScalarBarVisibility(view, visible) : false;
283  }
285 
287 
294  virtual bool HideScalarBarIfNotNeeded(vtkSMProxy* view);
295  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
296  static bool HideScalarBarIfNotNeeded(vtkSMProxy* repr, vtkSMProxy* view)
297  {
299  return self ? self->HideScalarBarIfNotNeeded(view) : false;
300  }
302 
304 
308  virtual bool IsScalarBarVisible(vtkSMProxy* view);
309  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
310  static bool IsScalarBarVisible(vtkSMProxy* repr, vtkSMProxy* view)
311  {
313  return self ? self->IsScalarBarVisible(view) : false;
314  }
316 
318 
323  virtual vtkPVArrayInformation* GetArrayInformationForColorArray(bool checkRepresentedData = true);
324  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
325  static vtkPVArrayInformation* GetArrayInformationForColorArray(
326  vtkSMProxy* proxy, bool checkRepresentedData = true)
327  {
329  return self ? self->GetArrayInformationForColorArray(checkRepresentedData) : nullptr;
330  }
332 
334 
338  virtual vtkPVProminentValuesInformation* GetProminentValuesInformationForColorArray(
339  double uncertaintyAllowed = 1e-6, double fraction = 1e-3, bool force = false);
340  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
341  static vtkPVProminentValuesInformation* GetProminentValuesInformationForColorArray(
342  vtkSMProxy* proxy, double uncertaintyAllowed = 1e-6, double fraction = 1e-3, bool force = false)
343  {
345  return self
346  ? self->GetProminentValuesInformationForColorArray(uncertaintyAllowed, fraction, force)
347  : nullptr;
348  }
350 
354  int GetEstimatedNumberOfAnnotationsOnScalarBar(vtkSMProxy* view);
355  PARAVIEW_DEPRECATED_IN_5_12_0("Use static functions from vtkSMColorMapEditorHelper instead")
356  static int GetEstimatedNumberOfAnnotationsOnScalarBar(vtkSMProxy* proxy, vtkSMProxy* view)
357  {
359  return self ? self->GetEstimatedNumberOfAnnotationsOnScalarBar(view) : -1;
360  }
361 
367  bool SetRepresentationType(const char* type) override;
368 
373  bool GetVolumeIndependentRanges();
374 
376 
385  int IsScalarBarStickyVisible(vtkSMProxy* view);
387 
391  void ViewUpdated(vtkSMProxy* view) override;
392 
393 protected:
395  ~vtkSMPVRepresentationProxy() override;
396 
400  PARAVIEW_DEPRECATED_IN_5_12_0("Internal logic should be in vtkSMColorMapEditorHelper, use "
401  "exposed functions of the helper instead")
402  virtual bool RescaleTransferFunctionToDataRange(
403  vtkPVArrayInformation* info, bool extend = false, bool force = true);
404 
409  void CreateVTKObjects() override;
410 
411  // Whenever the "Representation" property is modified, we ensure that the
412  // this->InvalidateDataInformation() is called.
413  void OnPropertyUpdated(vtkObject*, unsigned long, void* calldata);
414 
420  void SetPropertyModifiedFlag(const char* name, int flag) override;
421 
425  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
426 
431  PARAVIEW_DEPRECATED_IN_5_12_0("Internal logic should be in vtkSMColorMapEditorHelper, use "
432  "exposed functions of the helper instead")
433  std::string GetDecoratedArrayName(const std::string& arrayname);
434 
438  PARAVIEW_DEPRECATED_IN_5_12_0("Internal logic should be in vtkSMColorMapEditorHelper, use "
439  "exposed functions of the helper instead")
440  virtual bool SetScalarColoringInternal(
441  const char* arrayname, int attribute_type, bool useComponent, int component);
442 
449 
450 private:
452  void operator=(const vtkSMPVRepresentationProxy&) = delete;
453 
454  bool InReadXMLAttributes;
455  class vtkStringSet;
456  vtkStringSet* RepresentationSubProxies;
457 };
458 
459 #endif
vtkSMSessionProxyManager
Definition: vtkSMSessionProxyManager.h:135
component
component
vtkPVProminentValuesInformation
Prominent values a data array takes on.
Definition: vtkPVProminentValuesInformation.h:32
vtkSMRepresentationProxy
Proxy for a representations.
Definition: vtkSMRepresentationProxy.h:76
vtkSMRepresentationProxy::New
static vtkSMRepresentationProxy * New()
vtkSmartPointer
vtkObject
vtkSMRepresentationProxy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMColorMapEditorHelper
helper for color map editor handling
Definition: vtkSMColorMapEditorHelper.h:22
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkSMRepresentationProxy::SetRepresentationType
virtual bool SetRepresentationType(const char *type)
Set the representation type.
vtkSMPVRepresentationProxy::SafeDownCast
static vtkSMPVRepresentationProxy * SafeDownCast(vtkObject *o)
vtkIndent
vtkSmartPointer.h
vtkSMPVRepresentationProxy
representation for "Render View" like views in ParaView.
Definition: vtkSMPVRepresentationProxy.h:33
vtkParaViewDeprecation.h
vtkSMRepresentationProxy::ViewUpdated
virtual void ViewUpdated(vtkSMProxy *view)
Called after the view updates.
vtkPVXMLElement
Definition: vtkPVXMLElement.h:23
vtkPVArrayInformation
provides meta data about arrays.
Definition: vtkPVArrayInformation.h:30
PARAVIEW_DEPRECATED_IN_5_12_0
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
Definition: vtkParaViewDeprecation.h:100
vtkSMRepresentationProxy.h