VTK  9.0.1
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 =========================================================================*/
41 #ifndef vtkBMPReader_h
42 #define vtkBMPReader_h
43 
44 #include "vtkIOImageModule.h" // For export macro
45 #include "vtkImageReader.h"
46 class vtkLookupTable;
47 
48 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
49 {
50 public:
51  static vtkBMPReader* New();
52  vtkTypeMacro(vtkBMPReader, vtkImageReader);
53 
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
60  vtkGetMacro(Depth, int);
62 
66  int CanReadFile(const char* fname) override;
67 
73  const char* GetFileExtensions() override { return ".bmp"; }
74 
78  const char* GetDescriptiveName() override { return "Windows BMP"; }
79 
81 
86  vtkSetMacro(Allow8BitBMP, vtkTypeBool);
87  vtkGetMacro(Allow8BitBMP, vtkTypeBool);
88  vtkBooleanMacro(Allow8BitBMP, vtkTypeBool);
90 
91  vtkGetObjectMacro(LookupTable, vtkLookupTable);
92 
94 
97  vtkGetMacro(Colors, unsigned char*);
99 
100 protected:
102  ~vtkBMPReader() override;
103 
104  unsigned char* Colors;
105  short Depth;
108 
109  void ComputeDataIncrements() override;
110  void ExecuteInformation() override;
112 
113 private:
114  vtkBMPReader(const vtkBMPReader&) = delete;
115  void operator=(const vtkBMPReader&) = delete;
116 };
117 #endif
vtkImageReader
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:39
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:107
vtkBMPReader::New
static vtkBMPReader * New()
vtkBMPReader::~vtkBMPReader
~vtkBMPReader() override
vtkBMPReader::ExecuteInformation
void ExecuteInformation() override
vtkBMPReader::CanReadFile
int CanReadFile(const char *fname) override
Is the given file a BMP file?
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:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkBMPReader::ComputeDataIncrements
void ComputeDataIncrements() override
vtkBMPReader::Colors
unsigned char * Colors
Definition: vtkBMPReader.h:104
vtkBMPReader::GetFileExtensions
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:73
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:69
vtkBMPReader::Allow8BitBMP
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:106
vtkImageReader.h
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkBMPReader::Depth
short Depth
Definition: vtkBMPReader.h:105
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:78