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:
(0095,0004) ?? 03\00 # 2, 1 Unknown Tag & Data
Thanks,
Martin
dcmodify, VR problem when inserting private tags
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
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?
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?
Re: dcmodify, VR problem when inserting private tags
Hi Martin,mbellehu wrote: ms@linux:~/apps/migration_controller/dcmtk/bin> ./dcmodify -v -i "(0095,0004)=3" img1
This works:
Code: Select all
./dcmodify -v -i "(0095,0010)=SIENET" img1
./dcmodify -v -i "(0095,1004)=3" img1
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
Who is online
Users browsing this forum: Google [Bot] and 1 guest