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

Ability to read DICOM files without headers #5

Open
simonster opened this issue Mar 12, 2014 · 3 comments
Open

Ability to read DICOM files without headers #5

simonster opened this issue Mar 12, 2014 · 3 comments
Labels

Comments

@simonster
Copy link
Contributor

The DICOM files I get from our PACS here at MIT Martinos Center don't have headers. Is this common enough that dcm_parse should just try to read the file anyway even if it doesn't have a valid header? Or this be optional?

@ihnorton
Copy link
Collaborator

The premise seems rather philosophical... (Is this for anonymization reasons? I thought you work with monkeys of some sort).

Anyway, I don't think it's very common, DICOM being as strict as it is. I do come across this from time to time myself, but I just consider it raw data and write a NRRD header to describe the data (usually to read with ITK/VTK/3D Slicer/etc.).

@ihnorton
Copy link
Collaborator

FWIW, I don't have any objection to having it as an option. DICOM readers usually have unstrict modes (which is especially useful when dealing with aggressively anonymized datasets - though usually some header is still present).

@simonster
Copy link
Contributor Author

To clarify, by header, I mean the first 128 bytes of the file and the "DICM" string that follows. The scanner is a Tim Trio that is also used for human studies, but the data aren't anonymized: the patient name, dates, etc. are all still in the DICOM files. I have no idea why that preamble is missing, or where it gets lost between the scanner and the PACS SFTP server. (The preamble is there if I export directly from the console.) I can make the files valid just by adding 128 null bytes + DICM.

The nibabel documentation on how SPM reads DICOM files says that SPM calls this "truncated DICOM" and gives some details about how it tries to determine whether files that are missing the preamble are DICOM or not. I also know that FreeSurfer's unpacksdcmdir doesn't complain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants