You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a filter rule which targeted a non-string field (DICOM VR - DS) the empty() function in filter.py throws an exception - "'DSfloat' object has no attribute 'value'".
Filter rule:
LABEL Check for Empty RepetitionTime
empty RepetitionTime
Root cause:
Currently in filter.py - line 155 we assume that if the content (returned from pydicom.DataSet.get()) is not a string, it's a DataElement. With this assumption we then attempt to get the value property of the content object. Depending on the parameter passed into get(), the returned value will either be the value from the tag or a DataElement. In the case of our filter rule above, the value returned from get() was of type DSfloat (not string), and threw an exception/
Proposed fix (Pull request coming shortly)
Instead of checking content is not string, reverse the logic and instead explicitly check for content being an instance of DataElement.
The text was updated successfully, but these errors were encountered:
When adding a filter rule which targeted a non-string field (DICOM VR - DS) the empty() function in filter.py throws an exception - "'DSfloat' object has no attribute 'value'".
Filter rule:
Root cause:
Currently in filter.py - line 155 we assume that if the content (returned from pydicom.DataSet.get()) is not a string, it's a DataElement. With this assumption we then attempt to get the value property of the content object. Depending on the parameter passed into get(), the returned value will either be the value from the tag or a DataElement. In the case of our filter rule above, the value returned from get() was of type DSfloat (not string), and threw an exception/
Proposed fix (Pull request coming shortly)
Instead of checking content is not string, reverse the logic and instead explicitly check for content being an instance of DataElement.
The text was updated successfully, but these errors were encountered: