vtkPVWebApplication.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkPVWebApplication_h
13 #define vtkPVWebApplication_h
14 
15 #include "vtkObject.h"
16 #include "vtkPVClientWebModule.h" // needed for exports
17 
19 class vtkSMViewProxy;
21 
23 {
24 public:
25  static vtkPVWebApplication* New();
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
30 
33  enum
34  {
35  ENCODING_NONE = 0,
36  ENCODING_BASE64 = 1
37  };
38  vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
39  vtkGetMacro(ImageEncoding, int);
41 
43 
46  enum
47  {
48  COMPRESSION_NONE = 0,
49  COMPRESSION_PNG = 1,
50  COMPRESSION_JPEG = 2
51  };
52  vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
53  vtkGetMacro(ImageCompression, int);
55 
57 
60  vtkUnsignedCharArray* StillRender(vtkSMViewProxy* view, int quality = 100);
61  vtkUnsignedCharArray* InteractiveRender(vtkSMViewProxy* view, int quality = 50);
62  const char* StillRenderToString(vtkSMViewProxy* view, unsigned long time = 0, int quality = 100);
63  vtkUnsignedCharArray* StillRenderToBuffer(
64  vtkSMViewProxy* view, unsigned long time = 0, int quality = 100);
66 
72  bool GetHasImagesBeingProcessed(vtkSMViewProxy*);
73 
78  bool HandleInteractionEvent(vtkSMViewProxy* view, vtkWebInteractionEvent* event);
79 
83  void InvalidateCache(vtkSMViewProxy* view);
84 
86 
89  vtkGetMacro(LastStillRenderToMTime, vtkMTimeType);
91 
97  const char* GetWebGLSceneMetaData(vtkSMViewProxy* view);
98 
103  const char* GetWebGLBinaryData(vtkSMViewProxy* view, const char* id, int partIndex);
104 
106 
109  vtkGetVector2Macro(LastStillRenderImageSize, int);
111 
112 protected:
114  ~vtkPVWebApplication() override;
115 
119  int LastStillRenderImageSize[3];
120 
121 private:
122  vtkPVWebApplication(const vtkPVWebApplication&) = delete;
123  void operator=(const vtkPVWebApplication&) = delete;
124 
125  class vtkInternals;
126  vtkInternals* Internals;
127 };
128 
129 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Superclass for all view proxies.
vtkTypeUInt64 vtkMTimeType
defines ParaViewWeb application interface.
#define VTKPVCLIENTWEB_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)
vtkMTimeType LastStillRenderToMTime