Issue 157 in pydicom: Setting is_little_endian and is_implicit_VR does not set file_meta.TransferSyntaxUID

47 views
Skip to first unread message

pyd...@googlecode.com

unread,
Nov 10, 2014, 12:58:57 PM11/10/14
to pydic...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Difficulty-Medium

New issue 157 by agrothberg: Setting is_little_endian and is_implicit_VR
does not set file_meta.TransferSyntaxUID
https://code.google.com/p/pydicom/issues/detail?id=157

If I call:
ds.is_little_endian = True
ds.is_implicit_VR = True

and then I try to read:
ds.file_meta.TransferSyntaxUID

I get the following exception:
AttributeError: Dataset does not have attribute 'TransferSyntaxUID'.

This means that I cannot create a DICOM file in memory and then pass it to
pynetdicom for sending (assuming that my code using pynetdicom reads the
file_meta.TransferSyntaxUID).

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pyd...@googlecode.com

unread,
Nov 10, 2014, 1:01:28 PM11/10/14
to pydic...@googlegroups.com

Comment #1 on issue 157 by agrothberg: Setting is_little_endian and
is_implicit_VR does not set file_meta.TransferSyntaxUID
https://code.google.com/p/pydicom/issues/detail?id=157

This might be the same issue referred to here:
https://code.google.com/p/pydicom/source/browse/source/dicom/examples/write_new.py#64

pyd...@googlecode.com

unread,
Nov 11, 2014, 3:48:21 PM11/11/14
to pydic...@googlegroups.com

Comment #2 on issue 157 by darcy...@gmail.com: Setting is_little_endian
and is_implicit_VR does not set file_meta.TransferSyntaxUID
https://code.google.com/p/pydicom/issues/detail?id=157

As a rule, pydicom does not "connect" different data elements (or in this
case, flags for transfer syntax to data elements). It is up to the user to
set all appropriate dicom data elements. This might change in some future
version, but DICOM is so complex in its requirements it would be very
difficult to fulfill them (or warn) on behalf of the user for most
situations. The write_new program you linked does provide an example of
how to set the elements.

As for pynetdicom, I'm not sure I understand the issue there ... you can
set ds.file_meta.TransferSyntaxUID in memory before calling pynetdicom code.

pyd...@googlecode.com

unread,
Nov 11, 2014, 3:50:59 PM11/11/14
to pydic...@googlegroups.com

Comment #3 on issue 157 by agrothberg: Setting is_little_endian and
is_implicit_VR does not set file_meta.TransferSyntaxUID
https://code.google.com/p/pydicom/issues/detail?id=157

The issue is that If i set:
ds.is_little_endian = True
ds.is_implicit_VR = True
and then try to read:
ds.file_meta.TransferSyntaxUID
I get an error.

If instead, i set:
ds.is_little_endian = True
ds.is_implicit_VR = True
save the file as XXXX.dcm. Then load XXXX.dcm and then read:
ds.file_meta.TransferSyntaxUID
I can properly read that value. In other words, round-tripping the DICOM
to disk changes ds.file_meta.TransferSyntaxUID
Reply all
Reply to author
Forward
0 new messages