Building sequence based on dictionary

All other questions regarding DCMTK

Moderator: Moderator Team

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

Building sequence based on dictionary

#1 Post by jmartens »

Is it possible to expand my dataset with the use of the dictionary?

For instance I would like to make a worklist dataset based on entries from a (mySQL) database. One of the fields returned is the Modality (0008,0060) which is a member of the ScheduledProcedureStepSequence.

Is it possible to use the dictionary to determine that the Modality element is a member of a (ScheduledProcedureStep)Sequence so I can insert it in the ScheduledProcedureStepSequence?

Is it also possible to determine the other element that are hierarchicaly under a sequence? This because I would like to expand the sequence to include all the element that could be part of this sequence.

Thomas Wilkens
DCMTK Developer
Posts: 117
Joined: Tue, 2004-11-02, 17:21
Location: Oldenburg, Germany
Contact:

#2 Post by Thomas Wilkens »

An example for such a "sequence expansion" algorithm is already included in DCMTK, fortunately for you also already for the worklist management service. This algorithm is not based on the data dictionary though (because this is impossible), you will have to specify yourself, which attributes shall be added. See function WlmDataSource::ExpandEmptySequenceInSearchMask(...) in dcmwlm/libsrc/wlds.cc.

jmartens
Posts: 15
Joined: Wed, 2005-02-02, 10:36

#3 Post by jmartens »

Thomas Wilkens wrote:An example for such a "sequence expansion" algorithm is already included in DCMTK, fortunately for you also already for the worklist management service. This algorithm is not based on the data dictionary though (because this is impossible), you will have to specify yourself, which attributes shall be added. See function WlmDataSource::ExpandEmptySequenceInSearchMask(...) in dcmwlm/libsrc/wlds.cc.
That is really nice... however I build my dataset using the adapted version of the dump2dcm.cc readDumpFile routine which I implemented in the WlmDatabaseInteractionManager::DetermineMatchingRecords routine (which is my equivalent of the WlmFilesystemInteractionManager::DetermineMatchingRecords to access the database data: I changed the loop that reeds a file to read a record from the database instead).

I don't think I'm allowed to access memebers of the WlmDataSource class from within the WlmDatabaseInteractionManager class. Can you help me how to implement this function so I can expand my dataset filled with data from the database?

Thanks in advance!

Thomas Wilkens
DCMTK Developer
Posts: 117
Joined: Tue, 2004-11-02, 17:21
Location: Oldenburg, Germany
Contact:

#4 Post by Thomas Wilkens »

I did not want to suggest that you actually _use_ this function, you can use this function as an _example_ on how to expand a sequence.

If you need to know what attributes can occur in the ScheduledProcedureStepSequence, you have to look into the DICOM standard, part 4, table K.6-1.

With this information, it should be possible for you to implement an algorithm that works.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest