VTK  9.1.0
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 =========================================================================*/
110 #ifndef vtkBMPReader_h
111 #define vtkBMPReader_h
112 
113 #include "vtkIOImageModule.h" // For export macro
114 #include "vtkImageReader.h"
115 class vtkLookupTable;
116 
117 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
118 {
119 public:
120  static vtkBMPReader* New();
121  vtkTypeMacro(vtkBMPReader, vtkImageReader);
122 
123  void PrintSelf(ostream& os, vtkIndent indent) override;
124 
126 
129  vtkGetMacro(Depth, int);
131 
135  int CanReadFile(VTK_FILEPATH const char* fname) override;
136 
142  const char* GetFileExtensions() override { return ".bmp"; }
143 
147  const char* GetDescriptiveName() override { return "Windows BMP"; }
148 
150 
155  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
156  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
157  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
159 
160  vtkGetObjectMacro(LookupTable, vtkLookupTable);
161 
163 
166  vtkGetMacro(Colors, unsigned char*);
168 
169 protected:
171  ~vtkBMPReader() override;
172 
173  unsigned char* Colors;
174  short Depth;
177 
178  void ComputeDataIncrements() override;
179  void ExecuteInformation() override;
181 
182 private:
183  vtkBMPReader(const vtkBMPReader&) = delete;
184  void operator=(const vtkBMPReader&) = delete;
185 };
186 #endif
vtkImageReader
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:58
vtkBMPReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBMPReader::LookupTable
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:176
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkBMPReader::New
static vtkBMPReader * New()
vtkBMPReader::~vtkBMPReader
~vtkBMPReader() override
vtkBMPReader::ExecuteInformation
void ExecuteInformation() override
vtkBMPReader::ExecuteDataWithInformation
void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkBMPReader::vtkBMPReader
vtkBMPReader()
vtkBMPReader
read Windows BMP files
Definition: vtkBMPReader.h:118
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkBMPReader::ComputeDataIncrements
void ComputeDataIncrements() override
vtkBMPReader::Colors
unsigned char * Colors
Definition: vtkBMPReader.h:173
vtkBMPReader::GetFileExtensions
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:142
vtkBMPReader::CanReadFile
int CanReadFile(VTK_FILEPATH const char *fname) override
Is the given file a BMP file?
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:178
vtkBMPReader::Allow8BitBMP
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:175
vtkImageReader.h
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkBMPReader::Depth
short Depth
Definition: vtkBMPReader.h:174
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBMPReader::GetDescriptiveName
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:147