VTK  9.3.0
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
32 #ifndef vtkBMPReader_h
33 #define vtkBMPReader_h
34 
35 #include "vtkIOImageModule.h" // For export macro
36 #include "vtkImageReader.h"
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkLookupTable;
39 
40 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
41 {
42 public:
43  static vtkBMPReader* New();
44  vtkTypeMacro(vtkBMPReader, vtkImageReader);
45 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkGetMacro(Depth, int);
54 
58  int CanReadFile(VTK_FILEPATH const char* fname) override;
59 
65  const char* GetFileExtensions() override { return ".bmp"; }
66 
70  const char* GetDescriptiveName() override { return "Windows BMP"; }
71 
73 
78  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
79  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
80  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
82 
83  vtkGetObjectMacro(LookupTable, vtkLookupTable);
84 
86 
89  vtkGetMacro(Colors, unsigned char*);
91 
92 protected:
94  ~vtkBMPReader() override;
95 
96  unsigned char* Colors;
97  short Depth;
100 
101  void ComputeDataIncrements() override;
102  void ExecuteInformation() override;
104 
105 private:
106  vtkBMPReader(const vtkBMPReader&) = delete;
107  void operator=(const vtkBMPReader&) = delete;
108 };
109 VTK_ABI_NAMESPACE_END
110 #endif
read Windows BMP files
Definition: vtkBMPReader.h:41
static vtkBMPReader * New()
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:65
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:70
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:99
unsigned char * Colors
Definition: vtkBMPReader.h:96
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:98
general representation of visualization data
Definition: vtkDataObject.h:55
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:29
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FILEPATH