Skip to content

Infer Media Storage SOP Class UID and Media Storage SOP Instance UID from the SOP Class UID and SOP Instance UID when missing#541

Merged
Enet4 merged 2 commits intoEnet4:masterfrom
chrisbll971:master
Jul 21, 2024
Merged

Infer Media Storage SOP Class UID and Media Storage SOP Instance UID from the SOP Class UID and SOP Instance UID when missing#541
Enet4 merged 2 commits intoEnet4:masterfrom
chrisbll971:master

Conversation

@chrisbll971
Copy link
Copy Markdown

@chrisbll971 chrisbll971 commented Jul 14, 2024

Resolves #538

  • Default Media Storage SOP Class UID and Media Storage SOP Instance UID to empty string when not available in the DICOM meta information table.
  • In open_file_with_all_options attempt to infer the Media Storage SOP Class UID and Media Storage SOP Instance UID from the SOP Class UID and SOP Instance UID tag values if the Media Storage SOP Class UID and Media Storage SOP Instance UID are set to an empty string

…from the SOP Class UID and SOP Instance UID when missing

- Default Media Storage SOP Class UID and Media Storage SOP Instance UID to empty string when not available in the DICOM meta information table.
- In open_file_with_all_options attempt to infer the Media Storage SOP Class UID and Media Storage SOP Instance UID from the SOP Class UID and SOP Instance UID tag values if the Media Storage SOP Class UID and Media Storage SOP Instance UID are set to an empty string
Copy link
Copy Markdown
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this! This is almost ready to enter. Please see the suggestions inline.

#[snafu(backtrace)]
source: crate::meta::Error,
},
ParseSopAttributes {
Copy link
Copy Markdown
Owner

@Enet4 Enet4 Jul 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As each error pertains to a single SOP attribute, the singular form (ParseSopAttribute) might be a better name.

Don't forget to include a suitable display message, either using #[display(...)] or with a doc comment.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. Released an updated version to address these

…ssage

Update ParseSopAttributes Error to be singular and include display message
Copy link
Copy Markdown
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you very much!

@Enet4 Enet4 merged commit cf484db into Enet4:master Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library C-object Crate: dicom-object enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

open_file support for inferring MediaStorageSOPClassUID and MediaStorageSOPInstanceUID from SOP Class UID and SOP Instance UID

3 participants