Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMIMAGECHANGETRANSFERSYNTAX_H
00016 #define GDCMIMAGECHANGETRANSFERSYNTAX_H
00017
00018 #include "gdcmImageToImageFilter.h"
00019 #include "gdcmTransferSyntax.h"
00020
00021 namespace gdcm
00022 {
00023
00024 class DataElement;
00025 class ImageCodec;
00039 class GDCM_EXPORT ImageChangeTransferSyntax : public ImageToImageFilter
00040 {
00041 public:
00042 ImageChangeTransferSyntax():TS(TransferSyntax::TS_END),Force(false),CompressIconImage(false),UserCodec(0) {}
00043 ~ImageChangeTransferSyntax() {}
00044
00046 void SetTransferSyntax(const TransferSyntax &ts) { TS = ts; }
00048 const TransferSyntax &GetTransferSyntax() const { return TS; }
00049
00051 bool Change();
00052
00055 void SetCompressIconImage(bool b) { CompressIconImage = b; }
00056
00061 void SetForce( bool f ) { Force = f; }
00062
00067 void SetUserCodec(ImageCodec *ic) { UserCodec = ic; }
00068
00069 protected:
00070 bool TryJPEGCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output);
00071 bool TryJPEG2000Codec(const DataElement &pixelde, Bitmap const &input, Bitmap &output);
00072 bool TryJPEGLSCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output);
00073 bool TryRAWCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output);
00074 bool TryRLECodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output);
00075
00076 private:
00077 TransferSyntax TS;
00078 bool Force;
00079 bool CompressIconImage;
00080
00081 ImageCodec *UserCodec;
00082 };
00083
00089 }
00090
00091 #endif //GDCMIMAGECHANGETRANSFERSYNTAX_H
00092