vtkTIFFReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkTIFFReader_h
00040 #define __vtkTIFFReader_h
00041
00042 #include "vtkImageReader2.h"
00043
00044
00045 class vtkTIFFReaderInternal;
00046
00047
00048 class VTK_IO_EXPORT vtkTIFFReader : public vtkImageReader2
00049 {
00050 public:
00051 static vtkTIFFReader *New();
00052 vtkTypeRevisionMacro(vtkTIFFReader,vtkImageReader2);
00053 virtual void PrintSelf(ostream& os, vtkIndent indent);
00054
00056 virtual int CanReadFile(const char* fname);
00057
00059
00061 virtual const char* GetFileExtensions()
00062 {
00063 return ".tif .tiff";
00064 }
00066
00068
00070 virtual const char* GetDescriptiveName()
00071 {
00072 return "TIFF";
00073 }
00075
00077 void InitializeColors();
00078
00079
00080 enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
00081
00082 void ReadImageInternal( void *, void *outPtr,
00083 int *outExt, unsigned int size );
00084
00085
00087
00088 vtkTIFFReaderInternal *GetInternalImage()
00089 { return this->InternalImage; }
00091
00092
00093 protected:
00094 vtkTIFFReader();
00095 ~vtkTIFFReader();
00096
00097 void GetColor( int index,
00098 unsigned short *r, unsigned short *g, unsigned short *b );
00099 unsigned int GetFormat();
00100 virtual void ExecuteInformation();
00101 virtual void ExecuteData(vtkDataObject *out);
00102
00103 void ReadGenericImage( void *out,
00104 unsigned int width, unsigned int height,
00105 unsigned int size );
00106
00107 int EvaluateImageAt( void*, void* );
00108
00109 private:
00110 vtkTIFFReader(const vtkTIFFReader&);
00111 void operator=(const vtkTIFFReader&);
00112
00113 unsigned short *ColorRed;
00114 unsigned short *ColorGreen;
00115 unsigned short *ColorBlue;
00116 int TotalColors;
00117 unsigned int ImageFormat;
00118 vtkTIFFReaderInternal *InternalImage;
00119 int *InternalExtents;
00120 };
00121 #endif
00122
00123