Menu

#31 DataElement::IsEmpty() should just return ValueField == 0

2.9
open
2
2017-07-26
2009-01-20
No

DataElement::IsEmpty() is currently implemented as follows:

/// Check if Data Element is empty
bool IsEmpty() const { return ValueField == 0 || (GetByteValue() && GetByteValue()->IsEmpty()); }

http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/DataStructureAndEncodingDefinition/gdcmDataElement.h?revision=5063

Instead, it should be sufficient to just return ValueField == 0.

Mathieu asked me to make a bug report on this issue:

Re: [Gdcm2] GDCM 2.0.10 Reader::ReadUpToTag crash because of DataElement::GetValue()
From: Mathieu Malaterre <mathieu.malaterre@gm...> - 2009-01-20 17:29

https://sourceforge.net/mailarchive/message.php?msg_name=bf0c3b3f0901200929s8816953nddbee99c00f0fb37%40mail.gmail.com

Discussion

  • Niels Dekker

    Niels Dekker - 2009-01-20
    • priority: 5 --> 2
     
  • Mathieu Malaterre

    • Group: --> 2.5
     

Log in to post a comment.