# gdcmPixmap.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 GDCMPIXMAP_H
    00016 #define GDCMPIXMAP_H
    00017
    00018 #include "gdcmBitmap.h"
    00019 #include "gdcmCurve.h"
    00020 #include "gdcmIconImage.h"
    00021 #include "gdcmOverlay.h"
    00022
    00023 namespace gdcm
    00024 {
    00025
    00033 class GDCM_EXPORT Pixmap : public Bitmap
    00034 {
    00035 public:
    00036   Pixmap();
    00037   ~Pixmap();
    00038   void Print(std::ostream &) const;
    00039
    00041   bool AreOverlaysInPixelData() const;
    00042
    00044   Curve& GetCurve(unsigned int i = 0) {
    00045     assert( i < Curves.size() );
    00046     return Curves[i];
    00047   }
    00048   const Curve& GetCurve(unsigned int i = 0) const {
    00049     assert( i < Curves.size() );
    00050     return Curves[i];
    00051   }
    00052   size_t GetNumberOfCurves() const { return Curves.size(); }
    00053   void SetNumberOfCurves(size_t n) { Curves.resize(n); }
    00054
    00056   Overlay& GetOverlay(size_t i = 0) {
    00057     assert( i < Overlays.size() );
    00058     return Overlays[i];
    00059   }
    00060   const Overlay& GetOverlay(size_t i = 0) const {
    00061     assert( i < Overlays.size() );
    00062     return Overlays[i];
    00063   }
    00064   size_t GetNumberOfOverlays() const { return Overlays.size(); }
    00065   void SetNumberOfOverlays(size_t n) { Overlays.resize(n); }
    00066   void RemoveOverlay(size_t i) {
    00067     assert( i < Overlays.size() );
    00068     Overlays.erase( Overlays.begin() + i );
    00069   }
    00070
    00072   const IconImage &GetIconImage() const { return Icon; }
    00073   IconImage &GetIconImage() { return Icon; }
    00074
    00075 //private:
    00076 protected:
    00077   std::vector<Overlay>  Overlays;
    00078   std::vector<Curve>  Curves;
    00079   IconImage Icon;
    00080 };
    00081
    00082 } // end namespace gdcm
    00083
    00084 #endif //GDCMPIXMAP_H