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

Allow to set force option of dcmread #89

Open
medihack opened this issue Aug 17, 2023 · 4 comments
Open

Allow to set force option of dcmread #89

medihack opened this issue Aug 17, 2023 · 4 comments

Comments

@medihack
Copy link

Currently dcmread is used without the force option in dicomweb-client. It would be nice to make this configurable to read also maybe not so valid DICOM files.

@pieper
Copy link
Member

pieper commented Aug 17, 2023

I don't see any downside to being more tolerant when reading. It might make sense to try reading first, and if an exception is raised issue a warning and try again with the force option.

Anyone else have suggestions? @hackermd

@medihack
Copy link
Author

I am unsure if this would be a good solution as it would try to read each dataset twice when it is not valid, which could be quite a performance hit when reading many invalid datasets. But maybe it would be a good default (with some warning when the reading initially fails) but still have some option to do a forced reading initially.

@pieper
Copy link
Member

pieper commented Aug 17, 2023

From the documentation for force, it says it only checks for a metaheader, which I would think is very quick. But we could check if it's an issue.

@medihack
Copy link
Author

You are right. It then sounds like a good solution. Maybe a little warning on the console could still be printed.

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

No branches or pull requests

2 participants