VTK  9.6.20260212
vtkBMPReader.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
82
83#ifndef vtkBMPReader_h
84#define vtkBMPReader_h
85
86#include "vtkIOImageModule.h" // For export macro
87#include "vtkImageReader.h"
88VTK_ABI_NAMESPACE_BEGIN
89class vtkLookupTable;
90
91class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
92{
93public:
94 static vtkBMPReader* New();
96
97 void PrintSelf(ostream& os, vtkIndent indent) override;
98
100
103 vtkGetMacro(Depth, int);
105
107
112 int CanReadFile(VTK_FILEPATH const char* fname) override;
113 int CanReadFile(vtkResourceStream* stream) override;
115
121 const char* GetFileExtensions() override { return ".bmp"; }
122
126 const char* GetDescriptiveName() override { return "Windows BMP"; }
127
129
136 vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
138
139 vtkGetObjectMacro(LookupTable, vtkLookupTable);
140
142
145 vtkGetMacro(Colors, unsigned char*);
147
148protected:
150 ~vtkBMPReader() override;
151
152 unsigned char* Colors;
153 short Depth;
156
157 void ComputeDataIncrements() override;
158 void ExecuteInformation() override;
160
161private:
162 vtkBMPReader(const vtkBMPReader&) = delete;
163 void operator=(const vtkBMPReader&) = delete;
164
165 static bool ReadAndCheckHeader(
166 vtkResourceStream* stream, bool quiet, vtkTypeInt32& offset, vtkTypeInt32& infoSize);
167};
168VTK_ABI_NAMESPACE_END
169#endif
int CanReadFile(const char *fname) override
Return 1 if, after a quick check of file header, it looks like the provided file or stream can be rea...
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
const char * GetFileExtensions() override
Get the file extensions for this format.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
void ExecuteInformation() override
~vtkBMPReader() override
void ComputeDataIncrements() override
int CanReadFile(vtkResourceStream *stream) override
Return 1 if, after a quick check of file header, it looks like the provided file or stream can be rea...
static vtkBMPReader * New()
vtkLookupTable * LookupTable
unsigned char * Colors
vtkTypeBool Allow8BitBMP
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
Abstract class used for custom streams.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_FILEPATH