VTK  9.1.0
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
31class vtkObjectIdMap;
32class vtkRenderWindow;
35
36class VTKWEBCORE_EXPORT vtkWebApplication : public vtkObject
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) 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
75 void SetNumberOfEncoderThreads(vtkTypeUInt32);
78
80
85 const char* StillRenderToString(vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
87 vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
89
96
102
107
109
112 vtkGetMacro(LastStillRenderToMTime, vtkMTimeType);
114
121
126 const char* GetWebGLBinaryData(vtkRenderWindow* view, const char* id, int partIndex);
127
129
136 static std::string GetObjectId(vtkObject* obj);
137
138protected:
141
145
146private:
147 vtkWebApplication(const vtkWebApplication&) = delete;
148 void operator=(const vtkWebApplication&) = delete;
149
150 class vtkInternals;
151 vtkInternals* Internals;
152};
153
154#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
class used to assign Id to any VTK object and be able to retrieve it base on its id.
abstract base class for most VTK objects
Definition: vtkObject.h:82
create a window for renderers to draw into
dynamic, self-adjusting array of unsigned char
defines ParaViewWeb application interface.
bool HandleInteractionEvent(vtkRenderWindow *view, vtkWebInteractionEvent *event)
Communicate mouse interaction to a view.
static vtkWebApplication * New()
vtkTypeUInt32 GetNumberOfEncoderThreads()
Set the number of worker threads to use for image encoding.
const char * GetWebGLBinaryData(vtkRenderWindow *view, const char *id, int partIndex)
Return the binary data given the part index and the webGL object piece id in the scene.
static std::string GetObjectId(vtkObject *obj)
Return a hexadecimal formatted string of the VTK object's memory address, useful for uniquely identif...
vtkUnsignedCharArray * StillRenderToBuffer(vtkRenderWindow *view, vtkMTimeType time=0, int quality=100)
Render a view and obtain the rendered image.
const char * StillRenderToString(vtkRenderWindow *view, vtkMTimeType time=0, int quality=100)
Render a view and obtain the rendered image.
void SetNumberOfEncoderThreads(vtkTypeUInt32)
Set the number of worker threads to use for image encoding.
void InvalidateCache(vtkRenderWindow *view)
Invalidate view cache.
vtkUnsignedCharArray * InteractiveRender(vtkRenderWindow *view, int quality=50)
Render a view and obtain the rendered image.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkWebApplication() override
vtkMTimeType LastStillRenderToMTime
vtkUnsignedCharArray * StillRender(vtkRenderWindow *view, int quality=100)
Render a view and obtain the rendered image.
const char * GetWebGLSceneMetaData(vtkRenderWindow *view)
Return the Meta data description of the input scene in JSON format.
bool GetHasImagesBeingProcessed(vtkRenderWindow *)
StillRenderToString() need not necessary returns the most recently rendered image.
vtkObjectIdMap * GetObjectIdMap()
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287