vtkPVWebApplication.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 =========================================================================*/
24 #ifndef vtkPVWebApplication_h
25 #define vtkPVWebApplication_h
26 
27 #include "vtkObject.h"
28 #include "vtkPVClientWebModule.h" // needed for exports
29 
31 class vtkSMViewProxy;
33 
34 class VTKPVCLIENTWEB_EXPORT vtkPVWebApplication : public vtkObject
35 {
36 public:
37  static vtkPVWebApplication* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  enum
46  {
47  ENCODING_NONE = 0,
48  ENCODING_BASE64 = 1
49  };
50  vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
51  vtkGetMacro(ImageEncoding, int);
53 
55 
58  enum
59  {
60  COMPRESSION_NONE = 0,
61  COMPRESSION_PNG = 1,
62  COMPRESSION_JPEG = 2
63  };
64  vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
65  vtkGetMacro(ImageCompression, int);
67 
69 
72  vtkUnsignedCharArray* StillRender(vtkSMViewProxy* view, int quality = 100);
73  vtkUnsignedCharArray* InteractiveRender(vtkSMViewProxy* view, int quality = 50);
74  const char* StillRenderToString(vtkSMViewProxy* view, unsigned long time = 0, int quality = 100);
75  vtkUnsignedCharArray* StillRenderToBuffer(
76  vtkSMViewProxy* view, unsigned long time = 0, int quality = 100);
78 
84  bool GetHasImagesBeingProcessed(vtkSMViewProxy*);
85 
90  bool HandleInteractionEvent(vtkSMViewProxy* view, vtkWebInteractionEvent* event);
91 
95  void InvalidateCache(vtkSMViewProxy* view);
96 
98 
101  vtkGetMacro(LastStillRenderToMTime, vtkMTimeType);
103 
109  const char* GetWebGLSceneMetaData(vtkSMViewProxy* view);
110 
115  const char* GetWebGLBinaryData(vtkSMViewProxy* view, const char* id, int partIndex);
116 
118 
121  vtkGetVector2Macro(LastStillRenderImageSize, int);
123 
124 protected:
127 
131  int LastStillRenderImageSize[3];
132 
133 private:
134  vtkPVWebApplication(const vtkPVWebApplication&) = delete;
135  void operator=(const vtkPVWebApplication&) = delete;
136 
137  class vtkInternals;
138  vtkInternals* Internals;
139 };
140 
141 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Superclass for all view proxies.
vtkTypeUInt64 vtkMTimeType
defines ParaViewWeb application interface.
static vtkObject * New()
void operator=(const vtkObjectBase &)
vtkMTimeType LastStillRenderToMTime