-
Notifications
You must be signed in to change notification settings - Fork 82
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
Cannot construct a DICOM object from a file without a file meta information header #83
Comments
when read those files by pydicom: import pydicom
dcm = pydicom.dcmread('data/_RAW_DIC/1_2_800A.DCM', force=True) # parameter force need to be set True
if not dcm.file_meta.get('TransferSyntaxUID'):
dcm.file_meta.TransferSyntaxUID = pydicom.uid.ImplicitVRLittleEndian |
Thank you for reporting! Yes, an anonymized file would help pinpoint the issue. But looking at how pydicom is being used here, I suspect that the file does not have a file meta group. If that is the case, creating an object from it might not be impossible, but does require going through extra hoops, so I agree that the API can be improved in that regard. See also #50. |
The anonymized DICOM file |
Thank you for the details. The file indeed does not have a file meta information header. Some DICOM implementations are able to identify the data set's transfer syntax on a best-effort basis or provide a workaround so that the expected transfer syntax of the data set can be defined by the user. I agree that one should be able to do the latter in DICOM-rs. I will update the title of this issue and reuse it for tracking the capability of reading DICOM data sets without a file meta information header, by specifying the transfer syntax as one of the input parameters. Please let me know if you are interested in tackling this, so that I may provide some guidance. |
I am glad to do this, but I am not familiar with Rust and DICOM, so I am not sure that if I can handle this. |
No worries, I'll try to work on a quick draft for the feature this week. |
OK 😃 |
And this is the error message:
Some DICOM file is just OK, but I have several files that will occur the error above. If you need the files, I will upload it after anonymization dealings be done.
The text was updated successfully, but these errors were encountered: