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