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 #include <string> // needed for std::string
30 
31 class vtkObjectIdMap;
32 class vtkRenderWindow;
35 
36 class VTKWEBCORE_EXPORT vtkWebApplication : public vtkObject
37 {
38 public:
39  static vtkWebApplication* New();
40  vtkTypeMacro(vtkWebApplication, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44 
47  enum
48  {
49  ENCODING_NONE=0,
50  ENCODING_BASE64=1
51  };
52  vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
53  vtkGetMacro(ImageEncoding, int);
55 
57 
60  enum
61  {
62  COMPRESSION_NONE=0,
63  COMPRESSION_PNG=1,
64  COMPRESSION_JPEG=2
65  };
66  vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
67  vtkGetMacro(ImageCompression, int);
69 
71 
74  vtkUnsignedCharArray* StillRender(vtkRenderWindow* view, int quality = 100);
75  vtkUnsignedCharArray* InteractiveRender(vtkRenderWindow* view, int quality = 50);
76  const char* StillRenderToString(vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
78 
84  bool GetHasImagesBeingProcessed(vtkRenderWindow*);
85 
90  bool HandleInteractionEvent(
92 
96  void InvalidateCache(vtkRenderWindow* view);
97 
99 
102  vtkGetMacro(LastStillRenderToStringMTime, vtkMTimeType);
104 
110  const char* GetWebGLSceneMetaData(vtkRenderWindow* view);
111 
116  const char* GetWebGLBinaryData(vtkRenderWindow *view, const char* id, int partIndex);
117 
118  vtkObjectIdMap* GetObjectIdMap();
119 
126  static std::string GetObjectId(vtkObject* obj);
127 
128 protected:
131 
135 
136 private:
137  vtkWebApplication(const vtkWebApplication&) VTK_DELETE_FUNCTION;
138  void operator=(const vtkWebApplication&) VTK_DELETE_FUNCTION;
139 
140  class vtkInternals;
141  vtkInternals* Internals;
142 
143 };
144 
145 #endif
vtkMTimeType LastStillRenderToStringMTime
abstract base class for most VTK objects
Definition: vtkObject.h:53
class used to assign Id to any VTK object and be able to retrieve it base on its id.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
defines ParaViewWeb application interface.
a simple class to control print indentation
Definition: vtkIndent.h:33
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...