GDCM 3.0.24
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
20namespace gdcm
21{
22
23class OverlayInternal;
24class ByteValue;
25class DataSet;
26class DataElement;
39{
40public:
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;
73 void SetType(const char* type);
75 const char *GetType() const;
77 static const char *GetOverlayTypeAsString(OverlayType ot);
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);
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);
128
129private:
130 OverlayInternal *Internal;
131};
132
133} // end namespace gdcm
134
135#endif //GDCMOVERLAY_H
Class to represent binary value (array of bytes)
Definition gdcmByteValue.h:35
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
Object.
Definition gdcmObject.h:37
Overlay class.
Definition gdcmOverlay.h:39
bool IsZero() const
return true if all bits are set to 0
bool GrabOverlayFromPixelData(DataSet const &ds)
unsigned short GetBitsAllocated() const
return bits allocated
bool IsInPixelData() const
return if the Overlay is stored in the pixel data or not
const char * GetDescription() const
get description
unsigned short GetBitPosition() const
return bit position
void SetBitPosition(unsigned short bitposition)
set bit position
const char * GetType() const
get type
OverlayType GetTypeAsEnum() const
void SetNumberOfFrames(unsigned int numberofframes)
set number of frames
void SetFrameOrigin(unsigned short frameorigin)
set frame origin
bool GetUnpackBuffer(char *buffer, size_t len) const
void SetOverlay(const char *array, size_t length)
set overlay from byte array + length
void IsInPixelData(bool b)
Set whether or no the OverlayData is in the Pixel Data:
unsigned short GetColumns() const
get columns
bool IsEmpty() const
Return whether or not the Overlay is empty:
~Overlay() override
void SetColumns(unsigned short columns)
set columns
Overlay(Overlay const &ov)
void Print(std::ostream &) const override
Print.
void SetGroup(unsigned short group)
Set Group number.
unsigned short GetGroup() const
Get Group number.
const ByteValue & GetOverlayData() const
void SetOrigin(const signed short origin[2])
set origin
OverlayType
Definition gdcmOverlay.h:67
const signed short * GetOrigin() const
get origin
void SetType(const char *type)
set type
Overlay & operator=(Overlay const &ov)
size_t GetUnpackBufferLength() const
void SetRows(unsigned short rows)
set rows
void Decompress(std::ostream &os) const
Decode the internal OverlayData (packed bits) into unpacked representation.
unsigned short GetRows() const
get rows
void Update(const DataElement &de)
Update overlay from data element de:
static const char * GetOverlayTypeAsString(OverlayType ot)
void SetDescription(const char *description)
set description
void SetBitsAllocated(unsigned short bitsallocated)
set bits allocated
static OverlayType GetOverlayTypeFromString(const char *)
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21