Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkBMPReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBMPReader.h,v $
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 =========================================================================*/
00059 #ifndef __vtkBMPReader_h
00060 #define __vtkBMPReader_h
00061 
00062 #include "vtkImageReader.h"
00063 class vtkLookupTable;
00064 
00065 class VTK_IO_EXPORT vtkBMPReader : public vtkImageReader
00066 {
00067 public:
00068   static vtkBMPReader *New();
00069   vtkTypeRevisionMacro(vtkBMPReader,vtkImageReader);
00070 
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00074 
00075   vtkGetMacro(Depth,int);
00077   
00079   virtual int CanReadFile(const char* fname);
00080   // Description:
00081   // Get the file extensions for this format.
00082   // Returns a string with a space separated list of extensions in 
00083   // the format .extension
00084   virtual const char* GetFileExtensions()
00085     {
00086       return ".bmp";
00087     }
00089 
00091 
00093   virtual const char* GetDescriptiveName()
00094     {
00095       return "Windows BMP";
00096     }
00098   
00100 
00103   vtkSetMacro(Allow8BitBMP,int);
00104   vtkGetMacro(Allow8BitBMP,int);
00105   vtkBooleanMacro(Allow8BitBMP,int);
00107 
00108   vtkLookupTable *GetLookupTable(void);
00109 
00110 //BTX
00112 
00113   vtkGetMacro(Colors,unsigned char *);
00115 //ETX
00116 
00117 protected:
00118   vtkBMPReader();
00119   ~vtkBMPReader();
00120 
00121   unsigned char *Colors;
00122   short Depth;
00123   int Allow8BitBMP;
00124   vtkLookupTable *LookupTable;
00125   
00126   virtual void ComputeDataIncrements();
00127   virtual void ExecuteInformation();
00128   virtual void ExecuteData(vtkDataObject *out);
00129 private:
00130   vtkBMPReader(const vtkBMPReader&);  // Not implemented.
00131   void operator=(const vtkBMPReader&);  // Not implemented.
00132 };
00133 #endif
00134 
00135