Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMJPEG2000CODEC_H
00016 #define GDCMJPEG2000CODEC_H
00017
00018 #include "gdcmImageCodec.h"
00019
00020 namespace gdcm
00021 {
00022
00023 class JPEG2000Internals;
00031 class GDCM_EXPORT JPEG2000Codec : public ImageCodec
00032 {
00033 friend class Bitmap;
00034 public:
00035 JPEG2000Codec();
00036 ~JPEG2000Codec();
00037
00038 bool CanDecode(TransferSyntax const &ts) const;
00039 bool CanCode(TransferSyntax const &ts) const;
00040
00041 bool Decode(DataElement const &is, DataElement &os);
00042 bool Code(DataElement const &in, DataElement &out);
00043
00044 virtual bool GetHeaderInfo(std::istream &is, TransferSyntax &ts);
00045
00046
00047
00048 void SetRate(unsigned int idx, double rate);
00049 double GetRate(unsigned int idx = 0) const;
00050
00051 void SetQuality(unsigned int idx, double q);
00052 double GetQuality(unsigned int idx = 0) const;
00053
00054 void SetTileSize(unsigned int tx, unsigned int ty);
00055
00056 void SetNumberOfResolutions(unsigned int nres);
00057
00058 void SetReversible(bool res);
00059
00060 protected:
00061 bool Decode(std::istream &is, std::ostream &os);
00062 private:
00063 bool GetHeaderInfo(const char * dummy_buffer, size_t len, TransferSyntax &ts);
00064 JPEG2000Internals *Internals;
00065 };
00066
00067 }
00068
00069 #endif //GDCMJPEG2000CODEC_H