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);
171 void ReadCurrentPage(
void *out,
size_t pixelOffset);
173 template <
typename TComponent>
174 void ReadGenericImage(
void *out,
176 unsigned int height);
178 template <
typename TComponent>
179 void RGBAImageToBuffer(
void *out,
const uint32_t *tempImage );
181 template <
typename TType>
182 void PutGrayscale( TType *to, TType * from,
183 unsigned int xsize,
unsigned int ysize,
184 unsigned int toskew,
unsigned int fromskew );
186 template <
typename TType>
187 void PutRGB_( TType *to, TType * from,
188 unsigned int xsize,
unsigned int ysize,
189 unsigned int toskew,
unsigned int fromskew );
192 template <
typename TType,
typename TFromType>
193 void PutPaletteGrayscale( TType *to, TFromType * from,
194 unsigned int xsize,
unsigned int ysize,
195 unsigned int toskew,
unsigned int fromskew );
197 template <
typename TType,
typename TFromType>
198 void PutPaletteRGB( TType *to, TFromType * from,
199 unsigned int xsize,
unsigned int ysize,
200 unsigned int toskew,
unsigned int fromskew );
210 #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
unsigned short * m_ColorGreen
void SetCompressionToNoCompression()
TIFFReaderInternal * m_InternalImage
unsigned short * m_ColorRed
void SetCompressionToJPEG()
unsigned short * m_ColorBlue
unsigned int m_ImageFormat
Control indentation during Print() invocation.
SmartPointer< Self > Pointer
void SetCompressionToPackBits()