VTK  9.3.20240425
vtkThreadedImageWriter.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
17#ifndef vtkThreadedImageWriter_h
18#define vtkThreadedImageWriter_h
19
20#include "vtkIOAsynchronousModule.h" // For export macro
21#include "vtkObject.h"
22
23VTK_ABI_NAMESPACE_BEGIN
24class vtkImageData;
25
26class VTKIOASYNCHRONOUS_EXPORT vtkThreadedImageWriter : public vtkObject
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
41 void Initialize();
42
49 void EncodeAndWrite(vtkImageData* image, VTK_FILEPATH const char* fileName);
50
55 void SetMaxThreads(vtkTypeUInt32);
56 vtkGetMacro(MaxThreads, vtkTypeUInt32);
57
61 void Finalize();
62
63protected:
66
67private:
69 void operator=(const vtkThreadedImageWriter&) = delete;
70
71 class vtkInternals;
72 vtkInternals* Internals;
73 vtkTypeUInt32 MaxThreads;
74};
75
76VTK_ABI_NAMESPACE_END
77#endif
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
class used to compress/write images using threads to prevent locking while encoding data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void EncodeAndWrite(vtkImageData *image, VTK_FILEPATH const char *fileName)
Push an image into the threaded writer.
static vtkThreadedImageWriter * New()
void Finalize()
This method will wait for any running thread to terminate.
void SetMaxThreads(vtkTypeUInt32)
Define the number of worker thread to use.
void Initialize()
Need to be called at least once before using the class.
~vtkThreadedImageWriter() override
#define VTK_FILEPATH