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 =========================================================================*/
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();
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
74  {
75  return ".bmp";
76  }
77 
81  const char* GetDescriptiveName() override
82  {
83  return "Windows BMP";
84  }
85 
87 
92  vtkSetMacro(Allow8BitBMP,vtkTypeBool);
93  vtkGetMacro(Allow8BitBMP,vtkTypeBool);
94  vtkBooleanMacro(Allow8BitBMP,vtkTypeBool);
96 
97  vtkGetObjectMacro(LookupTable, vtkLookupTable);
98 
100 
103  vtkGetMacro(Colors,unsigned char *);
105 
106 protected:
107  vtkBMPReader();
108  ~vtkBMPReader() override;
109 
110  unsigned char *Colors;
111  short Depth;
114 
115  void ComputeDataIncrements() override;
116  void ExecuteInformation() override;
117  void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation* outInfo) override;
118 private:
119  vtkBMPReader(const vtkBMPReader&) = delete;
120  void operator=(const vtkBMPReader&) = delete;
121 };
122 #endif
123 
124 
Store vtkAlgorithm input/output information.
read Windows BMP files
Definition: vtkBMPReader.h:48
virtual void ComputeDataIncrements()
map scalar values into colors via a lookup table
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:113
static vtkImageReader * New()
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:112
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:110
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:81
a simple class to control print indentation
Definition: vtkIndent.h:33
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:73
general representation of visualization data
Definition: vtkDataObject.h:58