# gdcmImageChangeTransferSyntax.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2010 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    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 } // end namespace gdcm
    00090
    00091 #endif //GDCMIMAGECHANGETRANSFERSYNTAX_H