dox/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
00072
virtual int CanReadFile(
const char* fname);
00073
00075
00077 virtual const char*
GetFileExensions()
00078 {
00079
return ".tif .tiff";
00080 }
00082
00084
00086 virtual const char*
GetDescriptiveName()
00087 {
00088
return "TIFF";
00089 }
00091
00093
void InitializeColors();
00094
00095
00096
enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
00097
00098
void ReadImageInternal(
void *,
void *outPtr,
00099
int *outExt,
unsigned int size );
00100
00101
00103
00104 vtkTIFFReaderInternal *GetInternalImage()
00105 {
return this->InternalImage; }
00107
00108
00109
protected:
00110 vtkTIFFReader();
00111 ~vtkTIFFReader();
00112
00113
void GetColor(
int index,
00114
unsigned short *r,
unsigned short *g,
unsigned short *b );
00115
unsigned int GetFormat();
00116
virtual void ExecuteInformation();
00117
virtual void ExecuteData(
vtkDataObject *out);
00118
00119
void ReadGenericImage(
void *out,
00120
unsigned int width,
unsigned int height,
00121
unsigned int size );
00122
00123
int EvaluateImageAt(
void*,
void* );
00124
00125
private:
00126 vtkTIFFReader(
const vtkTIFFReader&);
00127
void operator=(
const vtkTIFFReader&);
00128
00129
unsigned short *ColorRed;
00130
unsigned short *ColorGreen;
00131
unsigned short *ColorBlue;
00132
int TotalColors;
00133
unsigned int ImageFormat;
00134 vtkTIFFReaderInternal *InternalImage;
00135
int *InternalExtents;
00136 };
00137
#endif
00138
00139