GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmPixmap.h
Go to the documentation of this file.

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