Program: gdcm
Module: $RCSfile: gdcmDict.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 15:07:41 $
- Version: $Revision: 1.72 $
+ Date: $Date: 2005/06/02 12:26:42 $
+ Version: $Revision: 1.76 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
//-----------------------------------------------------------------------------
+/// \brief auto generate function, to fill up the Dicom Dictionnary,
+/// if relevant file is not found on user's disk
void FillDefaultDataDict(Dict *d);
//-----------------------------------------------------------------------------
std::ifstream from( filename.c_str() );
if( !from )
{
- gdcmVerboseMacro( "Can't open dictionary" << filename.c_str());
+ gdcmWarningMacro( "Can't open dictionary" << filename.c_str());
// Using default embeded one:
FillDefaultDataDict( this );
}
if(KeyHt.count(key) == 1)
{
- gdcmVerboseMacro( "Already present" << key.c_str());
+ gdcmWarningMacro( "Already present" << key.c_str());
return false;
}
else
}
else
{
- gdcmVerboseMacro( "Unfound entry" << key.c_str());
+ gdcmWarningMacro( "Unfound entry" << key.c_str());
return false;
}
}
}
/**
- * \brief Get the dictionary entry identified by a given tag (group,element)
- * @param group group of the entry to be found
- * @param elem element of the entry to be found
+ * \brief Get the dictionary entry identified by a given tag ("group|element")
+ * @param key tag of the entry to be found
* @return the corresponding dictionary entry when existing, NULL otherwise
*/
+DictEntry *Dict::GetEntry(TagKey const &key)
+{
+ TagKeyHT::iterator it = KeyHt.find(key);
+ if ( it == KeyHt.end() )
+ {
+ return 0;
+ }
+ return &(it->second);
+}
+
DictEntry *Dict::GetEntry(uint16_t group, uint16_t elem)
{
TagKey key = DictEntry::TranslateToKey(group, elem);