VTK  9.0.2
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 
32 class vtkImageData;
33 
34 class VTKIOASYNCHRONOUS_EXPORT vtkThreadedImageWriter : public vtkObject
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
49  void Initialize();
50 
57  void EncodeAndWrite(vtkImageData* image, const char* fileName);
58 
63  void SetMaxThreads(vtkTypeUInt32);
64  vtkGetMacro(MaxThreads, vtkTypeUInt32);
65 
69  void Finalize();
70 
71 protected:
74 
75 private:
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:42
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
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 Finalize()
This method will wait for any running thread to terminate.
void SetMaxThreads(vtkTypeUInt32)
Define the number of worker thread to use.
void EncodeAndWrite(vtkImageData *image, const char *fileName)
Push an image into the threaded writer.
void Initialize()
Need to be called at least once before using the class.
static vtkThreadedImageWriter * New()
~vtkThreadedImageWriter() override
@ image
Definition: vtkX3D.h:380