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
41 #ifndef vtkBMPReader_h
42 #define vtkBMPReader_h
43 
44 #include "vtkIOImageModule.h" // For export macro
45 #include "vtkImageReader.h"
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkLookupTable;
48 
49 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
50 {
51 public:
52  static vtkBMPReader* New();
53  vtkTypeMacro(vtkBMPReader, vtkImageReader);
54 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
61  vtkGetMacro(Depth, int);
63 
67  int CanReadFile(VTK_FILEPATH const char* fname) override;
68 
74  const char* GetFileExtensions() override { return ".bmp"; }
75 
79  const char* GetDescriptiveName() override { return "Windows BMP"; }
80 
82 
87  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
88  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
89  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
91 
92  vtkGetObjectMacro(LookupTable, vtkLookupTable);
93 
95 
98  vtkGetMacro(Colors, unsigned char*);
100 
101 protected:
103  ~vtkBMPReader() override;
104 
105  unsigned char* Colors;
106  short Depth;
109 
110  void ComputeDataIncrements() override;
111  void ExecuteInformation() override;
113 
114 private:
115  vtkBMPReader(const vtkBMPReader&) = delete;
116  void operator=(const vtkBMPReader&) = delete;
117 };
118 VTK_ABI_NAMESPACE_END
119 #endif
read Windows BMP files
Definition: vtkBMPReader.h:50
static vtkBMPReader * New()
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:74
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:79
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:108
unsigned char * Colors
Definition: vtkBMPReader.h:105
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:107
general representation of visualization data
Definition: vtkDataObject.h:64
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FILEPATH