VTK  9.4.20241218
vtkBMPWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
56#ifndef vtkBMPWriter_h
57#define vtkBMPWriter_h
58
59#include "vtkIOImageModule.h" // For export macro
60#include "vtkImageWriter.h"
61
62VTK_ABI_NAMESPACE_BEGIN
64
65class VTKIOIMAGE_EXPORT vtkBMPWriter : public vtkImageWriter
66{
67public:
68 static vtkBMPWriter* New();
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
73
76 vtkSetMacro(WriteToMemory, vtkTypeUBool);
77 vtkGetMacro(WriteToMemory, vtkTypeUBool);
78 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
80
82
87 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
89
90protected:
92 ~vtkBMPWriter() override;
93
94 void WriteFile(ostream* file, vtkImageData* data, int ext[6], int wExt[6]) override;
95 void WriteFileHeader(ostream*, vtkImageData*, int wExt[6]) override;
96 void MemoryWrite(int, vtkImageData*, int wExt[6], vtkInformation* inInfo) override;
97
98private:
99 vtkBMPWriter(const vtkBMPWriter&) = delete;
100 void operator=(const vtkBMPWriter&) = delete;
101
102 vtkUnsignedCharArray* Result;
103};
104
105VTK_ABI_NAMESPACE_END
106#endif
Writes Windows BMP files.
void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override
void MemoryWrite(int, vtkImageData *, int wExt[6], vtkInformation *inInfo) override
~vtkBMPWriter() override
static vtkBMPWriter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override
virtual void SetResult(vtkUnsignedCharArray *)
When writing to memory this is the result, it will be NULL until the data is written the first time.
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of unsigned char
unsigned int vtkTypeUBool
Definition vtkABI.h:65