VTK  9.1.0
vtkThreadedImageWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkThreadedImageWriter.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=========================================================================*/
26#ifndef vtkThreadedImageWriter_h
27#define vtkThreadedImageWriter_h
28
29#include "vtkIOAsynchronousModule.h" // For export macro
30#include "vtkObject.h"
31
32class vtkImageData;
33
34class VTKIOASYNCHRONOUS_EXPORT vtkThreadedImageWriter : public vtkObject
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
49 void Initialize();
50
57 void EncodeAndWrite(vtkImageData* image, VTK_FILEPATH const char* fileName);
58
63 void SetMaxThreads(vtkTypeUInt32);
64 vtkGetMacro(MaxThreads, vtkTypeUInt32);
65
69 void Finalize();
70
71protected:
74
75private:
77 void operator=(const vtkThreadedImageWriter&) = delete;
78
79 class vtkInternals;
80 vtkInternals* Internals;
81 vtkTypeUInt32 MaxThreads;
82};
83
84#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
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