GDCM
2.0.18
|
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 00048 static unsigned int GetNumberOfOverlays(DataSet const & ds); 00049 00051 void Update(const DataElement & de); 00052 00054 void SetGroup(unsigned short group); 00056 unsigned short GetGroup() const; 00058 void SetRows(unsigned short rows); 00060 unsigned short GetRows() const; 00062 void SetColumns(unsigned short columns); 00064 unsigned short GetColumns() const; 00066 void SetNumberOfFrames(unsigned int numberofframes); 00068 void SetDescription(const char* description); 00070 const char *GetDescription() const; 00072 void SetType(const char* type); 00074 const char *GetType() const; 00076 void SetOrigin(const signed short *origin); 00078 const signed short * GetOrigin() const; 00080 void SetFrameOrigin(unsigned short frameorigin); 00082 void SetBitsAllocated(unsigned short bitsallocated); 00084 unsigned short GetBitsAllocated() const; 00086 void SetBitPosition(unsigned short bitposition); 00088 unsigned short GetBitPosition() const; 00090 void SetOverlay(const char *array, unsigned int length); 00092 bool GrabOverlayFromPixelData(DataSet const &ds); 00093 00094 const ByteValue &GetOverlayData() const; 00095 00096 bool IsEmpty() const; 00097 00099 bool IsZero() const; 00100 00101 // return if the Overlay is stored in the pixel data or not 00102 bool IsInPixelData() const; 00103 void IsInPixelData(bool b); 00104 00105 void Decode(std::istream &is, std::ostream &os); 00106 00107 void Decompress(std::ostream &os) const; 00108 00109 bool GetBuffer(char *buffer) const; 00110 bool GetUnpackBuffer(unsigned char *buffer) const; 00111 00112 Overlay(Overlay const &ov); 00113 00114 private: 00115 OverlayInternal *Internal; 00116 }; 00117 00118 } // end namespace gdcm 00119 00120 #endif //GDCMOVERLAY_H