dcmodify, VR problem when inserting private tags

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mbellehu
Posts: 1
Joined: Tue, 2007-08-14, 13:12

dcmodify, VR problem when inserting private tags

#1 Post by mbellehu »

Hello,
I'm trying to use dcmodify to insert a private tag.
I have the tag in the dictionary:
(0095,"SIENET",04) UL FolderReportedStatus 1

The insert succeeds:
ms@linux:~/apps/migration_controller/dcmtk/bin> ./dcmodify -v -i "(0095,0004)=3" img1


Processing file: img1
Executing (option|path|value): i|(0095,0004)|3
------------------------------------
There were 0 error(s)


But when I use DICOM dump, the VR is lost: :cry:
(0095,0004) ?? 03\00 # 2, 1 Unknown Tag & Data

Thanks,
Martin

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

#2 Post by Michael Onken »

Hi Martin,

Your dictionary entry means: Add for the "SIENET" creator all elements having the form (0095,xx04), where xx is the area you reserved with a reservation tag in the very file you look at. So in this file there have to be a reservation tag (0095,00xx) with value "SIENET". For the xx values, DICOM only allows the range [10..FF].

1) Is there a reservation tag for your private data already in the file? Otherwise this is not a valid DICOM private element and dcmdump will (AFAIK) not recognize it.

2) You are then writing to tag (0095,0004). The element number is not reservable at all (see above, only xx between 10..FF allowed, definetly not 00).

3) Be sure to have your dictionary with the private tag in the dictionary path when "dcmdumping".

Do this: Insert a valid reservation tag, maybe (0095,0010)="SIENET". Then insert your private tag, in your case then (0095,1004)="VALUE". The dictionary entry you quoted should be ok.

I hope i made no mistake, I did not test that ;)

Regards,
Michael

Hm... Are you sure the directory path includes your private dictionary?

gerhardh
Posts: 8
Joined: Tue, 2006-02-28, 17:10

Re: dcmodify, VR problem when inserting private tags

#3 Post by gerhardh »

mbellehu wrote: ms@linux:~/apps/migration_controller/dcmtk/bin> ./dcmodify -v -i "(0095,0004)=3" img1
Hi Martin,

This works:

Code: Select all

./dcmodify -v -i "(0095,0010)=SIENET" img1
./dcmodify -v -i "(0095,1004)=3" img1
(First Line only needed, if (0095,0010) LO [SIENET] not already there.)

Requirements:
export DCMDICTPATH=./lib/dicom.dic:./lib/private.dic
(private.dic is not included in the linux-binary of dcmtk-3.5.4, but you will find it in the source Distribution)

OR insert (as you wrote) the Tag into dicom.dic but take care TO USE TABS and NOT SPACES !!

Regards,
Gerhard

Post Reply

Who is online

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