VTK
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 =========================================================================*/
47 #ifndef vtkBMPReader_h
48 #define vtkBMPReader_h
49 
50 #include "vtkIOImageModule.h" // For export macro
51 #include "vtkImageReader.h"
52 class vtkLookupTable;
53 
54 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
55 {
56 public:
57  static vtkBMPReader *New();
59 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
63 
66  vtkGetMacro(Depth,int);
68 
72  int CanReadFile(const char* fname) override;
73 
79  const char* GetFileExtensions() override
80  {
81  return ".bmp";
82  }
83 
87  const char* GetDescriptiveName() override
88  {
89  return "Windows BMP";
90  }
91 
93 
98  vtkSetMacro(Allow8BitBMP,vtkTypeBool);
99  vtkGetMacro(Allow8BitBMP,vtkTypeBool);
100  vtkBooleanMacro(Allow8BitBMP,vtkTypeBool);
102 
103  vtkGetObjectMacro(LookupTable, vtkLookupTable);
104 
106 
109  vtkGetMacro(Colors,unsigned char *);
111 
112 protected:
113  vtkBMPReader();
114  ~vtkBMPReader() override;
115 
116  unsigned char *Colors;
117  short Depth;
120 
121  void ComputeDataIncrements() override;
122  void ExecuteInformation() override;
123  void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation* outInfo) override;
124 private:
125  vtkBMPReader(const vtkBMPReader&) = delete;
126  void operator=(const vtkBMPReader&) = delete;
127 };
128 #endif
129 
130 
Store vtkAlgorithm input/output information.
read Windows BMP files
Definition: vtkBMPReader.h:54
virtual void ComputeDataIncrements()
map scalar values into colors via a lookup table
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:119
static vtkImageReader * New()
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:118
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:116
int vtkTypeBool
Definition: vtkABI.h:69
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:87
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass of transformable binary file readers.
virtual void ExecuteInformation()
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:79
general representation of visualization data
Definition: vtkDataObject.h:64