-
Notifications
You must be signed in to change notification settings - Fork 264
BF+TST: Skip over missing CSA header elem instead of raising. #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The failure on 2.6 is from this pydicom bug which is now fixed in master. Should I mark it as a known failure? |
Marking as knownfailure just for Python 2.6 seems good. We can drop Python 2.6 soon, if it makes it easier, we could drop it now? |
# Assume tag exists | ||
tag = dcm_data[(0x29, element_no)] | ||
try: | ||
tag = dcm_data[(0x29, element_no)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moloney Can you add a comment about when this would fail, and why None
is an OK value to return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a note about why it may fail. The docstring includes info about returning None.
Brendan - can I help with this one? |
Brendan - what news? Do you have time to take a look? |
Allows us to load data where the PrivateCreator is present but the element containing the header info is not. Ran into this with anonymized data.
Include a comment about why the tag might be missing.
Move pydicom import back to top level of module since we need its version info for skipping the test, plus this removes duplicate logic for importing 'pydicom' vs 'dicom'. Updated test_csa_header_read to use the top level import as well.
Great - thanks for finishing this one up. Ben - any more comments before I merge? |
Thanks - Brendan - merging as is, Ben feel free to follow up here with comments if you have them, we'll address them with a new PR. |
BF+TST: Skip over missing CSA header elem instead of raising. Allows us to load data where the PrivateCreator is present but the element containing the header info is not. Ran into this with anonymized data.
BF+TST: Skip over missing CSA header elem instead of raising. Allows us to load data where the PrivateCreator is present but the element containing the header info is not. Ran into this with anonymized data.
Allows us to load data where the PrivateCreator is present but
the element containing the header info is not. Ran into this with
anonymized data.