Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Tue, 2017-10-24, 01:29

All times are UTC + 1 hour

Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu, 2006-01-05, 16:49 

Joined: Wed, 2005-02-09, 08:44
Posts: 19
Is there any utility avaialble in DCMTK for DICOM translation of images. Suppose i have the tag values and pixel data of certain non- DICOM image. How can I create a DICOM formatted image out of that. Which Application in DCMTK I can model upon for this.
I have tried doing this by using dcmodify after creation of a template with the utility dump2dcm. After template is ready I use dcmodify application to create a new copy of the template with new values in it. Is this the right approach. But here I am finding it difficult to handle pixel data which is very large. Can anybody help me out in this problem.

 Post subject:
PostPosted: Fri, 2006-01-06, 10:46 

Joined: Tue, 2004-11-02, 17:22
Posts: 1206
Location: Oldenburg, Germany
See FAQ #34. Using dump2dcm and dcmodify is possible but, as you noted, everything but ideal. In particular, there is no way to generate new UIDs. Basically, you will have to create you own application for this purpose. I would use pdf2dcm as a model, because this tool is doing something related, converting a PDF document into a DICOM SOP instance.

 Post subject:
PostPosted: Fri, 2006-01-06, 11:20 
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1622
Location: Oldenburg, Germany
A minor addition:
With DCMTK 3.5.4, there are some new UID options for dcmodify, that allow to generate new Study, Series and SOP Instance UIDs automatically. So this part of the problem could be solved using dcmodify.

Concerning your problems with large pixel data values: Did you noticed the +W option of dcmdump? It writes pixel data to a separate file and inserts a reference to this file into the dump; dump2dcm resolves this file refererence when converting a dump to DICOM and inserts the pixel data from the referenced file. See dcmdump and dump2dcm manpages for explanations and syntax.

But finally writing your own small application will be a much better solution;-)


PostPosted: Mon, 2009-11-23, 03:39 

Joined: Thu, 2009-08-20, 04:21
Posts: 4
here is an autohotkey script to do it
runwait, dcmdump +W . in.dcm
(0010,0010) PN []            # PatientsName
(0010,0020) LO []            # PatientID
(0020,000d) UI []            #  54, 1 StudyID
(0020,000d) UI []            #  50, 1 StudyInstanceUID
(0020,000e) UI []            #  38, 1 SeriesInstanceUID
(0008,0050) SH []            #  14, 1 AccessionNumber
(0008,0060) CS []            #   2, 1 Modality
(0008,0018) UI []     #
(7fe0,0010) OW =.\in.dcm.0.raw                  # PixelData
), header.txt
runwait, dump2dcm -v header.txt out.dcm

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group