Stupid difference between gdcm::ValEntry
and gdcm::BinEntry removed.
Only gdcm::DataEntry exist, now.
ValEntry(DictEntry *e);
BinEntry(DictEntry *e);
-->DataEntry *New(uint16_t group,uint16_t elem, VRKey const &vr);
std::string const &ValEntry::GetValue() const;
std::string const &BinEntry::GetValue() const;
-->std::string const &DataEntry::GetString() const;
uint8_t *BinEntry::GetBinArea();
-->uint8_t *DataEntry::GetBinArea();
void ValEntry::SetValue(std::string const &value);
void BinEntry::SetValue(std::string const &value);
-->void DataEntry::SetString(std::string const &value);
void BinEntry::SetBinArea( uint8_t *area, bool self = true );
-->void DataEntry::SetBinArea( uint8_t *area, bool self = true );
void ValEntry::CopyValEntry(uint16_t gr, uint16_t el);
-->void DataEntry::CopyDataEntry(uint16_t gr, uint16_t el, VRKey const &vr);
Example :
old way :
DocEntry *p3 = item2->GetDocEntry(0x0018,0x0050);
if( !p3 ) return false;
ContentEntry *entry2 = dynamic_cast(p3);
std::string thickness = entry2->GetValue();
new way :
DocEntry *p3 = item2->GetDocEntry(0x0018,0x0050);
if( !p3 ) return false;
DataEntry *entry2 = dynamic_cast(p3);
std::string thickness = entry2->GetString();
Avoid tons of CPU time consuming accesses to DICOM Dictionnary
DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem);
-->DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem,
const VRKey &vr = GDCM_VRUNKNOWN);
void FileHelper::CheckMandatoryEntry(uint16_t group, uint16_t elem, std::string value);
-->void FileHelper::CheckMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
const VRKey &vr = GDCM_VRUNKNOWN);
void FileHelper::SetMandatoryEntry(uint16_t group, uint16_t elem, std::string value);
-->void FileHelper::SetMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
const VRKey &vr = GDCM_VRUNKNOWN);
void FileHelper::CopyMandatoryEntry(uint16_t group, uint16_t elem, std::string value);
-->void FileHelper::CopyMandatoryEntry(uint16_t group, uint16_t elem, std::string value,
const VRKey &vr = GDCM_VRUNKNOWN);
Avoid too many source file modifications from gdcm1.2 to gdcm1.3
use :
#define ValEntry DataEntry
#define BinEntry DataEntry
#define GetEntryValue(g,e) GetEntryString(g,e)
#define GetEntryForcedAsciiValue(g,e) GetEntryString(g,e)
#define GetValEntry(g,e) GetDataEntry(g,e)
#define GetBinEntry(g,e) GetDataEntry(g,e)
#define GetValue() GetString()
#define InsertValEntry(v,g,e,vr) InsertEntryString(v,g,e,vr) // warning mind the VR!
#define InsertBinEntry(b,l,g,e,vr) InsertEntryBinArea(b,l,g,e,vr)
#define SetValEntry(c,g,e) SetEntryString(c,g,e) | !!
#define SetValEntry(c,en) SetEntryString(c,en) | !!
#define SetBinEntry(c,l,en) SetEntryBinArea(c,l,en) | !!
#define SetBinEntry(c,l,g,e) SetEntryBinArea(c,l,g,e) | !!
#define NewValEntry(g,e,vr) NewDataEntry(g,e,vr)
#define NewBinEntry(g,e,vr) NewDataEntry(g,e,vr)