GDCM 3.2.1

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() override;
37 void Print(std::ostream &) const override;
38
40 bool AreOverlaysInPixelData() const override;
42 bool UnusedBitsPresentInPixelData() const override;
43
45 Curve& GetCurve(size_t i = 0) {
46 gdcm_assert( i < Curves.size() );
47 return Curves[i];
48 }
49 const Curve& GetCurve(size_t i = 0) const {
50 gdcm_assert( i < Curves.size() );
51 return Curves[i];
52 }
53 size_t GetNumberOfCurves() const { return Curves.size(); }
54 void SetNumberOfCurves(size_t n) { Curves.resize(n); }
55
57 Overlay& GetOverlay(size_t i = 0) {
58 gdcm_assert( i < Overlays.size() );
59 return Overlays[i];
60 }
61 const Overlay& GetOverlay(size_t i = 0) const {
62 gdcm_assert( i < Overlays.size() );
63 return Overlays[i];
64 }
65 size_t GetNumberOfOverlays() const { return Overlays.size(); }
66 void SetNumberOfOverlays(size_t n) { Overlays.resize(n); }
67 void RemoveOverlay(size_t i) {
68 gdcm_assert( i < Overlays.size() );
69 Overlays.erase( Overlays.begin() + i );
70 }
71
73 const IconImage &GetIconImage() const { return *Icon; }
74 IconImage &GetIconImage() { return *Icon; }
75 void SetIconImage(IconImage const &ii) { Icon = ii; }
76
77//private:
78 protected:
79 std::vector<Overlay> Overlays;
80 std::vector<Curve> Curves;
81 SmartPointer<IconImage> Icon;
82};
83
84} // end namespace gdcm
85
86#endif //GDCMPIXMAP_H
gdcm::Bitmap::Bitmap
Bitmap()
gdcm::Curve
Curve class to handle element 50xx,3000 Curve Data.
Definition gdcmCurve.h:41
gdcm::Overlay
Overlay class.
Definition gdcmOverlay.h:39
gdcm::Pixmap::Pixmap
Pixmap()
gdcm::Pixmap::GetOverlay
const Overlay & GetOverlay(size_t i=0) const
Definition gdcmPixmap.h:61
gdcm::Pixmap::SetNumberOfCurves
void SetNumberOfCurves(size_t n)
Definition gdcmPixmap.h:54
gdcm::Pixmap::~Pixmap
~Pixmap() override
gdcm::Pixmap::UnusedBitsPresentInPixelData
bool UnusedBitsPresentInPixelData() const override
returns if there are unused bits in the pixel data
gdcm::Pixmap::SetNumberOfOverlays
void SetNumberOfOverlays(size_t n)
Definition gdcmPixmap.h:66
gdcm::Pixmap::GetIconImage
IconImage & GetIconImage()
Definition gdcmPixmap.h:74
gdcm::Pixmap::Overlays
std::vector< Overlay > Overlays
Definition gdcmPixmap.h:79
gdcm::Pixmap::Print
void Print(std::ostream &) const override
gdcm::Pixmap::GetCurve
const Curve & GetCurve(size_t i=0) const
Definition gdcmPixmap.h:49
gdcm::Pixmap::GetOverlay
Overlay & GetOverlay(size_t i=0)
Overlay: group 60xx.
Definition gdcmPixmap.h:57
gdcm::Pixmap::RemoveOverlay
void RemoveOverlay(size_t i)
Definition gdcmPixmap.h:67
gdcm::Pixmap::GetIconImage
const IconImage & GetIconImage() const
Set/Get Icon Image.
Definition gdcmPixmap.h:73
gdcm::Pixmap::Icon
SmartPointer< IconImage > Icon
Definition gdcmPixmap.h:81
gdcm::Pixmap::SetIconImage
void SetIconImage(IconImage const &ii)
Definition gdcmPixmap.h:75
gdcm::Pixmap::GetNumberOfOverlays
size_t GetNumberOfOverlays() const
Definition gdcmPixmap.h:65
gdcm::Pixmap::GetNumberOfCurves
size_t GetNumberOfCurves() const
Definition gdcmPixmap.h:53
gdcm::Pixmap::AreOverlaysInPixelData
bool AreOverlaysInPixelData() const override
returns if Overlays are stored in the unused bit of the pixel data:
gdcm::Pixmap::Curves
std::vector< Curve > Curves
Definition gdcmPixmap.h:80
gdcm::Pixmap::GetCurve
Curve & GetCurve(size_t i=0)
Curve: group 50xx.
Definition gdcmPixmap.h:45
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcmBitmap.h
gdcmCurve.h
gdcm_assert
#define gdcm_assert(cond)
Definition gdcmException.h:104
gdcmIconImage.h
gdcmOverlay.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::IconImage
Bitmap IconImage
Definition gdcmIconImage.h:91