VTK  9.2.6
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 =========================================================================*/
44 #ifndef vtkBMPReader_h
45 #define vtkBMPReader_h
46 
47 #include "vtkIOImageModule.h" // For export macro
48 #include "vtkImageReader.h"
49 class vtkLookupTable;
50 
51 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
52 {
53 public:
54  static vtkBMPReader* New();
55  vtkTypeMacro(vtkBMPReader, vtkImageReader);
56 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
63  vtkGetMacro(Depth, int);
65 
69  int CanReadFile(VTK_FILEPATH const char* fname) override;
70 
76  const char* GetFileExtensions() override { return ".bmp"; }
77 
81  const char* GetDescriptiveName() override { return "Windows BMP"; }
82 
84 
89  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
90  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
91  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
93 
94  vtkGetObjectMacro(LookupTable, vtkLookupTable);
95 
97 
100  vtkGetMacro(Colors, unsigned char*);
102 
103 protected:
104  vtkBMPReader();
105  ~vtkBMPReader() override;
106 
107  unsigned char* Colors;
108  short Depth;
111 
112  void ComputeDataIncrements() override;
113  void ExecuteInformation() override;
114  void ExecuteDataWithInformation(vtkDataObject* out, vtkInformation* outInfo) override;
115 
116 private:
117  vtkBMPReader(const vtkBMPReader&) = delete;
118  void operator=(const vtkBMPReader&) = delete;
119 };
120 #endif
Store vtkAlgorithm input/output information.
read Windows BMP files
Definition: vtkBMPReader.h:51
virtual void ComputeDataIncrements()
map scalar values into colors via a lookup table
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:110
static vtkImageReader * New()
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:109
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned char * Colors
Definition: vtkBMPReader.h:107
int vtkTypeBool
Definition: vtkABI.h:69
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:81
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass of transformable binary file readers.
virtual void ExecuteInformation()
int CanReadFile(VTK_FILEPATH const char *) override
vtkImageReader itself can read raw binary files.
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
#define VTK_FILEPATH
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:76
general representation of visualization data
Definition: vtkDataObject.h:65