Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.cxx,v $
Language: C++
- Date: $Date: 2006/01/27 10:01:33 $
- Version: $Revision: 1.69 $
+ Date: $Date: 2006/03/22 13:19:25 $
+ Version: $Revision: 1.71 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DocEntry *currentEntry = GetDocEntry(group, elem);
if ( !currentEntry )
return NULL;
-
+
return dynamic_cast<SeqEntry*>(currentEntry);
}
* failed).
*/
DataEntry *DocEntrySet::InsertEntryString(std::string const &value,
- uint16_t group, uint16_t elem,
- VRKey const &vr )
+ uint16_t group, uint16_t elem,
+ VRKey const &vr )
{
DataEntry *dataEntry = 0;
DocEntry *currentEntry = GetDocEntry( group, elem );
* failed).
*/
DataEntry *DocEntrySet::InsertEntryBinArea(uint8_t *binArea, int lgth,
- uint16_t group, uint16_t elem,
- VRKey const &vr )
+ uint16_t group, uint16_t elem,
+ VRKey const &vr )
{
DataEntry *dataEntry = 0;
DocEntry *currentEntry = GetDocEntry( group, elem );
gdcmWarningMacro( "Failed to allocate SeqEntry for ("
<<std::hex << group << "|" << elem <<")" );
return 0;
- }
+ }
return newEntry;
}
DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
{
DictEntry *found = 0;
+ /// \todo store the DefaultPubDict somwhere, in order not to access the HTable
+ /// every time !
Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
if (!pubDict)
{
/**
* \brief Searches [both] the public [and the shadow dictionary (when they
* exist)] for the presence of the DictEntry with given
- * group and element, and create a new virtual DictEntry if necessary
+ * group and element, and creates a new virtual DictEntry if necessary
* @param group group number of the searched DictEntry
* @param elem element number of the searched DictEntry
* @param vr V(alue) R(epresentation) to use, if necessary
DictEntry *goodEntry = dictEntry;
VRKey goodVR = vr;
TagName vm;
- if (elem == 0x0000)
+ if (elem == 0x0000)
goodVR="UL";
if ( goodEntry )
{
if ( goodVR != goodEntry->GetVR()
&& goodVR != GDCM_VRUNKNOWN )
- {
+ {
gdcmWarningMacro("For (" << std::hex << group << "|"
<< elem << "), found VR : [" << vr << "]"
<< " expected: [" << goodEntry->GetVR() << "]" ) ;
if (dictEntry)
{
- goodEntry = DictEntry::New(group, elem, goodVR, vm,//"FIXME",
+ goodEntry = DictEntry::New(group, elem, goodVR, vm,
dictEntry->GetName() );
}
else