IO/vtkTIFFReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00056 #ifndef __vtkTIFFReader_h
00057 #define __vtkTIFFReader_h
00058
00059 #include "vtkImageReader2.h"
00060
00061
00062 class vtkTIFFReaderInternal;
00063
00064
00065 class VTK_IO_EXPORT vtkTIFFReader : public vtkImageReader2
00066 {
00067 public:
00068 static vtkTIFFReader *New();
00069 vtkTypeRevisionMacro(vtkTIFFReader,vtkImageReader2);
00070 virtual void PrintSelf(ostream& os, vtkIndent indent);
00071
00073 virtual int CanReadFile(const char* fname);
00074
00076
00078 virtual const char* GetFileExtensions()
00079 {
00080 return ".tif .tiff";
00081 }
00083
00085
00087 virtual const char* GetDescriptiveName()
00088 {
00089 return "TIFF";
00090 }
00092
00094 void InitializeColors();
00095
00096
00097 enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
00098
00099 void ReadImageInternal( void *, void *outPtr,
00100 int *outExt, unsigned int size );
00101
00102
00104
00105 vtkTIFFReaderInternal *GetInternalImage()
00106 { return this->InternalImage; }
00108
00109
00110 protected:
00111 vtkTIFFReader();
00112 ~vtkTIFFReader();
00113
00114 void GetColor( int index,
00115 unsigned short *r, unsigned short *g, unsigned short *b );
00116 unsigned int GetFormat();
00117 virtual void ExecuteInformation();
00118 virtual void ExecuteData(vtkDataObject *out);
00119
00120 void ReadGenericImage( void *out,
00121 unsigned int width, unsigned int height,
00122 unsigned int size );
00123
00124 int EvaluateImageAt( void*, void* );
00125
00126 private:
00127 vtkTIFFReader(const vtkTIFFReader&);
00128 void operator=(const vtkTIFFReader&);
00129
00130 unsigned short *ColorRed;
00131 unsigned short *ColorGreen;
00132 unsigned short *ColorBlue;
00133 int TotalColors;
00134 unsigned int ImageFormat;
00135 vtkTIFFReaderInternal *InternalImage;
00136 int *InternalExtents;
00137 };
00138 #endif
00139
00140