How to make a worklist file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
xfjsuperking
Posts: 70
Joined: Thu, 2007-08-30, 02:01

How to make a worklist file

#1 Post by xfjsuperking »

Hello
I want to test the worklist function using the dcmtk ,and CONQUESTSRV runs on another computer as the server.Now the client and Server can connect successfully ,but because of lacking data in the worklist file,so the client does not get any data at all.I want to know how to edit a worklist file on the server .Any help will be deeply appreciated.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1444
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

Samples are provided in the DCMTK source distribution, in directory dcmwlm/data/wlistdb. These are text files that can be converted into DICOM files suitable for wlmscpfs using the dcmconv tool. The README file provided in that directory says:
DCMWLM - EXAMPLE MODALITY WORKLIST DATABASE

Within this directory and its subdirectories is an example of a worklist database as supported by the wlmscpfs application. Each subdirectory within this directory represents an Application Entity (AE) title for wlmscpfs. e.g. requestsing an association with the AE title of OFFIS would allow wlmscpfs to search the worklist entities contained in the OFFIS sub-directory. You can create a subdirectory for you own company and copy the example worklist entities found in the OFFIS subdirectory into your own subdirectory. The databases of worklist entities to be searched by wlmscpfs have a very simple format. Each database consists of zero or more dicom files. Each dicom file represents a single worklist entity. wlmscpfs locks the worklist database while peforming a search to indicate that other processes should not update the database. Locking is achieved by locking a lockfile within each worklist database. A file "lockfile" must exist within each worklist database directory. The lockfile can be empty. If no processes are accessing the worklist database then new worklist entities can be added by creating a dicom files containing worklist attributes and worklist entities can be removed by deleting worklist files. Files containing worklist entities must have the suffix ".wl". If the "*.wl" files do not yet exist, you can create them using the dump2dcm command, e.g.
dump2dcm -g wklist2.dump wklist2.wl

New worklist files can be easily adapted from existing files using the following procedure (wklist1.wl is an existing worklist file):

Step 1.
dcmdump wklist1.wl > wklist2.dump

Step 1 creates an ascii dump of the worklist file wklist1.wl

Step 2.
emacs wklist2.dump

In Step 2 edit the text file by modifying the value fields within square brackets([]).

Step 3.
dump2dcm -g wklist2.dump wklist2.wl

Step 3 converts the text file into a dicom file.

See the documentation in dcmtk/dcmdata/docs for more information on the dcmdump and dump2dcm utilities.

xfjsuperking
Posts: 70
Joined: Thu, 2007-08-30, 02:01

How to create a file like wlistqry1.dump

#3 Post by xfjsuperking »

Hello everyone:

I want to use findscu to query the worklist of the RIS,but i don't know how to create the dcm file like wlistqry1.dump to include my own query parameters.Thanks in advances

qimo601
Posts: 32
Joined: Wed, 2012-06-06, 07:38

Re:

#4 Post by qimo601 »

Marco Eichelberg wrote:Samples are provided in the DCMTK source distribution, in directory dcmwlm/data/wlistdb. These are text files that can be converted into DICOM files suitable for wlmscpfs using the dcmconv tool. The README file provided in that directory says:
DCMWLM - EXAMPLE MODALITY WORKLIST DATABASE

Within this directory and its subdirectories is an example of a worklist database as supported by the wlmscpfs application. Each subdirectory within this directory represents an Application Entity (AE) title for wlmscpfs. e.g. requestsing an association with the AE title of OFFIS would allow wlmscpfs to search the worklist entities contained in the OFFIS sub-directory. You can create a subdirectory for you own company and copy the example worklist entities found in the OFFIS subdirectory into your own subdirectory. The databases of worklist entities to be searched by wlmscpfs have a very simple format. Each database consists of zero or more dicom files. Each dicom file represents a single worklist entity. wlmscpfs locks the worklist database while peforming a search to indicate that other processes should not update the database. Locking is achieved by locking a lockfile within each worklist database. A file "lockfile" must exist within each worklist database directory. The lockfile can be empty. If no processes are accessing the worklist database then new worklist entities can be added by creating a dicom files containing worklist attributes and worklist entities can be removed by deleting worklist files. Files containing worklist entities must have the suffix ".wl". If the "*.wl" files do not yet exist, you can create them using the dump2dcm command, e.g.
dump2dcm -g wklist2.dump wklist2.wl

New worklist files can be easily adapted from existing files using the following procedure (wklist1.wl is an existing worklist file):

