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 GDCMPIXMAPWRITER_H 00016 #define GDCMPIXMAPWRITER_H 00017 00018 #include "gdcmWriter.h" 00019 #include "gdcmPixmap.h" 00020 00021 namespace gdcm 00022 { 00023 00024 class Pixmap; 00036 class GDCM_EXPORT PixmapWriter : public Writer 00037 { 00038 public: 00039 PixmapWriter(); 00040 ~PixmapWriter(); 00041 00042 const Pixmap& GetPixmap() const { return *PixelData; } 00043 Pixmap& GetPixmap() { return *PixelData; } // FIXME 00044 void SetPixmap(Pixmap const &img); 00045 00049 virtual const Pixmap& GetImage() const { return *PixelData; } 00050 virtual Pixmap& GetImage() { return *PixelData; } // FIXME 00051 virtual void SetImage(Pixmap const &img); 00052 00054 bool Write(); // Execute() 00055 00056 protected: 00057 void DoIconImage(DataSet & ds, Pixmap const & image); 00058 bool PrepareWrite(); 00059 00060 SmartPointer<Pixmap> PixelData; 00061 }; 00062 00068 } // end namespace gdcm 00069 00070 #endif //GDCMPIXMAPWRITER_H