VTK
vtkBMPWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBMPWriter.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 =========================================================================*/
29 #ifndef vtkBMPWriter_h
30 #define vtkBMPWriter_h
31 
32 #include "vtkIOImageModule.h" // For export macro
33 #include "vtkImageWriter.h"
34 
36 
37 class VTKIOIMAGE_EXPORT vtkBMPWriter : public vtkImageWriter
38 {
39 public:
40  static vtkBMPWriter *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetMacro(WriteToMemory, vtkTypeUBool);
49  vtkGetMacro(WriteToMemory, vtkTypeUBool);
50  vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
52 
54 
58  virtual void SetResult(vtkUnsignedCharArray*);
59  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
61 
62 protected:
63  vtkBMPWriter();
64  ~vtkBMPWriter() override;
65 
66  void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override;
67  void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override;
68  void MemoryWrite(int, vtkImageData *, int wExt[6], vtkInformation *inInfo) override;
69 
70 private:
71  vtkBMPWriter(const vtkBMPWriter&) = delete;
72  void operator=(const vtkBMPWriter&) = delete;
73 
74  vtkUnsignedCharArray *Result;
75 };
76 
77 #endif
78 
79 
Store vtkAlgorithm input/output information.
virtual void WriteFileHeader(ostream *, vtkImageData *, int[6])
virtual void WriteFile(ostream *file, vtkImageData *data, int extent[6], int wExtent[6])
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
unsigned int vtkTypeUBool
Definition: vtkABI.h:70
Writes images to files.
virtual void MemoryWrite(int, vtkImageData *, int[6], vtkInformation *)
static vtkImageWriter * New()
dynamic, self-adjusting array of unsigned char
Writes Windows BMP files.
Definition: vtkBMPWriter.h:37