Step 1.
dcmdump wklist1.wl > wklist2.dump

Step 1 creates an ascii dump of the worklist file wklist1.wl

Step 2.
emacs wklist2.dump

In Step 2 edit the text file by modifying the value fields within square brackets([]).

Step 3.
dump2dcm -g wklist2.dump wklist2.wl

Step 3 converts the text file into a dicom file.

See the documentation in dcmtk/dcmdata/docs for more information on the dcmdump and dump2dcm utilities.
hi,Marco Eichelberg

I want to know that how to create the '.wl' file in my own application by Dcmtk class?
just like DcmFileFormat or DcmDataset class, i can't use the dcmdump.exe and dump2dcm.exe.

Thanks

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to make a worklist file

#5 Post by anilta »

I want to test the Worklist download functionality with international character sets (Japanese, German, etc.). Does DCMTK have these test data.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: How to make a worklist file

#6 Post by Michael Onken »

Hi,

no we do not offer such test data.

You find examples in part 5 of the DICOM standard.

Here are also some test images with international character sets provided by the NEMA (publisher of DICOM standard).

Best regards,
Michael

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to make a worklist file

#7 Post by anilta »

How to add Sequence items to the existing Worklist dump files?

I want to test DCM_ReferencedStudySequence tag. So i modified one of the worklist item provided by DCMTK.
When i use dcmconv to convert .dump to .wl, i get a error,

E: DcmElement: Unknown Tag & Data (3028,3030) larger (808463416) than remaining bytes in file
F: I/O suspension or premature end of stream: reading file: C:\Dicom_Server\WorklistDB\wklist1.dump

Here is the below Worklist dump file.

(0008,0050) SH 00000
(0008,0005) CS [ISO_IR 100]
(0008,1110) SQ
(fffe,e000) -
(0008,1150) UI 1.2.276.0.7212333.1.2.3
(0008,1155) UI 1.2.333.0.2345432.1.1.1
(fffe,e00d) -
(fffe,e00d) -

(0010,0010) PN VIVALDI^ANTONIO
(0010,0020) LO AV35674
(0010,0030) DA 16780304
(0010,0040) CS M
(0010,2000) LO METASTASIS
(0010,2110) LO TANTAL
(0020,000d) UI 1.2.276.0.7230010.3.2.101
(0032,1032) PN SMITH
(0032,1060) LO EXAM6
(0040,0100) SQ
(fffe,e000) -
(0008,0060) CS US
(0032,1070) LO BARIUMSULFAT
(0040,0001) AE AA32\AA33
(0040,0002) DA 20151201
(0040,0003) TM 085607
(0040,0006) PN JOHNSON
(0040,0007) LO EXAM74
(0040,0009) SH SPD3445
(0040,0010) SH STN456
(0040,0011) SH B34F56
(0040,0012) LO
(0040,0400) LT
(fffe,e00d) -
(fffe,e0dd) -
(0040,1001) SH RP454G234
(0040,1003) SH LOW

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to make a worklist file

#8 Post by J. Riesmeier »

Looking at the "red part" of your dump, it seems that you've "closed" the item twice. So, you should replace the second occurrence of (fffe,e00d) by (fffe,e0dd).

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to make a worklist file

#9 Post by anilta »

Yes. That was a typo mistake.
The second is replaced by (fffe,e0dd).

Still i get the same error.

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to make a worklist file

#10 Post by J. Riesmeier »

dcmconv does not convert a text dump into a binary DICOM file. Please use "dump2dcm" instead!

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to make a worklist file

#11 Post by anilta »

It works now.

Thanks Riesmeier.

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to make a worklist file

#12 Post by anilta »

I have created the .wl. I have the sequence items, DCM_ReferencedStudySequence.
But not able to access them.

This is my code. What is wrong here? :(

// Set Scheduled Procedure Sequence Item data.
DcmElement* element1 = NULL;
if(dataset->findAndGetElement(DCM_ReferencedStudySequence,element1).good())
{
int card1 = OFstatic_cast(DcmSequenceOfItems *, element1)->card();
for(int i = 0; i < card1; i++)
{
DcmItem *item1 = OFstatic_cast(DcmSequenceOfItems *, element1)->getItem(i);

DcmElement* element = NULL;
char* val = NULL;
if(item1->findAndGetElement(DCM_ReferencedSOPClassUID,element).good())
{
element->getString(val);
cout << val << endl;
}
}
}

Post Reply

Who is online

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