Skip to content

fix decimal rescale values causing Decimal data frame #145

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

Merged
merged 4 commits into from
Mar 2, 2013

Conversation

bpinsard
Copy link
Contributor

I ran into this bug using pydicom 0.9.7 and some Siemens Files
RescaleSlope and RescaleIntercept are returned as Decimal.


> /home_local/bpinsard/.virtualenvs/processing_virtenv/lib/python2.6/site-packages/nibabel/analyze.py(578)set_data_dtype()
>     577             raise HeaderDataError(
> --> 578                 'data dtype "%s" not recognized' % datatype)
>     579         dtype = self._data_type_codes.dtype[code]
> 
> ```
> ```

dtype being object because Decimal

@matthew-brett
Copy link
Member

Thanks for that. Do you have a DICOM header we can test against? If you do, and we can't make it public for the tests, we can work something out, I am sure, by putting the data somewhere private.

@bpinsard
Copy link
Contributor Author

bpinsard commented Dec 6, 2012

For this fix and the other I encountered the problems with ADNI dataset, so I do not think this can be released without their consent... what do you think we can do?

@matthew-brett
Copy link
Member

OK - thanks - that's a good point. I guess we could do two things. We could put the data in a private repository somewhere so it is not publicly shared, but we can run tests against it, given some (rarely given) permission, or we could make another header that is the same as one of the standard ones we have except for this feature. What do you think?

@moloney
Copy link
Contributor

moloney commented Mar 1, 2013

I added some anonymized test data from a user who ran into this issue.

@matthew-brett
Copy link
Member

Excellent - thanks for doing that.

matthew-brett added a commit that referenced this pull request Mar 2, 2013
fix decimal rescale values causing Decimal data frame

Error when some versions of pydicom have Decimal instead of float returned from dicom floating point string.
@matthew-brett matthew-brett merged commit e6832af into nipy:master Mar 2, 2013
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

Successfully merging this pull request may close these issues.

3 participants