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

vtkTIFFReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTIFFReader.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 =========================================================================*/
00028 #ifndef __vtkTIFFReader_h
00029 #define __vtkTIFFReader_h
00030 
00031 #include "vtkImageReader2.h"
00032 
00033 //BTX
00034 class vtkTIFFReaderInternal;
00035 //ETX
00036 
00037 class VTK_IO_EXPORT vtkTIFFReader : public vtkImageReader2
00038 {
00039 public:
00040   static vtkTIFFReader *New();
00041   vtkTypeRevisionMacro(vtkTIFFReader,vtkImageReader2);
00042   virtual void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045   virtual int CanReadFile(const char* fname);
00046 
00048 
00050   virtual const char* GetFileExtensions()
00051     {
00052     return ".tif .tiff";
00053     }
00055 
00057 
00059   virtual const char* GetDescriptiveName()
00060     {
00061     return "TIFF";
00062     }
00064 
00066   void InitializeColors();
00067 
00068   //BTX
00069   enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
00070 
00071   void ReadImageInternal( void *, void *outPtr,
00072                           int *outExt, unsigned int size );
00073 
00075   vtkTIFFReaderInternal *GetInternalImage() { return this->InternalImage; }
00076 
00077   int EvaluateImageAt( void*, void* );
00078   //ETX
00079 
00080 protected:
00081   vtkTIFFReader();
00082   ~vtkTIFFReader();
00083 
00084   void GetColor( int index,
00085                  unsigned short *r, unsigned short *g, unsigned short *b );
00086   unsigned int  GetFormat();
00087   virtual void ExecuteInformation();
00088   virtual void ExecuteData(vtkDataObject *out);
00089 
00090 private:
00091   vtkTIFFReader(const vtkTIFFReader&);  // Not implemented.
00092   void operator=(const vtkTIFFReader&);  // Not implemented.
00093 
00094   unsigned short *ColorRed;
00095   unsigned short *ColorGreen;
00096   unsigned short *ColorBlue;
00097   int TotalColors;
00098   unsigned int ImageFormat;
00099   vtkTIFFReaderInternal *InternalImage;
00100   int *InternalExtents;
00101 };
00102 #endif
00103 
00104 

Generated on Mon Jan 21 23:07:32 2008 for VTK by  doxygen 1.4.3-20050530