Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# IO/vtkBMPReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkBMPReader.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00063 #ifndef __vtkBMPReader_h
    00064 #define __vtkBMPReader_h
    00065
    00066 #include "vtkImageReader.h"
    00067 class vtkLookupTable;
    00068
    00069 class VTK_IO_EXPORT vtkBMPReader : public vtkImageReader
    00070 {
    00071 public:
    00072   static vtkBMPReader *New();
    00073   vtkTypeRevisionMacro(vtkBMPReader,vtkImageReader);
    00074
    00075   void PrintSelf(ostream& os, vtkIndent indent);
    00076
    00078
    00079   vtkGetMacro(Depth,int);
    00081
    00083   virtual int CanReadFile(const char* fname);
    00084   // Description:
    00085   // Get the file extensions for this format.
    00086   // Returns a string with a space separated list of extensions in
    00087   // the format .extension
    00088   virtual const char* GetFileExensions()
    00089     {
    00090       return ".bmp";
    00091     }
    00093
    00095
    00097   virtual const char* GetDescriptiveName()
    00098     {
    00099       return "Windows BMP";
    00100     }
    00102
    00104
    00107   vtkSetMacro(Allow8BitBMP,int);
    00108   vtkGetMacro(Allow8BitBMP,int);
    00109   vtkBooleanMacro(Allow8BitBMP,int);
    00111
    00112   vtkLookupTable *GetLookupTable(void);
    00113
    00114 //BTX
    00116   /*! Returns the color lut. */
    00117   vtkGetMacro(Colors,unsigned char *);
    00119 //ETX
    00120
    00121 protected:
    00122   vtkBMPReader();
    00123   ~vtkBMPReader();
    00124
    00125   unsigned char *Colors;
    00126   short Depth;
    00127   int Allow8BitBMP;
    00128   vtkLookupTable *LookupTable;
    00129
    00130   virtual void ComputeDataIncrements();
    00131   virtual void ExecuteInformation();
    00132   virtual void ExecuteData(vtkDataObject *out);
    00133 private:
    00134   vtkBMPReader(const vtkBMPReader&);  // Not implemented.
    00135   void operator=(const vtkBMPReader&);  // Not implemented.
    00136 };
    00137 #endif
    00138
    00139