GDCM
2.2.3
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMIMAGECHANGETRANSFERSYNTAX_H 00015 #define GDCMIMAGECHANGETRANSFERSYNTAX_H 00016 00017 #include "gdcmImageToImageFilter.h" 00018 #include "gdcmTransferSyntax.h" 00019 00020 namespace gdcm 00021 { 00022 00023 class DataElement; 00024 class ImageCodec; 00038 class GDCM_EXPORT ImageChangeTransferSyntax : public ImageToImageFilter 00039 { 00040 public: 00041 ImageChangeTransferSyntax():TS(TransferSyntax::TS_END),Force(false),CompressIconImage(false),UserCodec(0) {} 00042 ~ImageChangeTransferSyntax() {} 00043 00045 void SetTransferSyntax(const TransferSyntax &ts) { TS = ts; } 00047 const TransferSyntax &GetTransferSyntax() const { return TS; } 00048 00050 bool Change(); 00051 00054 void SetCompressIconImage(bool b) { CompressIconImage = b; } 00055 00060 void SetForce( bool f ) { Force = f; } 00061 00066 void SetUserCodec(ImageCodec *ic) { UserCodec = ic; } 00067 00068 protected: 00069 bool TryJPEGCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output); 00070 bool TryJPEG2000Codec(const DataElement &pixelde, Bitmap const &input, Bitmap &output); 00071 bool TryJPEGLSCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output); 00072 bool TryRAWCodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output); 00073 bool TryRLECodec(const DataElement &pixelde, Bitmap const &input, Bitmap &output); 00074 00075 private: 00076 TransferSyntax TS; 00077 bool Force; 00078 bool CompressIconImage; 00079 00080 ImageCodec *UserCodec; 00081 }; 00082 00088 } // end namespace gdcm 00089 00090 #endif //GDCMIMAGECHANGETRANSFERSYNTAX_H