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

Adding private data elements (with creator) #431

Open
matthiasg opened this issue Nov 2, 2023 · 5 comments · Fixed by #508
Open

Adding private data elements (with creator) #431

matthiasg opened this issue Nov 2, 2023 · 5 comments · Fixed by #508
Labels
A-lib Area: library

Comments

@matthiasg
Copy link

Is there any support in handling adding private elements ?

@Enet4
Copy link
Owner

Enet4 commented Nov 2, 2023

At the moment, you can retrieve and insert elements with private tags, but they are treated like any other elements, and the private creator needs to be added or inspected manually. The data element dictionary can also be replaced with a custom implementation, which would enable the recognition of private tags by their alias at run-time.

With some work in this direction (and maybe some feedback on people's expectations when working with private elements), the ecosystem could support a more streamlined experience when working with these.

@Enet4 Enet4 added the A-lib Area: library label Nov 2, 2023
@matthiasg
Copy link
Author

Thanks for the quick feedback.

@naterichman
Copy link
Contributor

@Enet4 I'm interested in picking this up. Mostly for looking up private tags with a group, creator, and element mask, i.e.

If there was:

(0x0009, 0x0010)    LO     "MY CREATOR"
(0x0009, 0x1001)    SH     "My value"    

you could look it up like dcm.private_element(0x0009, "MY CREATOR", 0x01). And similarly something for adding a private element creating/reserving a block if necessary:

dcm.put_private_element(
    0x0009,
    "MY CREATOR",
    0x01,
    VR.SH, 
    Value::Primitive(
        PrimitiveValue::from("My Value".to_string())
    )
)

Just looking for your thoughts on design. LMK!

@Enet4
Copy link
Owner

Enet4 commented Apr 18, 2024

Thank you for the initiative, @naterichman! From what I know about private data elements, that API seems to go in the right direction, at least for the in-memory object implementation.

I've been thinking about how we would also incorporate this capability onto the Operations API (the attribute selectors only recognize tags and not private groups), and I would appreciate having more people thinking about this.

@naterichman
Copy link
Contributor

@matthiasg Getting back to this if you have a chance to test this out with 0.7.0 and have feedback on the interface, let me know!

@Enet4 Enet4 linked a pull request May 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants