18 #ifndef itkTIFFImageIO_h
19 #define itkTIFFImageIO_h
20 #include "ITKIOTIFFExport.h"
28 class TIFFReaderInternal;
61 virtual bool CanReadFile(
const char *) ITK_OVERRIDE;
64 virtual
void ReadImageInformation() ITK_OVERRIDE;
67 virtual
void Read(
void *buffer) ITK_OVERRIDE;
70 virtual
void ReadVolume(
void *buffer);
76 virtual
bool CanWriteFile(const
char *) ITK_OVERRIDE;
80 virtual
void WriteImageInformation() ITK_OVERRIDE;
84 virtual
void Write(const
void *buffer) ITK_OVERRIDE;
86 enum { NOFORMAT,
RGB_, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER };
109 m_Compression = compression;
115 if ( compression == NoCompression )
117 this->SetUseCompression(
false);
121 this->SetUseCompression(
true);
128 itkSetClampMacro(JPEGQuality,
int, 1, 100);
129 itkGetConstMacro(JPEGQuality,
int);
135 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
137 void InternalWrite(
const void *buffer);
139 void InitializeColors();
141 void ReadGenericImage(
void *out,
143 unsigned int height);
146 void ReadTwoSamplesPerPixelImage(
void *out,
148 unsigned int height);
150 unsigned int GetFormat();
152 void GetColor(
unsigned int index,
unsigned short *red,
153 unsigned short *green,
unsigned short *blue);
156 bool CanFindTIFFTag(
unsigned int t);
159 void * ReadRawByteFromTag(
unsigned int t,
unsigned int & value_count);
170 void operator=(const
Self &) ITK_DELETE_FUNCTION;
172 void ReadCurrentPage(
void *out,
size_t pixelOffset);
174 template <typename TComponent>
175 void ReadGenericImage(
void *out,
177 unsigned int height);
179 template <typename TComponent>
180 void RGBAImageToBuffer(
void *out, const
uint32_t *tempImage );
182 template <typename TType>
183 void PutGrayscale( TType *to, TType * from,
184 unsigned int xsize,
unsigned int ysize,
185 unsigned int toskew,
unsigned int fromskew );
187 template <typename TType>
188 void PutRGB_( TType *to, TType * from,
189 unsigned int xsize,
unsigned int ysize,
190 unsigned int toskew,
unsigned int fromskew );
193 template <typename TType, typename TFromType>
194 void PutPaletteGrayscale( TType *to, TFromType * from,
195 unsigned int xsize,
unsigned int ysize,
196 unsigned int toskew,
unsigned int fromskew );
198 template <typename TType, typename TFromType>
199 void PutPaletteRGB( TType *to, TFromType * from,
200 unsigned int xsize,
unsigned int ysize,
201 unsigned int toskew,
unsigned int fromskew );
203 unsigned short *m_ColorRed;
204 unsigned short *m_ColorGreen;
205 unsigned short *m_ColorBlue;
207 unsigned int m_ImageFormat;
211 #endif // itkTIFFImageIO_h
Light weight base class for most itk classes.
void SetCompressionToLZW()
Abstract superclass defines image IO interface.
ImageIO object for reading and writing TIFF images.
void SetCompression(int compression)
void SetCompressionToDeflate()
KWIML_INT_uint32_t uint32_t
void SetCompressionToNoCompression()
TIFFReaderInternal * m_InternalImage
void SetCompressionToJPEG()
Control indentation during Print() invocation.
SmartPointer< Self > Pointer
void SetCompressionToPackBits()