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

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
merged 2 commits into from
Jul 21, 2024

Conversation

chrisbll971
Copy link

@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
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.

@@ -225,6 +225,11 @@ pub enum ReadError {
#[snafu(backtrace)]
source: crate::meta::Error,
},
ParseSopAttributes {
Copy link
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
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
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
4 checks passed
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
3 participants