Skip to content
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

Fix DataElement binary input #67

Merged
merged 3 commits into from
Oct 5, 2018

Conversation

erikced
Copy link
Contributor

@erikced erikced commented Oct 5, 2018

Remove api-breaking typemap for (const char *, gdcm::VL), extend gdcm::CSAElement and gdcm::DataElement with SetByteStringValue(const char *, uint32_t), add a typemap for (const char *, uint32_t) that accepts Python 2 str and Python 3 byte data.
Change usage of SetByteValue() to SetByteStringValue() in tests and examples.

Erik Cederberg added 3 commits October 5, 2018 10:55
Breaks current Python API.
This reverts commit 3c435a4.
Add a more pythonic single argument version of SetByteValue called
SetByteStringValue that takes a byte string (Python 2 str, Python 3 byte)
and extracts its length in the wrapper.
@erikced erikced changed the title Fix data element binary input Fix DataElement binary input Oct 5, 2018
@malaterre
Copy link
Owner

very clever ! uint32_t != gdcm::VL

@malaterre malaterre merged commit 5712d7c into malaterre:master Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants