Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Writing file meta information - to change or not to change?

116 views
Skip to first unread message

Arty Shan

unread,
Aug 10, 2015, 7:22:27 AM8/10/15
to
Hi,
May be a silly issue, but I try to write a simple sowftware taking DICOM images as a structure from inside of another software and writing it as DICOM files. My problem is, I don't really know how should I write file meta information.
I know about all "technical" stuff, writing in Explicit VR Little Endian, preamble with "DICM", but i struggle about what should I be able to change considering the original DICOM information. Of course, while writing in diffrent transfer syntaxes, I would change the value of Transfer Syntax UID field, but what with the rest? Should i set fields like Source Application Entity Title or should I be able to set Private Intormation field or don't touch it and leave it as original?
Cheers and thanks in advance.

David Clunie

unread,
Aug 10, 2015, 11:00:14 AM8/10/15
to
This is not a silly issue at all, but extremely important.

The intent of the PS3.10 file meta information is to describe how
the data set is encoded, and who wrote it (for traceability).

To that end, best practice is to DISCARD any file meta information
that may have been read in, and write only what new file meta
information is required, known or relevant to the writer.

The writer should know, and should populate de novo:

File Meta Information Version (always 00H, 01H; get the byte order right)
Media Storage SOP Class UID
Media Storage SOP Instance UID
Transfer Syntax UID

Be especially carefully, obviously, if you have "changed" the
SOP Class or Instance UIDs or encoded in a different Transfer
Syntax than the original file was read in.

The write should also have their own:

Implementation Class UID (should not be copied from someone else)

And should RECALCULATE:

File Meta Information Group Length (since it may be different than read)

since the length will have almost certainly changed.

Everything else is optional, and the AE Titles have a specific
meaning, so read carefully:


http://dicom.nema.org/medical/dicom/current/output/chtml/part10/chapter_7.html#sect_7.1

Specifically:

Source Application Entity Title (is you, the writer, if you have one)

I would strongly recommend not "copying" (and preferably not populating
for your own nefarious purposes):

Private Information Creator UID
Private Information

either, since you have no idea whether what was in there was specific
to the original file "layout" or "content" or not (e.g., it might
contain fixed byte offset dependent information), or be dependent
on content in the data set that may have been changed). It is rarely
present anyway, so no harm will be done by discarding it as a routine.

David
Message has been deleted
0 new messages