ParaView
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 "vtkParaViewWebCoreModule.h" // needed for exports
29 
30 class vtkUnsignedCharArray;
31 class vtkSMViewProxy;
32 class vtkWebInteractionEvent;
33 
34 class VTKPARAVIEWWEBCORE_EXPORT vtkPVWebApplication : public vtkObject
35 {
36 public:
37  static vtkPVWebApplication* New();
38  vtkTypeMacro(vtkPVWebApplication, vtkObject);
39  void PrintSelf(ostream& os, vtkIndent indent);
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);
76 
82  bool GetHasImagesBeingProcessed(vtkSMViewProxy*);
83 
88  bool HandleInteractionEvent(vtkSMViewProxy* view, vtkWebInteractionEvent* event);
89 
93  void InvalidateCache(vtkSMViewProxy* view);
94 
96 
99  vtkGetMacro(LastStillRenderToStringMTime, vtkMTimeType);
101 
107  const char* GetWebGLSceneMetaData(vtkSMViewProxy* view);
108 
113  const char* GetWebGLBinaryData(vtkSMViewProxy* view, const char* id, int partIndex);
114 
116 
119  vtkGetVector2Macro(LastStillRenderImageSize, int);
121 
122 protected:
125 
129  int LastStillRenderImageSize[3];
130 
131 private:
132  vtkPVWebApplication(const vtkPVWebApplication&) VTK_DELETE_FUNCTION;
133  void operator=(const vtkPVWebApplication&) VTK_DELETE_FUNCTION;
134 
135  class vtkInternals;
136  vtkInternals* Internals;
137 };
138 
139 #endif
Superclass for all view proxies.
vtkMTimeType LastStillRenderToStringMTime
defines ParaViewWeb application interface.