Print

Print


Dear Vinod,

>Dear SPM Colleagues,
>
>I have some dicom image files that I would like to convert into SPM
>compatible format files.
>
>I assume I can just write a Matlab routine to open the dicom files and
>grab the header information and write it out in a separate file. The
>question is, where in the dicom file is this header information contained?
>

The general organisation of the DICOM file format is as follows. The
information of any kind is aggregated into "groups" in which there are
"members". So if you for example want to find the patient name that will be
stored in the "patient" group as the "name" member. Groups and members are
coded as numbers so that the group number for patient may for example be 8
and the member number for name may for example be 30 (please note that I
don't remember the actual numbers so these examples will be wrong).

Now when reading a DICOM file you will read four numbers (I think) that
specify group, member, type (e.g. integer) and size. You then check if
group and member  correspond with the information you need. If it does you
will decode it using the type field, if not you will skip size bytes
forward to the next field. This structure has the advantage that you may
write a short utility to read precisely the information you are interested
in (typically less than ten items) without having to bother about the other
information in there.

For more specific information you may refer to the DICOM specification
document, which is just awful to read. You may alternatively use the
ACR-NEMA 2.0 specification, which I found a lot more digestable, of which
DICOM is simply a superset.

However, my first recommnedation would be to visit David Clunies home page
http://idt.net /~dclunie/medical-image-faq/html/ which contains pretty much
any information you are ever going to need regarding medical image formats.
I should guess also that you will find some utility there to do what you
want to do.

				Good luck Jesper




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%