Items in sequences

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jmartens
Posts: 15
Joined: Wed, 2005-02-02, 10:36

Items in sequences

#1 Post by jmartens »

I am trying to build my own worklist files from a database that holds (parts of) the information.

Suppose I have the dicom element Modality (0008, 0060) which is a part of the ScheduledProcedureStepSequence (0040,0100).

Is there somewhere in the DCMTK source some example of how to insert the item the correct way?

Do I need to check:
- whether the element it is part of a sequence item?
- if the sequence already exists?
- insert the sequence if it not exists
- insert the tag in the sequence?
- insert the sequence in the dataset?

If so can someone point me to some examples on how this can be done?

Or is there some function already available to expand my dataset say if it looks something like this:

Code: Select all

(0010,0010) PN TEST^CASE^^^
(0010,0020) LO 12345
(0010,0030) DA 20001201
(0010,0040) CS M
(0008,0060) CS CT
the function could evaluate it to something like this:

Code: Select all

(0010,0010) PN TEST^CASE^^^
(0010,0020) LO 12345
(0010,0030) DA 20001201
(0010,0040) CS M
(0040,0100) SQ (Sequence with explicit length #=1)
  (fffe,e000) -
    (0008,0060) CS CT
  (fffe,e00d) -
(fffe,e0dd) -
Thanks in advance!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

There are a couple of source code examples both in this forum and in the DCMTK. Just search for "item sequence" (in the forum).

The easiest way to create a new item in a (possibly non-existing) sequence is to use the helper function findOrCreateSequenceItem(). There are also examples in the DCMTK that show how to use this function.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest