diff -wu clean/vtkTIFFReader.cxx patched/vtkTIFFReader.cxx --- clean/vtkTIFFReader.cxx 2005-04-14 14:31:38.833637904 +0300 +++ patched/vtkTIFFReader.cxx 2005-04-14 14:34:13.555116664 +0300 @@ -175,6 +175,7 @@ this->InitializeColors(); this->InternalImage = new vtkTIFFReaderInternal; this->InternalExtents = 0; + this->RawMode = 0; } vtkTIFFReader::~vtkTIFFReader() @@ -215,6 +216,7 @@ switch ( this->GetFormat() ) { + case vtkTIFFReader::RAW: case vtkTIFFReader::GRAYSCALE: case vtkTIFFReader::PALETTE_GRAYSCALE: this->SetNumberOfScalarComponents( 1 ); @@ -432,7 +434,8 @@ this->ColorGreen = 0; this->ColorBlue = 0; this->TotalColors = -1; - this->ImageFormat = vtkTIFFReader::NOFORMAT; + if(RawMode) { this->ImageFormat = vtkTIFFReader::RAW; } + else this->ImageFormat = vtkTIFFReader::NOFORMAT; } void vtkTIFFReader::ReadImageInternal( void* vtkNotUsed(in), void* outPtr, @@ -525,6 +528,7 @@ switch ( format ) { + case vtkTIFFReader::RAW: case vtkTIFFReader::GRAYSCALE: case vtkTIFFReader::RGB: case vtkTIFFReader::PALETTE_RGB: @@ -593,6 +597,10 @@ unsigned short red, green, blue, alpha; switch ( this->GetFormat() ) { + case vtkTIFFReader::RAW: + *image = *source; + increment = 1; + break; case vtkTIFFReader::GRAYSCALE: if ( this->GetInternalImage()->Photometrics == PHOTOMETRIC_MINISBLACK ) diff -wu clean/vtkTIFFReader.h patched/vtkTIFFReader.h --- clean/vtkTIFFReader.h 2005-04-14 14:31:38.833637904 +0300 +++ patched/vtkTIFFReader.h 2005-04-14 14:34:57.999360112 +0300 @@ -88,8 +88,11 @@ // Auxilary methods used by the reader internally. void InitializeColors(); + vtkSetMacro(RawMode,int); + vtkGetMacro(RawMode,int); + vtkBooleanMacro(RawMode,int); //BTX - enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER }; + enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER, RAW }; void ReadImageInternal( void *, void *outPtr, int *outExt, unsigned int size ); @@ -128,6 +131,7 @@ unsigned int ImageFormat; vtkTIFFReaderInternal *InternalImage; int *InternalExtents; + int RawMode; }; #endif Only in patched: vtkTIFFReaderPython.cxx