Program: gdcm
Module: $RCSfile: gdcmDataEntry.cxx,v $
Language: C++
- Date: $Date: 2005/10/20 07:23:50 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2005/10/21 14:09:41 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return BinArea[id];
}
+bool DataEntry::IsValueCountValid() const
+{
+ uint32_t vm;
+ ostringstream os;
+ os.str( GetVM() );
+ os >> vm;
+ return vm == GetValueCount();
+}
+
uint32_t DataEntry::GetValueCount(void) const
{
const VRKey &vr = GetVR();
}
return count;
}
- else
- return GetLength();
+
+ return GetLength();
}
void DataEntry::SetString(std::string const &value)
Program: gdcm
Module: $RCSfile: gdcmDataEntry.h,v $
Language: C++
- Date: $Date: 2005/10/19 08:06:45 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2005/10/21 14:09:41 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void SetValue(const uint32_t &id,const double &val);
double GetValue(const uint32_t &id) const;
uint32_t GetValueCount(void) const;
+ bool IsValueCountValid() const;
void SetString(std::string const &value);
std::string const &GetString() const;
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/10/21 12:12:18 $
- Version: $Revision: 1.285 $
+ Date: $Date: 2005/10/21 14:09:41 $
+ Version: $Revision: 1.286 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
entry = GetDataEntry(0x0020,0x0050);
if( entry )
{
- gdcmWarningMacro( "Unfound Location (0020,0050)");
if( entry->GetValueCount() == 1 )
return (float)entry->GetValue(0);
gdcmWarningMacro( "Wrong Location (0020,0050)");