VTK
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:
37  static vtkThreadedImageWriter* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
49  void Initialize();
50 
55  void EncodeAndWrite(vtkImageData* image, const char* fileName);
56 
63  void PushImageToQueue(vtkImageData*& data, const char* fileName);
64 
69  void SetMaxThreads(vtkTypeUInt32);
70  vtkGetMacro(MaxThreads, vtkTypeUInt32);
71 
75  void Finalize();
76 
77 protected:
79  ~vtkThreadedImageWriter() override;
80 
81 private:
83  void operator=(const vtkThreadedImageWriter&) = delete;
84 
85  class vtkInternals;
86  vtkInternals* Internals;
87  vtkTypeUInt32 MaxThreads;
88 };
89 
90 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
class used to compress/write images using threads to prevent locking while encoding data...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...