00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBMPReader.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00046 #ifndef __vtkBMPReader_h 00047 #define __vtkBMPReader_h 00048 00049 #include "vtkImageReader.h" 00050 class vtkLookupTable; 00051 00052 class VTK_IO_EXPORT vtkBMPReader : public vtkImageReader 00053 { 00054 public: 00055 static vtkBMPReader *New(); 00056 vtkTypeMacro(vtkBMPReader,vtkImageReader); 00057 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 00062 vtkGetMacro(Depth,int); 00064 00066 virtual int CanReadFile(const char* fname); 00067 00069 00071 virtual const char* GetFileExtensions() 00072 { 00073 return ".bmp"; 00074 } 00076 00078 00080 virtual const char* GetDescriptiveName() 00081 { 00082 return "Windows BMP"; 00083 } 00085 00087 00090 vtkSetMacro(Allow8BitBMP,int); 00091 vtkGetMacro(Allow8BitBMP,int); 00092 vtkBooleanMacro(Allow8BitBMP,int); 00094 00095 vtkGetObjectMacro(LookupTable, vtkLookupTable); 00096 00097 //BTX 00099 00100 vtkGetMacro(Colors,unsigned char *); 00102 //ETX 00103 00104 protected: 00105 vtkBMPReader(); 00106 ~vtkBMPReader(); 00107 00108 unsigned char *Colors; 00109 short Depth; 00110 int Allow8BitBMP; 00111 vtkLookupTable *LookupTable; 00112 00113 virtual void ComputeDataIncrements(); 00114 virtual void ExecuteInformation(); 00115 virtual void ExecuteData(vtkDataObject *out); 00116 private: 00117 vtkBMPReader(const vtkBMPReader&); // Not implemented. 00118 void operator=(const vtkBMPReader&); // Not implemented. 00119 }; 00120 #endif 00121 00122