VTK  9.3.20240417
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
81 #ifndef vtkBMPReader_h
82 #define vtkBMPReader_h
83 
84 #include "vtkIOImageModule.h" // For export macro
85 #include "vtkImageReader.h"
86 VTK_ABI_NAMESPACE_BEGIN
87 class vtkLookupTable;
88 
89 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
90 {
91 public:
92  static vtkBMPReader* New();
93  vtkTypeMacro(vtkBMPReader, vtkImageReader);
94 
95  void PrintSelf(ostream& os, vtkIndent indent) override;
96 
98 
101  vtkGetMacro(Depth, int);
103 
107  int CanReadFile(VTK_FILEPATH const char* fname) override;
108 
114  const char* GetFileExtensions() override { return ".bmp"; }
115 
119  const char* GetDescriptiveName() override { return "Windows BMP"; }
120 
122 
127  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
128  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
129  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
131 
132  vtkGetObjectMacro(LookupTable, vtkLookupTable);
133 
135 
138  vtkGetMacro(Colors, unsigned char*);
140 
141 protected:
143  ~vtkBMPReader() override;
144 
145  unsigned char* Colors;
146  short Depth;
149 
150  void ComputeDataIncrements() override;
151  void ExecuteInformation() override;
153 
154 private:
155  vtkBMPReader(const vtkBMPReader&) = delete;
156  void operator=(const vtkBMPReader&) = delete;
157 };
158 VTK_ABI_NAMESPACE_END
159 #endif
read Windows BMP files
Definition: vtkBMPReader.h:90
static vtkBMPReader * New()
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:114
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:119
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(VTK_FILEPATH const char *fname) override
Is the given file a BMP file?
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:148
unsigned char * Colors
Definition: vtkBMPReader.h:145
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:147
general representation of visualization data
Superclass of transformable binary file readers.
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
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FILEPATH