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 
vtkImageReader
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:44
vtkImageReader2::ComputeDataIncrements
virtual void ComputeDataIncrements()
vtkImageReader::ExecuteDataWithInformation
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkBMPReader::LookupTable
vtkLookupTable * LookupTable
Definition: vtkBMPReader.h:119
vtkImageReader::New
static vtkImageReader * New()
vtkBMPReader
read Windows BMP files
Definition: vtkBMPReader.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkBMPReader::Colors
unsigned char * Colors
Definition: vtkBMPReader.h:116
vtkBMPReader::GetFileExtensions
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkBMPReader.h:79
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:74
vtkImageReader2::ExecuteInformation
virtual void ExecuteInformation()
vtkBMPReader::Allow8BitBMP
vtkTypeBool Allow8BitBMP
Definition: vtkBMPReader.h:118
vtkImageReader.h
vtkImageReader2::CanReadFile
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
Definition: vtkImageReader2.h:285
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkImageReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBMPReader::Depth
short Depth
Definition: vtkBMPReader.h:117
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:87