GDCM 2.2.1

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

- File List
- File Members

gdcmPixmap.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMPIXMAP_H
15 #define GDCMPIXMAP_H
16
17 #include "gdcmBitmap.h"
18 #include "gdcmCurve.h"
19 #include "gdcmIconImage.h"
20 #include "gdcmOverlay.h"
21
22 namespace gdcm
23 {
24
32 class GDCM_EXPORT Pixmap : public Bitmap
33 {
34 public:
35 Pixmap();
36 ~Pixmap();
37 void Print(std::ostream &) const;
38
40 bool AreOverlaysInPixelData() const;
41
43 Curve& GetCurve(unsigned int i = 0) {
44 assert( i < Curves.size() );
45 return Curves[i];
46 }
47 const Curve& GetCurve(unsigned int i = 0) const {
48 assert( i < Curves.size() );
49 return Curves[i];
50 }
51 size_t GetNumberOfCurves() const { return Curves.size(); }
52 void SetNumberOfCurves(size_t n) { Curves.resize(n); }
53
55 Overlay& GetOverlay(size_t i = 0) {
56 assert( i < Overlays.size() );
57 return Overlays[i];
58 }
59 const Overlay& GetOverlay(size_t i = 0) const {
60 assert( i < Overlays.size() );
61 return Overlays[i];
62 }
63 size_t GetNumberOfOverlays() const { return Overlays.size(); }
64 void SetNumberOfOverlays(size_t n) { Overlays.resize(n); }
65 void RemoveOverlay(size_t i) {
66 assert( i < Overlays.size() );
67 Overlays.erase( Overlays.begin() + i );
68 }
69
71 const IconImage &GetIconImage() const { return *Icon; }
72 IconImage &GetIconImage() { return *Icon; }
73 void SetIconImage(IconImage const &ii) { Icon = ii; }
74
75 //private:
76 protected:
77 std::vector<Overlay> Overlays;
78 std::vector<Curve> Curves;
79 SmartPointer<IconImage> Icon;
80 };
81
82 } // end namespace gdcm
83
84 #endif //GDCMPIXMAP_H