24#ifndef vtkDataEncoder_h
25#define vtkDataEncoder_h
29#include "vtkWebCoreModule.h"
32VTK_ABI_NAMESPACE_BEGIN
49 vtkGetMacro(MaxThreads, vtkTypeUInt32);
109 std::unique_ptr<vtkInternals> Internals;
class used to compress/encode images using threads.
void Finalize()
This method will wait for any running thread to terminate.
const char * EncodeAsBase64Jpg(vtkImageData *img, int quality=50)
Take an image data and synchronously convert it to a base-64 encoded jpg.
static vtkDataEncoder * New()
bool GetLatestOutput(vtkTypeUInt32 key, vtkSmartPointer< vtkUnsignedCharArray > &data)
Get access to the most-recent fully encoded result corresponding to the given key,...
~vtkDataEncoder() override
void Flush(vtkTypeUInt32 key)
Flushes the encoding pipe and blocks till the most recently pushed image for the particular key has b...
void Initialize()
Re-initializes the encoder.
const char * EncodeAsBase64Png(vtkImageData *img, int compressionLevel=5)
Take an image data and synchronously convert it to a base-64 encoded png.
void SetMaxThreads(vtkTypeUInt32)
Define the number of worker threads to use.
void Push(vtkTypeUInt32 key, vtkImageData *data, int quality, int encoding=1)
Push an image into the encoder.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
topologically and geometrically regular array of data
a simple class to control print indentation
abstract base class for most VTK objects
Hold a reference to a vtkObjectBase instance.
dynamic, self-adjusting array of unsigned char