filters
kis_tiff_stream.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TIFFSTREAM_H_
00021 #define TIFFSTREAM_H_
00022
00023 #include <tiffio.h>
00024
00025 class TIFFStreamBase {
00026 public:
00027 TIFFStreamBase( uint16 depth ) : m_depth(depth) {};
00028 virtual uint32 nextValue() =0;
00029 virtual void restart() =0;
00030 virtual void moveToLine(uint32 lineNumber) =0;
00031 protected:
00032 uint16 m_depth;
00033 };
00034
00035 class TIFFStreamContigBase : public TIFFStreamBase {
00036 public:
00037 TIFFStreamContigBase( uint8* src, uint16 depth, uint32 lineSize );
00038 virtual void restart();
00039 virtual void moveToLine(uint32 lineNumber);
00040 protected:
00041 uint8* m_src;
00042 uint8* m_srcit;
00043 uint8 m_posinc;
00044 uint32 m_lineSize;
00045 };
00046
00047 class TIFFStreamContigBelow16 : public TIFFStreamContigBase {
00048 public:
00049 TIFFStreamContigBelow16( uint8* src, uint16 depth, uint32 lineSize ) : TIFFStreamContigBase(src, depth, lineSize) { }
00050 public:
00051 virtual uint32 nextValue();
00052 };
00053
00054 class TIFFStreamContigBelow32 : public TIFFStreamContigBase {
00055 public:
00056 TIFFStreamContigBelow32( uint8* src, uint16 depth, uint32 lineSize ) : TIFFStreamContigBase(src, depth, lineSize) { }
00057 public:
00058 virtual uint32 nextValue();
00059 };
00060
00061 class TIFFStreamContigAbove32 : public TIFFStreamContigBase {
00062 public:
00063 TIFFStreamContigAbove32( uint8* src, uint16 depth, uint32 lineSize ) : TIFFStreamContigBase(src, depth, lineSize) { }
00064 public:
00065 virtual uint32 nextValue();
00066 };
00067
00068
00069 class TIFFStreamSeperate : public TIFFStreamBase {
00070 public:
00071 TIFFStreamSeperate( uint8** srcs, uint8 nb_samples ,uint16 depth, uint32* lineSize);
00072 ~TIFFStreamSeperate();
00073 virtual uint32 nextValue();
00074 virtual void restart();
00075 virtual void moveToLine(uint32 lineNumber);
00076 private:
00077 TIFFStreamContigBase** streams;
00078 uint8 m_current_sample, m_nb_samples;
00079 };
00080
00081 #endif
|