X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmDataEntry.cxx;h=f80dd7d290db83810222a52b1334f7b470b2e6af;hb=6d79b5e185867ef00629f1ccb279c32daa6357d2;hp=1ae42af4e01bd6a871cd76cd8d5e0f6adeac55a6;hpb=1cb2c2138ee52f3081d243b5a798134e860a4019;p=gdcm.git diff --git a/src/gdcmDataEntry.cxx b/src/gdcmDataEntry.cxx index 1ae42af4..f80dd7d2 100644 --- a/src/gdcmDataEntry.cxx +++ b/src/gdcmDataEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.cxx,v $ Language: C++ - Date: $Date: 2005/11/14 18:54:04 $ - Version: $Revision: 1.21 $ + Date: $Date: 2005/11/21 12:15:06 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -286,14 +286,15 @@ uint32_t DataEntry::GetValueCount( ) const return GetLength()/sizeof(uint16_t); else if( vr == "UL" || vr == "SL" ) return GetLength()/sizeof(uint32_t); - else if( vr == "FL" ) - return GetLength()/sizeof(float); + else if( vr == "FL" || vr == "OF" ) + return GetLength()/4 ; // FL has a *4* length! sizeof(float); else if( vr == "FD" ) - return GetLength()/sizeof(double); + return GetLength()/8; // FD has a *8* length! sizeof(double); else if( Global::GetVR()->IsVROfStringRepresentable(vr) ) { // Some element in DICOM are allowed to be empty - if( !GetLength() ) return 0; + if( !GetLength() ) + return 0; // Don't use std::string to accelerate processing uint32_t count = 1; for(uint32_t i=0;i