X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDataEntry.h;h=1b9aba72dc86437a185a52ff689a6a7effd6d1e6;hb=57ec56658548c34052a1c1678ffcb6907c3faeec;hp=67413d8c7bb75cb638a49085c6ecb85cfe8ed49a;hpb=5ac625c72835828d687ebdef878691d0913ae41b;p=gdcm.git diff --git a/src/gdcmDataEntry.h b/src/gdcmDataEntry.h index 67413d8c..1b9aba72 100644 --- a/src/gdcmDataEntry.h +++ b/src/gdcmDataEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.h,v $ Language: C++ - Date: $Date: 2005/11/29 12:48:45 $ - Version: $Revision: 1.11 $ + Date: $Date: 2006/04/11 16:03:26 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,6 +21,7 @@ #include "gdcmDocEntry.h" +#include // for GetDSValue #include namespace gdcm @@ -39,10 +40,13 @@ class GDCM_EXPORT DataEntry : public DocEntry public: /// \brief Contructs a DataEntry with a RefCounter from DictEntry - static DataEntry *New(DictEntry *e) {return new DataEntry(e);} +// static DataEntry *New(DictEntry *e) {return new DataEntry(e);} /// \brief Contructs a DataEntry with a RefCounter from DocEntry static DataEntry *New(DocEntry *d) {return new DataEntry(d);} - +/// \brief Contructs a DataEntry with a RefCounter from elementary items + static DataEntry *New(uint16_t group,uint16_t elem, VRKey const &vr) + {return new DataEntry(group,elem,vr);} + // Print void Print(std::ostream &os = std::cout, std::string const &indent = ""); @@ -53,10 +57,6 @@ public: // Set/Get data // Sets the value (string) of the current Dicom entry //virtual void SetValue(std::string const &val); - /// \brief Returns the 'Value' (e.g. "Dupond^Marcel") converted - /// into a 'string', event if it's physically stored on disk as an integer - /// (e.g. : 0x000c returned as "12") - //virtual std::string const &GetValue() const { return Value; } /// \brief Returns the area value of the current Dicom Entry /// when it's not string-translatable (e.g : LUT table, overlay, icon) @@ -66,8 +66,8 @@ public: void SetValue(const uint32_t &id,const double &val); double GetValue(const uint32_t &id) const; - uint32_t GetValueCount(void) const; - bool IsValueCountValid() const; + uint32_t GetValueCount() const; + bool IsValueCountValid() /*const*/; // GetVM may update the pointer DicomDict void SetString(std::string const &value); std::string const &GetString() const; @@ -110,7 +110,7 @@ public: // Flags /// \brief sets the 'pixel data flag' void SetFlag(const TValueFlag &flag) { Flag = flag; } - /// \brief returns the 'pixel data flag' + /// \brief returns the 'pixel data flag' const TValueFlag &GetFlag() const { return Flag; } /// \brief true id Entry is a Pixel Data entry bool IsPixelData() { return (Flag &FLAG_PIXELDATA) != 0; } @@ -124,14 +124,17 @@ public: static void SetMaxSizePrintEntry(const uint32_t &size) { MaxSizePrintEntry = size; } + bool GetDSValue(std::vector &valueVector); + protected: - DataEntry(DictEntry *e); - DataEntry(DocEntry *d); + // DataEntry(DictEntry *e); + DataEntry(DocEntry *d); + DataEntry(uint16_t group,uint16_t elem,VRKey const &vr); ~DataEntry(); // Methods : - void NewBinArea(void); - void DeleteBinArea(void); + void NewBinArea( ); + void DeleteBinArea( ); // Members : /// \brief memory area to hold 'non std::string' representable values