How to delete a complete private tag #1881
-
I would like to delete the complete private sequence (3249,1020). The sequence contains several tags to include the creator (3249,0010). |
Beta Was this translation helpful? Give feedback.
Answered by
mrbean-bremen
Nov 17, 2024
Replies: 1 comment 3 replies
-
If I understand you correctly, you just want to delete a private sequence. I'm not sure what you mean by "The sequence contains several tags to include the creator (3249,0010)", but you can delete any sequence just by removing the sequence tag from the dataset: var ds = DicomFile.Open("your_file.dcm").Dataset;
var seq = new DicomTag(0x3249, 0x20, "YOUR PRIVATE CREATOR");
ds.Remove(seq); (error handling omitted) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, missed your reply.
You didn't write (or I didn't understand) that the sequence you want to delete is inside another sequence.
In this case you have to navigate to that sequence first - the snippet above only works for top-level tags.
You would need something like:
(this is out of my head, so may not be completely correct)