+2005-01-25 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+ * src/gdcmDocEntrySet.cxx : Bug fix when getting the value
+ * src/gdcmContentEntry.[h|cxx], gdcmValEntry.cxx : amelioration of code
+
2005-01-25 Jean-Pierre Roux <jpr@creatis.univ-lyon1.fr>
In ordrer to avoid missbehaviour :
. gdcm::DocEntry is now specialized in
Program: gdcm
Module: $RCSfile: gdcmContentEntry.cxx,v $
Language: C++
- Date: $Date: 2005/01/25 15:21:20 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/01/25 16:32:45 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
{
+ Value = GDCM_UNFOUND;
}
/**
Program: gdcm
Module: $RCSfile: gdcmContentEntry.h,v $
Language: C++
- Date: $Date: 2005/01/25 15:21:20 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/01/25 16:32:45 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Sets the value (string) of the current Dicom entry
virtual void SetValue(std::string const &val) { Value = val; };
- void SetValueOnly(std::string const &val) { Value = val; };
-
/// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted
/// into a 'string', event if it's physically stored on disk as an integer
std::string const &GetValue() const { return Value; };
protected:
-
// Contructors are protected, not to be invoked by end user.
ContentEntry(DictEntry *e);
ContentEntry(DocEntry *d);
// Destructor is protected, not to be invoked by end user.
~ContentEntry();
-
+
private:
// Members :
-
/// \brief Dicom entry value, internaly represented as a std::string.
/// The Value Representation (\ref VR) is independently used
/// in order to interpret (decode) this field.
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.cxx,v $
Language: C++
- Date: $Date: 2005/01/25 15:44:23 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2005/01/25 16:32:45 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
std::string DocEntrySet::GetEntryValue(uint16_t group, uint16_t elem)
{
- ValEntry *entry = GetValEntry(group,elem);
+ ContentEntry *entry = dynamic_cast<ContentEntry *>(GetDocEntry(group,elem));
if( entry )
return entry->GetValue();
return GDCM_UNFOUND;
Program: gdcm
Module: $RCSfile: gdcmValEntry.cxx,v $
Language: C++
- Date: $Date: 2005/01/25 15:21:20 $
- Version: $Revision: 1.51 $
+ Date: $Date: 2005/01/25 16:32:45 $
+ Version: $Revision: 1.52 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
// for multivaluated items
l = (Util::CountSubstring(val, "\\") + 1) * 2;
- SetValueOnly(val);
+ ContentEntry::SetValue(val);
}
else if( vr == "UL" || vr == "SL" )
{
// for multivaluated items
l = (Util::CountSubstring(val, "\\") + 1) * 4;;
- SetValueOnly(val);
+ ContentEntry::SetValue(val);
}
else
{
gdcmAssertMacro( !(finalVal.size() % 2) );
l = finalVal.length();
- SetValueOnly(finalVal);
+ ContentEntry::SetValue(finalVal);
}
}
else
gdcmAssertMacro( !(finalVal.size() % 2) );
l = finalVal.length();
- SetValueOnly(finalVal);
+ ContentEntry::SetValue(finalVal);
}
SetLength(l);