What steps will reproduce the problem? 1. dcm = dicom.read_file('CR-MONO1-10-chest')
dcm.pixel_array What is the expected output? What do you see instead? Expected: numpy array of pixel data
Actual: dicom.dataset.PropertyError: AttributeError in pixel_array property: Dataset does not have
attribute 'TransferSyntaxUID' What version of the product are you using? 0.94
If there is no meta info in the file, pydicom assumes little endian transfer syntax and implicit VR.
These assumptions are not written to the file_meta attribute of the Dataset, which means they
cannot be used downstream (in this case, when trying to convert the pixel data to a numpy
array).
Have fixed this by setting the TransferSyntaxUID attribute of file_meta_dataset in the no header
branch of the read_partial method of filereader.py (patch attached).
From mikewall...@gmail.com on February 16, 2010 21:04:21
What steps will reproduce the problem? 1. dcm = dicom.read_file('CR-MONO1-10-chest')
If there is no meta info in the file, pydicom assumes little endian transfer syntax and implicit VR. These assumptions are not written to the file_meta attribute of the Dataset, which means they cannot be used downstream (in this case, when trying to convert the pixel data to a numpy array).
Have fixed this by setting the TransferSyntaxUID attribute of file_meta_dataset in the no header branch of the read_partial method of filereader.py (patch attached).
Attachment: filereader.py.patch CR-MONO1-10-chest
Original issue: http://code.google.com/p/pydicom/issues/detail?id=77