carlosqueiroz / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

TransferSyntaxUID not set on Dataset if there is no meta info in dicom file #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. dcm = dicom.read_file('CR-MONO1-10-chest')
2. 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).

Original issue reported on code.google.com by mikewall...@gmail.com on 17 Feb 2010 at 2:04

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision f2321645d9.

Original comment by darcymason@gmail.com on 17 Feb 2010 at 3:10