GDCM
2.2.3
|
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 GDCMOVERLAY_H 00015 #define GDCMOVERLAY_H 00016 00017 #include "gdcmTypes.h" 00018 #include "gdcmObject.h" 00019 00020 namespace gdcm 00021 { 00022 00023 class OverlayInternal; 00024 class ByteValue; 00025 class DataSet; 00026 class DataElement; 00038 class GDCM_EXPORT Overlay : public Object 00039 { 00040 public: 00041 Overlay(); 00042 ~Overlay(); 00044 void Print(std::ostream &) const; 00045 00047 void Update(const DataElement & de); 00048 00050 void SetGroup(unsigned short group); 00052 unsigned short GetGroup() const; 00054 void SetRows(unsigned short rows); 00056 unsigned short GetRows() const; 00058 void SetColumns(unsigned short columns); 00060 unsigned short GetColumns() const; 00062 void SetNumberOfFrames(unsigned int numberofframes); 00064 void SetDescription(const char* description); 00066 const char *GetDescription() const; 00067 typedef enum { 00068 Invalid = 0, 00069 Graphics = 1, 00070 ROI = 2 00071 } OverlayType; 00073 void SetType(const char* type); 00075 const char *GetType() const; 00076 OverlayType GetTypeAsEnum() const; 00077 static const char *GetOverlayTypeAsString(OverlayType ot); 00078 static OverlayType GetOverlayTypeFromString(const char *); 00080 void SetOrigin(const signed short origin[2]); 00082 const signed short * GetOrigin() const; 00084 void SetFrameOrigin(unsigned short frameorigin); 00086 void SetBitsAllocated(unsigned short bitsallocated); 00088 unsigned short GetBitsAllocated() const; 00090 void SetBitPosition(unsigned short bitposition); 00092 unsigned short GetBitPosition() const; 00093 00095 void SetOverlay(const char *array, size_t length); 00097 bool GrabOverlayFromPixelData(DataSet const &ds); 00098 00101 const ByteValue &GetOverlayData() const; 00102 00104 bool IsEmpty() const; 00105 00107 bool IsZero() const; 00108 00110 bool IsInPixelData() const; 00111 00113 void IsInPixelData(bool b); 00114 00116 void Decompress(std::ostream &os) const; 00117 00119 GDCM_LEGACY(bool GetBuffer(char *buffer) const) 00120 00121 00122 GDCM_LEGACY(bool GetUnpackBuffer(unsigned char *buffer) const) 00123 00124 00125 GDCM_LEGACY(void Decode(std::istream &is, std::ostream &os)) 00126 00127 00128 00129 size_t GetUnpackBufferLength() const; 00130 00133 bool GetUnpackBuffer(char *buffer, size_t len) const; 00134 00135 Overlay(Overlay const &ov); 00136 00137 private: 00138 OverlayInternal *Internal; 00139 }; 00140 00141 } // end namespace gdcm 00142 00143 #endif //GDCMOVERLAY_H