VTK  9.4.20250110
vtkWebApplication.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkWebApplication_h
16#define vtkWebApplication_h
17
18#include "vtkObject.h"
19#include "vtkWebCoreModule.h" // needed for exports
20#include <string> // needed for std::string
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkObjectIdMap;
24class vtkRenderWindow;
27
28class VTKWEBCORE_EXPORT vtkWebApplication : public vtkObject
29{
30public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
39 enum
40 {
41 ENCODING_NONE = 0,
42 ENCODING_BASE64 = 1
43 };
44 vtkSetClampMacro(ImageEncoding, int, ENCODING_NONE, ENCODING_BASE64);
45 vtkGetMacro(ImageEncoding, int);
47
49
52 enum
53 {
54 COMPRESSION_NONE = 0,
55 COMPRESSION_PNG = 1,
56 COMPRESSION_JPEG = 2
57 };
58 vtkSetClampMacro(ImageCompression, int, COMPRESSION_NONE, COMPRESSION_JPEG);
59 vtkGetMacro(ImageCompression, int);
61
63
67 void SetNumberOfEncoderThreads(vtkTypeUInt32);
70
72
77 const char* StillRenderToString(vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
79 vtkRenderWindow* view, vtkMTimeType time = 0, int quality = 100);
81
88
94
99
101
104 vtkGetMacro(LastStillRenderToMTime, vtkMTimeType);
106
113
118 const char* GetWebGLBinaryData(vtkRenderWindow* view, const char* id, int partIndex);
119
121
128 static std::string GetObjectId(vtkObject* obj);
129
130protected:
133
137
138private:
139 vtkWebApplication(const vtkWebApplication&) = delete;
140 void operator=(const vtkWebApplication&) = delete;
141
142 class vtkInternals;
143 vtkInternals* Internals;
144};
145
146VTK_ABI_NAMESPACE_END
147#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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:162
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:270