• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/IO/vtkTIFFReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    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 
00069   virtual void ReadVolume(void* buffer);
00070 
00072   virtual void ReadTiles(void* buffer);
00073 
00075 
00085   void SetOrientationType( unsigned int orientationType );
00086   vtkGetMacro( OrientationType, unsigned int );
00088 
00090 
00091   vtkGetMacro( OrientationTypeSpecifiedFlag, bool );
00093   
00095 
00096   vtkSetMacro( OriginSpecifiedFlag, bool );
00097   vtkGetMacro( OriginSpecifiedFlag, bool );
00098   vtkBooleanMacro( OriginSpecifiedFlag, bool );
00100   
00102  */
00103   vtkSetMacro( SpacingSpecifiedFlag, bool );
00104   vtkGetMacro( SpacingSpecifiedFlag, bool );
00105   vtkBooleanMacro( SpacingSpecifiedFlag, bool );
00107   
00108   //BTX
00109   enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
00110 
00111   void ReadImageInternal( void *, void *outPtr,
00112                           int *outExt, unsigned int size );
00113 
00115   vtkTIFFReaderInternal *GetInternalImage() { return this->InternalImage; }
00116 
00117   int EvaluateImageAt( void*, void* );
00118   //ETX
00119 
00120 protected:
00121   vtkTIFFReader();
00122   ~vtkTIFFReader();
00123 
00124   void GetColor( int index,
00125                  unsigned short *r, unsigned short *g, unsigned short *b );
00126 
00127   void ReadGenericImage( void *out, 
00128                          unsigned int vtkNotUsed(width), 
00129                          unsigned int height );
00130 
00131   // To support Zeiss images
00132   void ReadTwoSamplesPerPixelImage( void *out, 
00133                          unsigned int vtkNotUsed(width), 
00134                          unsigned int height );
00135 
00136   unsigned int  GetFormat();
00137   virtual void ExecuteInformation();
00138   virtual void ExecuteData(vtkDataObject *out);
00139 
00140 private:
00141   vtkTIFFReader(const vtkTIFFReader&);  // Not implemented.
00142   void operator=(const vtkTIFFReader&);  // Not implemented.
00143 
00144   unsigned short *ColorRed;
00145   unsigned short *ColorGreen;
00146   unsigned short *ColorBlue;
00147   int TotalColors;
00148   unsigned int ImageFormat;
00149   vtkTIFFReaderInternal *InternalImage;
00150   int *OutputExtent;
00151   vtkIdType *OutputIncrements;
00152   unsigned int OrientationType;
00153   bool OrientationTypeSpecifiedFlag;
00154   bool OriginSpecifiedFlag;
00155   bool SpacingSpecifiedFlag;
00156 };
00157 #endif
00158 
00159 

Generated by  doxygen 1.7.1