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 =========================================================================*/
23 #ifndef vtkWebApplication_h
24 #define vtkWebApplication_h
25 
26 #include "vtkObject.h"
27 #include "vtkWebCoreModule.h" // needed for exports
28 
29 class vtkObjectIdMap;
30 class vtkRenderWindow;
33 
35 {
36 public:
37  static vtkWebApplication* New();
38  vtkTypeMacro(vtkWebApplication, vtkObject);
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
43  enum
44  {
45  ENCODING_NONE=0,
46  ENCODING_BASE64=1
47  };
48  vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
49  vtkGetMacro(ImageEncoding, int);
51 
53 
54  enum
55  {
56  COMPRESSION_NONE=0,
57  COMPRESSION_PNG=1,
58  COMPRESSION_JPEG=2
59  };
60  vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
61  vtkGetMacro(ImageCompression, int);
63 
65 
66  vtkUnsignedCharArray* StillRender(vtkRenderWindow* view, int quality = 100);
67  vtkUnsignedCharArray* InteractiveRender(vtkRenderWindow* view, int quality = 50);
68  const char* StillRenderToString(vtkRenderWindow* view, unsigned long time = 0, int quality = 100);
70 
74  bool GetHasImagesBeingProcessed(vtkRenderWindow*);
75 
77 
79  bool HandleInteractionEvent(
82 
84  void InvalidateCache(vtkRenderWindow* view);
85 
87 
88  vtkGetMacro(LastStillRenderToStringMTime, unsigned long);
90 
94  const char* GetWebGLSceneMetaData(vtkRenderWindow* view);
95 
98  const char* GetWebGLBinaryData(vtkRenderWindow *view, const char* id, int partIndex);
99 
100  vtkObjectIdMap* GetObjectIdMap();
101 
102 //BTX
103 protected:
106 
110 
111 private:
112  vtkWebApplication(const vtkWebApplication&); // Not implemented
113  void operator=(const vtkWebApplication&); // Not implemented
114 
115  class vtkInternals;
116  vtkInternals* Internals;
117 
118 //ETX
119 };
120 
121 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
class used to assign Id to any VTK object and be able to retreive it base on its id.
unsigned long LastStillRenderToStringMTime
defines ParaViewWeb application interface.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
dynamic, self-adjusting array of unsigned char
create a window for renderers to draw into
static vtkObject * New()
#define VTKWEBCORE_EXPORT