On Apr 8, 1:48 am, Martin Carolan <
martin.g.caro...@gmail.com> wrote:
> Nano,
>
> thanks I will look at those standards. I have got some clarification from my
> colleagues at work I think what they were referring to as checksums were
> actually the GROUP LENGTH fields in the DICOM files.
In that case, you should see this item on the issue list:
http://code.google.com/p/pydicom/issues/detail?id=30.
pydicom writes group length for the file meta information (group 2)
where it is required (filewriter.py function _write_file_meta_info),
but not for other groups. I did a search in the standards documents
and most use of this has been retired, and in fact it is recommended
that they be removed. Section 7.2 of DICOM standard PS3.5-2008:
...All implementations shall be able to parse Group Length elements,
and may discard and not insert or reinsert
them; if present they shall be consistent with the encoding of the
dataset even if the transfer syntax
is changed resulting in a change in the actual length of a group of
elements. No implementation shall
require the presence of Group Length elements.
Notes: 1. Elements in groups 0, 2, 4 and 6 are not Standard Data
Elements. Mandatory requirements for Group
Length for groups 0 and 2 are specified elsewhere in the standard.
2. It is recommended that Group Length elements be removed during
storage or transfer in order to
avoid the risk of inconsistencies arising during coercion of data
element values and changes in transfer
syntax.
The other mandatory one, group 0, seems to be only used for direct
DICOM communications, not in files.
I've updated the issue to include the possibility of removing the
group length items. Meanwhile you could delete them in your own code
if desired using del dataset[group, 0].
-Darcy