VTK
vtkWebApplication.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWebApplication.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 vtkWebApplication_h
25 #define vtkWebApplication_h
26 
27 #include "vtkObject.h"
28 #include "vtkWebCoreModule.h" // needed for exports
29 
30 class vtkObjectIdMap;
31 class vtkRenderWindow;
34 
35 class VTKWEBCORE_EXPORT vtkWebApplication : public vtkObject
36 {
37 public:
38  static vtkWebApplication* New();
39  vtkTypeMacro(vtkWebApplication, vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
46  enum
47  {
48  ENCODING_NONE=0,
49  ENCODING_BASE64=1
50  };
51  vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
52  vtkGetMacro(ImageEncoding, int);
54 
56 
59  enum
60  {
61  COMPRESSION_NONE=0,
62  COMPRESSION_PNG=1,
63  COMPRESSION_JPEG=2
64  };
65  vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
66  vtkGetMacro(ImageCompression, int);
68 
70 
73  vtkUnsignedCharArray* StillRender(vtkRenderWindow* view, int quality = 100);
74  vtkUnsignedCharArray* InteractiveRender(vtkRenderWindow* view, int quality = 50);
75  const char* StillRenderToString(vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
77 
83  bool GetHasImagesBeingProcessed(vtkRenderWindow*);
84 
89  bool HandleInteractionEvent(
91 
95  void InvalidateCache(vtkRenderWindow* view);
96 
98 
101  vtkGetMacro(LastStillRenderToStringMTime, vtkMTimeType);
103 
109  const char* GetWebGLSceneMetaData(vtkRenderWindow* view);
110 
115  const char* GetWebGLBinaryData(vtkRenderWindow *view, const char* id, int partIndex);
116 
117  vtkObjectIdMap* GetObjectIdMap();
118 
119 protected:
122 
126 
127 private:
128  vtkWebApplication(const vtkWebApplication&) VTK_DELETE_FUNCTION;
129  void operator=(const vtkWebApplication&) VTK_DELETE_FUNCTION;
130 
131  class vtkInternals;
132  vtkInternals* Internals;
133 
134 };
135 
136 #endif
vtkMTimeType LastStillRenderToStringMTime
abstract base class for most VTK objects
Definition: vtkObject.h:59
class used to assign Id to any VTK object and be able to retreive it base on its id.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
defines ParaViewWeb application interface.
a simple class to control print indentation
Definition: vtkIndent.h:39
dynamic, self-adjusting array of unsigned char
create a window for renderers to draw into
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...