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);
61 
63 
66  vtkGetMacro(Depth,int);
68 
72  virtual int CanReadFile(const char* fname);
73 
79  virtual const char* GetFileExtensions()
80  {
81  return ".bmp";
82  }
83 
87  virtual const char* GetDescriptiveName()
88  {
89  return "Windows BMP";
90  }
91 
93 
98  vtkSetMacro(Allow8BitBMP,int);
99  vtkGetMacro(Allow8BitBMP,int);
100  vtkBooleanMacro(Allow8BitBMP,int);
102 
103  vtkGetObjectMacro(LookupTable, vtkLookupTable);
104 
106 
109  vtkGetMacro(Colors,unsigned char *);
111 
112 protected:
113  vtkBMPReader();
114  ~vtkBMPReader();
115 
116  unsigned char *Colors;
117  short Depth;
120 
121  virtual void ComputeDataIncrements();
122  virtual void ExecuteInformation();
123  virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation* outInfo);
124 private:
125  vtkBMPReader(const vtkBMPReader&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkBMPReader&) VTK_DELETE_FUNCTION;
127 };
128 #endif
129 
130 
virtual const char * GetFileExtensions()
Get the file extensions for this format.
Definition: vtkBMPReader.h:79
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()
unsigned char * Colors
Definition: vtkBMPReader.h:116
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
a simple class to control print indentation
Definition: vtkIndent.h:39
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
Superclass of transformable binary file readers.
virtual void ExecuteInformation()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual const char * GetDescriptiveName()
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkBMPReader.h:87