VTK  9.2.5
vtkBMPReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBMPReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
113 #ifndef vtkBMPReader_h
114 #define vtkBMPReader_h
115 
116 #include "vtkIOImageModule.h" // For export macro
117 #include "vtkImageReader.h"
118 class vtkLookupTable;
119 
120 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
121 {
122 public:
123  static vtkBMPReader* New();
124  vtkTypeMacro(vtkBMPReader, vtkImageReader);
125 
126  void PrintSelf(ostream& os, vtkIndent indent) override;
127 
129 
132  vtkGetMacro(Depth, int);
134 
138  int CanReadFile(VTK_FILEPATH const char* fname) override;
139 
145  const char* GetFileExtensions() override { return ".bmp"; }
146 
150  const char* GetDescriptiveName() override { return "Windows BMP"; }
151 
153 
158  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
159  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
160  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
162 
163  vtkGetObjectMacro(LookupTable, vtkLookupTable);
164 
166 
169  vtkGetMacro(Colors, unsigned char*);
171 
172 protected:
174  ~vtkBMPReader() override;
175 
176  unsigned char* Colors;
177  short Depth;
180 
181  void ComputeDataIncrements() override;
182  void ExecuteInformation() override;
184 
185 private:
186  vtkBMPReader(const vtkBMPReader&) = delete;
187  void operator=(const vtkBMPReader&) = delete;
188 };
189 #endif
read Windows BMP files
Definition: vtkBMPReader.h:121
static vtkBMPReader * New()
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:145
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:150
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:179
unsigned char * Colors
Definition: vtkBMPReader.h:176
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:178
general representation of visualization data
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:119
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_FILEPATH