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

dcm2mnc can't read DICOM fields with OB value representation #70

Open
ajwood opened this issue Oct 18, 2017 · 4 comments
Open

dcm2mnc can't read DICOM fields with OB value representation #70

ajwood opened this issue Oct 18, 2017 · 4 comments

Comments

@ajwood
Copy link

ajwood commented Oct 18, 2017

I've got an fMRI dicom series from a GE scanner that dcm2mnc can't convert correctly. I've narrowed it down to a problem reading the "locations in acquisition" field (0021,104f). In this dicom, this field's Value Representation is OB, so dcm2mnc ends up reading a 0; I know it's actually a signed short, and its value is 35.

My first reaction was to conclude that this is broken dicom data, but I have a Nifti converter that does the right thing with it. I'm wondering about ways to make dcm2mnc work with this data:

  1. figure out how to tell dcm2mnc's dicom parser that (0021,104f) is supposed to be a signed short. Is this a generic solution though? Maybe sometimes this will get encoded as another type?
  2. somehow get this information another way; for example, should we get this value by looking across all the dicoms in this series, and look for the number of unique values for slice location (0020,1041)?
@ajwood
Copy link
Author

ajwood commented Oct 18, 2017

I ran this dicom through dciodvfy (http://www.dclunie.com/dicom3tools/dciodvfy.html), and it picked up on the OB fields violating the dicom dictionary, and correctly pointed out that this one should be SS. I don't really understand how a dicom dictionary can describe a private tag like this, but perhaps dcm2mnc should adopt the dictionary for use on OB values?

@andrewjanke
Copy link
Member

andrewjanke commented Oct 18, 2017 via email

@ajwood
Copy link
Author

ajwood commented Oct 18, 2017

I haven't been able to come up with a dcmdump call that actually reads this field correctly though:

# Read from the bad series
$ dcmdump +P 0021,104f ./bad/001
(0021,104f) OB 23\00                                    #   2, 1 LocationsInAcquisition

# Read from a good series
$ dcmdump +P 0021,104f ./good/001
(0021,104f) SS 35                                       #   2, 1 LocationsInAcquisition

So I'm not sure how I could write the dodgy wrapper, since I'm not sure what the true value is. Of course in this case I know it's supposed to be 35, but shouldn't there be a way to solve this in a generic way?

@zijdenbos
Copy link

zijdenbos commented Oct 19, 2017 via email

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

3 participants