VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkTIFFReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTIFFReader.h,v
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkTIFFReader_h
32 #define __vtkTIFFReader_h
33 
34 #include "vtkIOImageModule.h" // For export macro
35 #include "vtkImageReader2.h"
36 
37 //BTX
38 class vtkTIFFReaderInternal;
39 //ETX
40 
42 {
43 public:
44  static vtkTIFFReader *New();
46  virtual void PrintSelf(ostream& os, vtkIndent indent);
47 
49  virtual int CanReadFile(const char* fname);
50 
52 
54  virtual const char* GetFileExtensions()
55  {
56  return ".tif .tiff";
57  }
59 
61 
63  virtual const char* GetDescriptiveName()
64  {
65  return "TIFF";
66  }
68 
70  void InitializeColors();
71 
73  virtual void ReadVolume(void* buffer);
74 
76  virtual void ReadTiles(void* buffer);
77 
79 
89  void SetOrientationType( unsigned int orientationType );
90  vtkGetMacro( OrientationType, unsigned int );
92 
94 
95  vtkGetMacro( OrientationTypeSpecifiedFlag, bool );
97 
99 
100  vtkSetMacro( OriginSpecifiedFlag, bool );
101  vtkGetMacro( OriginSpecifiedFlag, bool );
102  vtkBooleanMacro( OriginSpecifiedFlag, bool );
104 
106  */
107  vtkSetMacro( SpacingSpecifiedFlag, bool );
108  vtkGetMacro( SpacingSpecifiedFlag, bool );
109  vtkBooleanMacro( SpacingSpecifiedFlag, bool );
111 
113 
114  void ReadImageInternal( void *, void *outPtr,
115  int *outExt, unsigned int size );
117 
118 protected:
119  vtkTIFFReader();
120  ~vtkTIFFReader();
121 
122  enum { NOFORMAT, RGB, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
123 
124  vtkTIFFReaderInternal *GetInternalImage() { return this->InternalImage; }
125 
126  int EvaluateImageAt( void*, void* );
127 
128  void GetColor( int index,
129  unsigned short *r, unsigned short *g, unsigned short *b );
130 
131  void ReadGenericImage( void *out,
132  unsigned int vtkNotUsed(width),
133  unsigned int height );
134 
135  // To support Zeiss images
136  void ReadTwoSamplesPerPixelImage( void *out,
137  unsigned int vtkNotUsed(width),
138  unsigned int height );
139 
140  unsigned int GetFormat();
141  virtual void ExecuteInformation();
142  virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo);
143 
144 private:
145  vtkTIFFReader(const vtkTIFFReader&); // Not implemented.
146  void operator=(const vtkTIFFReader&); // Not implemented.
147 
148  unsigned short *ColorRed;
149  unsigned short *ColorGreen;
150  unsigned short *ColorBlue;
151  int TotalColors;
152  unsigned int ImageFormat;
153  vtkTIFFReaderInternal *InternalImage;
154  int OutputExtent[6];
155  vtkIdType OutputIncrements[3];
156  unsigned int OrientationType;
157  bool OrientationTypeSpecifiedFlag;
158  bool OriginSpecifiedFlag;
159  bool SpacingSpecifiedFlag;
160 };
161 #endif
GLsizeiptr size
Definition: vtkgl.h:11843
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkTIFFReaderInternal * GetInternalImage()
static vtkImageReader2 * New()
GLuint index
Definition: vtkgl.h:11983
GLuint buffer
Definition: vtkgl.h:11839
Store vtkAlgorithm input/output information.
read TIFF files
Definition: vtkTIFFReader.h:41
int vtkIdType
Definition: vtkType.h:268
GLdouble GLdouble GLdouble r
Definition: vtkgl.h:11610
GLint GLint GLsizei GLsizei height
Definition: vtkgl.h:11316
virtual int CanReadFile(const char *vtkNotUsed(fname))
a simple class to control print indentation
Definition: vtkIndent.h:38
GLint GLint GLsizei width
Definition: vtkgl.h:11316
virtual void ExecuteInformation()
Superclass of binary file readers.
void PrintSelf(ostream &os, vtkIndent indent)
GLboolean GLboolean g
Definition: vtkgl.h:12312
virtual const char * GetDescriptiveName()
Definition: vtkTIFFReader.h:63
#define VTKIOIMAGE_EXPORT
virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo)
general representation of visualization data
Definition: vtkDataObject.h:64
virtual const char * GetFileExtensions()
Definition: vtkTIFFReader.h:54