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 =========================================================================*/
26 #ifndef vtkBMPWriter_h
27 #define vtkBMPWriter_h
28 
29 #include "vtkIOImageModule.h" // For export macro
30 #include "vtkImageWriter.h"
31 
33 
34 class VTKIOIMAGE_EXPORT vtkBMPWriter : public vtkImageWriter
35 {
36 public:
37  static vtkBMPWriter *New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetMacro(WriteToMemory, vtkTypeUBool);
46  vtkGetMacro(WriteToMemory, vtkTypeUBool);
47  vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
49 
51 
55  virtual void SetResult(vtkUnsignedCharArray*);
56  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
58 
59 protected:
60  vtkBMPWriter();
61  ~vtkBMPWriter() override;
62 
63  void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override;
64  void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override;
65  void MemoryWrite(int, vtkImageData *, int wExt[6], vtkInformation *inInfo) override;
66 
67 private:
68  vtkBMPWriter(const vtkBMPWriter&) = delete;
69  void operator=(const vtkBMPWriter&) = delete;
70 
71  vtkUnsignedCharArray *Result;
72 };
73 
74 #endif
75 
76 
Store vtkAlgorithm input/output information.
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:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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
virtual void WriteFileHeader(ostream *, vtkImageData *, int [6])
Writes Windows BMP files.
Definition: vtkBMPWriter.h:34