VTK
dox/IO/Image/vtkBMPReader.h
Go to the documentation of this file.
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 "vtkIOImageModule.h" // For export macro
00050 #include "vtkImageReader.h"
00051 class vtkLookupTable;
00052 
00053 class VTKIOIMAGE_EXPORT vtkBMPReader : public vtkImageReader
00054 {
00055 public:
00056   static vtkBMPReader *New();
00057   vtkTypeMacro(vtkBMPReader,vtkImageReader);
00058 
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00063   vtkGetMacro(Depth,int);
00065 
00067   virtual int CanReadFile(const char* fname);
00068 
00070 
00072   virtual const char* GetFileExtensions()
00073     {
00074       return ".bmp";
00075     }
00077 
00079 
00081   virtual const char* GetDescriptiveName()
00082     {
00083       return "Windows BMP";
00084     }
00086 
00088 
00091   vtkSetMacro(Allow8BitBMP,int);
00092   vtkGetMacro(Allow8BitBMP,int);
00093   vtkBooleanMacro(Allow8BitBMP,int);
00095 
00096   vtkGetObjectMacro(LookupTable, vtkLookupTable);
00097 
00098 //BTX
00100 
00101   vtkGetMacro(Colors,unsigned char *);
00102 //ETX
00104 
00105 protected:
00106   vtkBMPReader();
00107   ~vtkBMPReader();
00108 
00109   unsigned char *Colors;
00110   short Depth;
00111   int Allow8BitBMP;
00112   vtkLookupTable *LookupTable;
00113 
00114   virtual void ComputeDataIncrements();
00115   virtual void ExecuteInformation();
00116   virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation* outInfo);
00117 private:
00118   vtkBMPReader(const vtkBMPReader&);  // Not implemented.
00119   void operator=(const vtkBMPReader&);  // Not implemented.
00120 };
00121 #endif
00122 
00123