GDCM 3.2.1

gdcmOverlay.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 GDCMOVERLAY_H
15#define GDCMOVERLAY_H
16
17#include "gdcmTypes.h"
18#include "gdcmObject.h"
19
20 namespace gdcm
21{
22
23 class OverlayInternal;
24 class ByteValue;
25 class DataSet;
26 class DataElement;
38 class GDCM_EXPORT Overlay : public Object
39{
40 public:
41 Overlay();
42 ~Overlay() override;
44 void Print(std::ostream &) const override;
45
47 void Update(const DataElement & de);
48
50 void SetGroup(unsigned short group);
52 unsigned short GetGroup() const;
54 void SetRows(unsigned short rows);
56 unsigned short GetRows() const;
58 void SetColumns(unsigned short columns);
60 unsigned short GetColumns() const;
62 void SetNumberOfFrames(unsigned int numberofframes);
64 void SetDescription(const char* description);
66 const char *GetDescription() const;
67 typedef enum {
68 Invalid = 0,
69 Graphics = 1,
70 ROI = 2
71 } OverlayType;
72
73 void SetType(const char* type);
75 const char *GetType() const;
76 OverlayType GetTypeAsEnum() const;
77 static const char *GetOverlayTypeAsString(OverlayType ot);
78 static OverlayType GetOverlayTypeFromString(const char *);
80 void SetOrigin(const signed short origin[2]);
82 const signed short * GetOrigin() const;
84 void SetFrameOrigin(unsigned short frameorigin);
86 void SetBitsAllocated(unsigned short bitsallocated);
88 unsigned short GetBitsAllocated() const;
90 void SetBitPosition(unsigned short bitposition);
92 unsigned short GetBitPosition() const;
93
95 void SetOverlay(const char *array, size_t length);
97 bool GrabOverlayFromPixelData(DataSet const &ds);
98
101 const ByteValue &GetOverlayData() const;
102
104 bool IsEmpty() const;
105
107 bool IsZero() const;
108
110 bool IsInPixelData() const;
111
113 void IsInPixelData(bool b);
114
116 void Decompress(std::ostream &os) const;
117
120 size_t GetUnpackBufferLength() const;
121
124 bool GetUnpackBuffer(char *buffer, size_t len) const;
125
126 Overlay(Overlay const &ov);
127 Overlay &operator=(Overlay const &ov);
128
129 private:
130 OverlayInternal *Internal;
131};
132
133} // end namespace gdcm
134
135#endif //GDCMOVERLAY_H
gdcm::ByteValue
Class to represent binary value (array of bytes)
Definition gdcmByteValue.h:36
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
gdcm::Object::Object
Object()
Definition gdcmObject.h:42
gdcm::Overlay::IsZero
bool IsZero() const
return true if all bits are set to 0
gdcm::Overlay::GrabOverlayFromPixelData
bool GrabOverlayFromPixelData(DataSet const &ds)
gdcm::Overlay::GetBitsAllocated
unsigned short GetBitsAllocated() const
return bits allocated
gdcm::Overlay::IsInPixelData
bool IsInPixelData() const
return if the Overlay is stored in the pixel data or not
gdcm::Overlay::GetDescription
const char * GetDescription() const
get description
gdcm::Overlay::GetBitPosition
unsigned short GetBitPosition() const
return bit position
gdcm::Overlay::Overlay
Overlay()
gdcm::Overlay::SetBitPosition
void SetBitPosition(unsigned short bitposition)
set bit position
gdcm::Overlay::GetType
const char * GetType() const
get type
gdcm::Overlay::GetTypeAsEnum
OverlayType GetTypeAsEnum() const
gdcm::Overlay::SetNumberOfFrames
void SetNumberOfFrames(unsigned int numberofframes)
set number of frames
gdcm::Overlay::SetFrameOrigin
void SetFrameOrigin(unsigned short frameorigin)
set frame origin
gdcm::Overlay::GetUnpackBuffer
bool GetUnpackBuffer(char *buffer, size_t len) const
gdcm::Overlay::SetOverlay
void SetOverlay(const char *array, size_t length)
set overlay from byte array + length
gdcm::Overlay::IsInPixelData
void IsInPixelData(bool b)
Set whether or no the OverlayData is in the Pixel Data:
gdcm::Overlay::GetColumns
unsigned short GetColumns() const
get columns
gdcm::Overlay::IsEmpty
bool IsEmpty() const
Return whether or not the Overlay is empty:
gdcm::Overlay::~Overlay
~Overlay() override
gdcm::Overlay::SetColumns
void SetColumns(unsigned short columns)
set columns
gdcm::Overlay::Overlay
Overlay(Overlay const &ov)
gdcm::Overlay::Print
void Print(std::ostream &) const override
Print.
gdcm::Overlay::SetGroup
void SetGroup(unsigned short group)
Set Group number.
gdcm::Overlay::GetGroup
unsigned short GetGroup() const
Get Group number.
gdcm::Overlay::GetOverlayData
const ByteValue & GetOverlayData() const
gdcm::Overlay::SetOrigin
void SetOrigin(const signed short origin[2])
set origin
gdcm::Overlay::OverlayType
OverlayType
Definition gdcmOverlay.h:67
gdcm::Overlay::Invalid
@ Invalid
Definition gdcmOverlay.h:68
gdcm::Overlay::Graphics
@ Graphics
Definition gdcmOverlay.h:69
gdcm::Overlay::ROI
@ ROI
Definition gdcmOverlay.h:70
gdcm::Overlay::GetOrigin
const signed short * GetOrigin() const
get origin
gdcm::Overlay::SetType
void SetType(const char *type)
set type
gdcm::Overlay::operator=
Overlay & operator=(Overlay const &ov)
gdcm::Overlay::GetUnpackBufferLength
size_t GetUnpackBufferLength() const
gdcm::Overlay::SetRows
void SetRows(unsigned short rows)
set rows
gdcm::Overlay::Decompress
void Decompress(std::ostream &os) const
Decode the internal OverlayData (packed bits) into unpacked representation.
gdcm::Overlay::GetRows
unsigned short GetRows() const
get rows
gdcm::Overlay::Update
void Update(const DataElement &de)
Update overlay from data element de:
gdcm::Overlay::GetOverlayTypeAsString
static const char * GetOverlayTypeAsString(OverlayType ot)
gdcm::Overlay::SetDescription
void SetDescription(const char *description)
set description
gdcm::Overlay::SetBitsAllocated
void SetBitsAllocated(unsigned short bitsallocated)
set bits allocated
gdcm::Overlay::GetOverlayTypeFromString
static OverlayType GetOverlayTypeFromString(const char *)
gdcmObject.h
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21